mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-84180: Path in Java Compiler params doesn't get replaced with path variable
This commit is contained in:
+4
@@ -20,6 +20,7 @@ import com.intellij.openapi.components.State;
|
||||
import com.intellij.openapi.components.Storage;
|
||||
import com.intellij.openapi.components.StoragePathMacros;
|
||||
import com.intellij.openapi.components.StorageScheme;
|
||||
import com.intellij.openapi.project.Project;
|
||||
|
||||
@State(
|
||||
name = "CompilerAPISettings",
|
||||
@@ -29,4 +30,7 @@ import com.intellij.openapi.components.StorageScheme;
|
||||
}
|
||||
)
|
||||
public class CompilerAPIConfiguration extends JavacConfiguration {
|
||||
public CompilerAPIConfiguration(Project project) {
|
||||
super(project);
|
||||
}
|
||||
}
|
||||
+10
-2
@@ -30,10 +30,18 @@ import org.jetbrains.jps.model.java.compiler.JpsJavaCompilerOptions;
|
||||
)
|
||||
public class JavacConfiguration implements PersistentStateComponent<JpsJavaCompilerOptions> {
|
||||
private final JpsJavaCompilerOptions mySettings = new JpsJavaCompilerOptions();
|
||||
private final Project myProject;
|
||||
|
||||
public JavacConfiguration(Project project) {
|
||||
myProject = project;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public JpsJavaCompilerOptions getState() {
|
||||
return mySettings;
|
||||
JpsJavaCompilerOptions state = new JpsJavaCompilerOptions();
|
||||
XmlSerializerUtil.copyBean(mySettings, state);
|
||||
state.ADDITIONAL_OPTIONS_STRING = PathMacroManager.getInstance(myProject).collapsePathsRecursively(state.ADDITIONAL_OPTIONS_STRING);
|
||||
return state;
|
||||
}
|
||||
|
||||
public void loadState(JpsJavaCompilerOptions state) {
|
||||
@@ -41,6 +49,6 @@ public class JavacConfiguration implements PersistentStateComponent<JpsJavaCompi
|
||||
}
|
||||
|
||||
public static JpsJavaCompilerOptions getOptions(Project project, Class<? extends JavacConfiguration> aClass) {
|
||||
return ServiceManager.getService(project, aClass).getState();
|
||||
return ServiceManager.getService(project, aClass).mySettings;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user