Import maven compiler configuration for different compilerIds if the related IDE compilers support is available (IDEA-196548)

This commit is contained in:
Vladislav.Soroka
2018-10-22 10:28:02 +03:00
parent 35b1c1d1c8
commit fcf276cc34
12 changed files with 262 additions and 48 deletions
@@ -376,12 +376,16 @@ public class CompilerConfigurationImpl extends CompilerConfiguration implements
public void setAdditionalOptions(@NotNull Module module, @NotNull List<String> options) {
JpsJavaCompilerOptions settings = getCompilerSettings();
if (settings != null) {
String previous = settings.ADDITIONAL_OPTIONS_OVERRIDE.getOrDefault(module.getName(), settings.ADDITIONAL_OPTIONS_STRING);
String newValue = ParametersListUtil.join(options);
if (!newValue.equals(previous)) {
settings.ADDITIONAL_OPTIONS_OVERRIDE.put(module.getName(), newValue);
BuildManager.getInstance().clearState(myProject);
}
setAdditionalOptions(settings, module, options);
}
}
public void setAdditionalOptions(@NotNull JpsJavaCompilerOptions settings, @NotNull Module module, @NotNull List<String> options) {
String previous = settings.ADDITIONAL_OPTIONS_OVERRIDE.getOrDefault(module.getName(), settings.ADDITIONAL_OPTIONS_STRING);
String newValue = ParametersListUtil.join(options);
if (!newValue.equals(previous)) {
settings.ADDITIONAL_OPTIONS_OVERRIDE.put(module.getName(), newValue);
BuildManager.getInstance().clearState(myProject);
}
}