mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
support eclipse compiler in external build (initial)
This commit is contained in:
+11
@@ -50,9 +50,20 @@ public class EclipseCompiler extends ExternalCompiler {
|
||||
|
||||
private final Project myProject;
|
||||
private final List<File> myTempFiles = new ArrayList<File>();
|
||||
private static final String COMPILER_CLASS_NAME = "org.eclipse.jdt.core.compiler.batch.BatchCompiler";
|
||||
@NonNls private static final String PATH_TO_COMPILER_JAR = findJarPah();
|
||||
|
||||
private static String findJarPah() {
|
||||
try {
|
||||
final Class<?> aClass = Class.forName(COMPILER_CLASS_NAME);
|
||||
final String path = PathManager.getResourceRoot(aClass, "/" + aClass.getName().replace('.', '/') + ".class");
|
||||
if (path != null) {
|
||||
return path;
|
||||
}
|
||||
}
|
||||
catch (ClassNotFoundException ignored) {
|
||||
}
|
||||
|
||||
File dir = new File(PathManager.getLibPath());
|
||||
File[] jars = dir.listFiles(new FilenameFilter() {
|
||||
public boolean accept(File dir, String name) {
|
||||
|
||||
@@ -696,6 +696,7 @@ public class BuildManager implements ApplicationComponent{
|
||||
if (ApplicationManager.getApplication().isUnitTestMode()) {
|
||||
cmdLine.addParameter("-Dtest.mode=true");
|
||||
}
|
||||
cmdLine.addParameter("-Djdt.compiler.useSingleThread=true");
|
||||
|
||||
final String shouldGenerateIndex = System.getProperty(GlobalOptions.GENERATE_CLASSPATH_INDEX_OPTION);
|
||||
if (shouldGenerateIndex != null) {
|
||||
|
||||
Reference in New Issue
Block a user