use of com.intellij.compiler.impl.javaCompiler.BackendCompiler 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();
}
use of com.intellij.compiler.impl.javaCompiler.BackendCompiler in project intellij-community by JetBrains.
the class BuildManager method shouldIncludeEclipseCompiler.
private boolean shouldIncludeEclipseCompiler(CompilerConfiguration config) {
if (config instanceof CompilerConfigurationImpl) {
final BackendCompiler javaCompiler = ((CompilerConfigurationImpl) config).getDefaultCompiler();
final String compilerId = javaCompiler != null ? javaCompiler.getId() : null;
return JavaCompilers.ECLIPSE_ID.equals(compilerId) || JavaCompilers.ECLIPSE_EMBEDDED_ID.equals(compilerId);
}
return true;
}
Aggregations