use of com.intellij.compiler.impl.javaCompiler.javac.JavacCompiler in project intellij-community by JetBrains.
the class CompilerConfigurationImpl method createCompilers.
private void createCompilers() {
if (JAVAC_EXTERNAL_BACKEND != null) {
return;
}
JAVAC_EXTERNAL_BACKEND = new JavacCompiler(myProject);
myRegisteredCompilers.add(JAVAC_EXTERNAL_BACKEND);
if (!ApplicationManager.getApplication().isUnitTestMode()) {
if (EclipseCompiler.isInitialized()) {
final EclipseCompiler eclipse = new EclipseCompiler(myProject);
myRegisteredCompilers.add(eclipse);
}
}
final Set<FileType> types = new HashSet<>();
for (BackendCompiler compiler : Extensions.getExtensions(BackendCompiler.EP_NAME, myProject)) {
myRegisteredCompilers.add(compiler);
types.addAll(compiler.getCompilableFileTypes());
}
final CompilerManager compilerManager = CompilerManager.getInstance(myProject);
for (FileType type : types) {
compilerManager.addCompilableFileType(type);
}
myDefaultJavaCompiler = JAVAC_EXTERNAL_BACKEND;
for (BackendCompiler compiler : myRegisteredCompilers) {
if (compiler.getId().equals(myState.DEFAULT_COMPILER)) {
myDefaultJavaCompiler = compiler;
break;
}
}
myState.DEFAULT_COMPILER = myDefaultJavaCompiler.getId();
}
Aggregations