use of com.intellij.compiler.CompilerConfigurationImpl 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;
}
use of com.intellij.compiler.CompilerConfigurationImpl in project intellij-community by JetBrains.
the class AnnotationProcessorsConfigurable method apply.
public void apply() throws ConfigurationException {
try {
final CompilerConfigurationImpl config = (CompilerConfigurationImpl) CompilerConfiguration.getInstance(myProject);
config.setDefaultProcessorProfile(myMainPanel.getDefaultProfile());
config.setModuleProcessorProfiles(myMainPanel.getModuleProfiles());
} finally {
BuildManager.getInstance().clearState(myProject);
}
}
use of com.intellij.compiler.CompilerConfigurationImpl in project intellij-community by JetBrains.
the class CompilerUIConfigurable method isModified.
public boolean isModified() {
final CompilerWorkspaceConfiguration workspaceConfiguration = CompilerWorkspaceConfiguration.getInstance(myProject);
boolean isModified = !myDisabledSettings.contains(Setting.AUTO_SHOW_FIRST_ERROR_IN_EDITOR) && ComparingUtils.isModified(myCbAutoShowFirstError, workspaceConfiguration.AUTO_SHOW_ERRORS_IN_EDITOR);
isModified |= !myDisabledSettings.contains(Setting.DISPLAY_NOTIFICATION_POPUP) && ComparingUtils.isModified(myCbDisplayNotificationPopup, workspaceConfiguration.DISPLAY_NOTIFICATION_POPUP);
isModified |= !myDisabledSettings.contains(Setting.AUTO_MAKE) && ComparingUtils.isModified(myCbEnableAutomake, workspaceConfiguration.MAKE_PROJECT_ON_SAVE);
isModified |= !myDisabledSettings.contains(Setting.PARALLEL_COMPILATION) && ComparingUtils.isModified(myCbParallelCompilation, workspaceConfiguration.PARALLEL_COMPILATION);
isModified |= !myDisabledSettings.contains(Setting.REBUILD_MODULE_ON_DEPENDENCY_CHANGE) && ComparingUtils.isModified(myCbRebuildOnDependencyChange, workspaceConfiguration.REBUILD_ON_DEPENDENCY_CHANGE);
isModified |= !myDisabledSettings.contains(Setting.COMPILER_VM_OPTIONS) && ComparingUtils.isModified(myVMOptionsField, workspaceConfiguration.COMPILER_PROCESS_ADDITIONAL_VM_OPTIONS);
final CompilerConfigurationImpl compilerConfiguration = (CompilerConfigurationImpl) CompilerConfiguration.getInstance(myProject);
isModified |= !myDisabledSettings.contains(Setting.HEAP_SIZE) && ComparingUtils.isModified(myHeapSizeField, compilerConfiguration.getBuildProcessHeapSize(0));
isModified |= !myDisabledSettings.contains(Setting.COMPILER_VM_OPTIONS) && ComparingUtils.isModified(mySharedVMOptionsField, compilerConfiguration.getBuildProcessVMOptions());
isModified |= !myDisabledSettings.contains(Setting.ADD_NOT_NULL_ASSERTIONS) && ComparingUtils.isModified(myCbAssertNotNull, compilerConfiguration.isAddNotNullAssertions());
isModified |= !myDisabledSettings.contains(Setting.CLEAR_OUTPUT_DIR_ON_REBUILD) && ComparingUtils.isModified(myCbClearOutputDirectory, workspaceConfiguration.CLEAR_OUTPUT_DIRECTORY);
isModified |= !myDisabledSettings.contains(Setting.RESOURCE_PATTERNS) && ComparingUtils.isModified(myResourcePatternsField, patternsToString(compilerConfiguration.getResourceFilePatterns()));
return isModified;
}
use of com.intellij.compiler.CompilerConfigurationImpl in project intellij-community by JetBrains.
the class CompilerUIConfigurable method apply.
public void apply() throws ConfigurationException {
CompilerConfigurationImpl configuration = (CompilerConfigurationImpl) CompilerConfiguration.getInstance(myProject);
final CompilerWorkspaceConfiguration workspaceConfiguration = CompilerWorkspaceConfiguration.getInstance(myProject);
if (!myDisabledSettings.contains(Setting.AUTO_SHOW_FIRST_ERROR_IN_EDITOR)) {
workspaceConfiguration.AUTO_SHOW_ERRORS_IN_EDITOR = myCbAutoShowFirstError.isSelected();
}
if (!myDisabledSettings.contains(Setting.DISPLAY_NOTIFICATION_POPUP)) {
workspaceConfiguration.DISPLAY_NOTIFICATION_POPUP = myCbDisplayNotificationPopup.isSelected();
}
if (!myDisabledSettings.contains(Setting.CLEAR_OUTPUT_DIR_ON_REBUILD)) {
workspaceConfiguration.CLEAR_OUTPUT_DIRECTORY = myCbClearOutputDirectory.isSelected();
}
if (!myDisabledSettings.contains(Setting.EXTERNAL_BUILD)) {
if (!myDisabledSettings.contains(Setting.AUTO_MAKE)) {
workspaceConfiguration.MAKE_PROJECT_ON_SAVE = myCbEnableAutomake.isSelected();
}
if (!myDisabledSettings.contains(Setting.PARALLEL_COMPILATION)) {
workspaceConfiguration.PARALLEL_COMPILATION = myCbParallelCompilation.isSelected();
}
if (!myDisabledSettings.contains(Setting.REBUILD_MODULE_ON_DEPENDENCY_CHANGE)) {
workspaceConfiguration.REBUILD_ON_DEPENDENCY_CHANGE = myCbRebuildOnDependencyChange.isSelected();
}
if (!myDisabledSettings.contains(Setting.HEAP_SIZE)) {
try {
configuration.setBuildProcessHeapSize(Integer.parseInt(myHeapSizeField.getText().trim()));
} catch (NumberFormatException ignored) {
LOG.info(ignored);
}
}
if (!myDisabledSettings.contains(Setting.COMPILER_VM_OPTIONS)) {
workspaceConfiguration.COMPILER_PROCESS_ADDITIONAL_VM_OPTIONS = myVMOptionsField.getText().trim();
configuration.setBuildProcessVMOptions(mySharedVMOptionsField.getText().trim());
}
}
if (!myDisabledSettings.contains(Setting.ADD_NOT_NULL_ASSERTIONS)) {
configuration.setAddNotNullAssertions(myCbAssertNotNull.isSelected());
}
if (!myDisabledSettings.contains(Setting.RESOURCE_PATTERNS)) {
configuration.removeResourceFilePatterns();
String extensionString = myResourcePatternsField.getText().trim();
applyResourcePatterns(extensionString, (CompilerConfigurationImpl) CompilerConfiguration.getInstance(myProject));
}
BuildManager.getInstance().clearState(myProject);
}
use of com.intellij.compiler.CompilerConfigurationImpl in project intellij-community by JetBrains.
the class ResourceCopyingTest method testDoNotCopyExcludedStandardResources.
public void testDoNotCopyExcludedStandardResources() throws Exception {
CompilerConfigurationImpl configuration = (CompilerConfigurationImpl) CompilerConfiguration.getInstance(myProject);
configuration.addResourceFilePattern("*.zzz");
createProjectSubFile("res/file.xxx");
createProjectSubFile("res/file.zzz");
importProject("<groupId>test</groupId>" + "<artifactId>project</artifactId>" + "<version>1</version>" + "<build>" + " <resources>" + " <resource>" + " <directory>res</directory>" + " <includes>" + " <include>**/*.xxx</include>" + " </includes>" + " <excludes>" + " <exclude>**/*.zzz</exclude>" + " </excludes>" + " </resource>" + " </resources>" + "</build>");
compileModules("project");
assertCopied("target/classes/file.xxx");
assertNotCopied("target/classes/file.zzz");
}
Aggregations