String dest = getPreferences().getValue(project, "org.eclim.java.doc.dest");
String packageNames =
getPreferences().getValue(project, "org.eclim.java.doc.packagenames");
Project antProject = new Project();
BuildLogger buildLogger = new DefaultLogger();
buildLogger.setMessageOutputLevel(debug ? Project.MSG_DEBUG : Project.MSG_INFO);
buildLogger.setOutputPrintStream(getContext().out);
buildLogger.setErrorPrintStream(getContext().err);
antProject.addBuildListener(buildLogger);
antProject.setBasedir(ProjectUtils.getPath(project));
Javadoc javadoc = new Javadoc();
javadoc.setTaskName("javadoc");
javadoc.setProject(antProject);