use of com.intellij.openapi.compiler.Compiler in project intellij-community by JetBrains.
the class ValidationConfigurable method getValidators.
private List<Compiler> getValidators() {
final CompilerManager compilerManager = CompilerManager.getInstance(myProject);
final List<Compiler> validators = new ArrayList<>();
validators.addAll(Arrays.asList(compilerManager.getCompilers(Validator.class)));
for (GenericCompiler compiler : compilerManager.getCompilers(GenericCompiler.class)) {
if (compiler.getOrderPlace() == GenericCompiler.CompileOrderPlace.VALIDATING) {
validators.add(compiler);
}
}
return validators;
}
use of com.intellij.openapi.compiler.Compiler in project intellij-community by JetBrains.
the class CompilerManagerImpl method getCompilers.
@NotNull
public <T extends Compiler> T[] getCompilers(@NotNull Class<T> compilerClass, CompilerFilter filter) {
final List<T> compilers = new ArrayList<>(myCompilers.size());
for (final Compiler item : myCompilers) {
if (compilerClass.isAssignableFrom(item.getClass()) && filter.acceptCompiler(item)) {
compilers.add((T) item);
}
}
final T[] array = (T[]) Array.newInstance(compilerClass, compilers.size());
return compilers.toArray(array);
}
use of com.intellij.openapi.compiler.Compiler in project intellij-community by JetBrains.
the class ValidationConfigurable method apply.
public void apply() throws ConfigurationException {
myConfiguration.VALIDATE_ON_BUILD = myValidateBox.isSelected();
for (int i = 0; i < myValidators.getElementCount(); i++) {
final Compiler validator = myValidators.getElementAt(i);
myConfiguration.setSelected(validator, myValidators.isElementMarked(validator));
}
myExcludedConfigurable.apply();
}
Aggregations