mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-138667 Save Groovy-Eclipse jar path setting as a system-independent name using path variables
This commit is contained in:
+10
-3
@@ -20,9 +20,11 @@ import com.intellij.openapi.options.Configurable;
|
||||
import com.intellij.openapi.options.ConfigurationException;
|
||||
import com.intellij.openapi.ui.TextFieldWithBrowseButton;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.openapi.util.io.FileUtil;
|
||||
import com.intellij.ui.RawCommandLineEditor;
|
||||
import com.intellij.ui.components.JBCheckBox;
|
||||
import org.jetbrains.annotations.Nls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jps.incremental.groovy.GreclipseSettings;
|
||||
|
||||
@@ -65,21 +67,26 @@ public class GreclipseConfigurable implements Configurable {
|
||||
|
||||
@Override
|
||||
public boolean isModified() {
|
||||
return !Comparing.equal(myJarPath.getText(), mySettings.greclipsePath) ||
|
||||
return !Comparing.equal(getExternalizableJarPath(), mySettings.greclipsePath) ||
|
||||
!Comparing.equal(myCmdLineParams.getText(), mySettings.cmdLineParams) ||
|
||||
!Comparing.equal(myGenerateDebugInfo.isSelected(), mySettings.debugInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() throws ConfigurationException {
|
||||
mySettings.greclipsePath = myJarPath.getText();
|
||||
mySettings.greclipsePath = getExternalizableJarPath();
|
||||
mySettings.cmdLineParams = myCmdLineParams.getText();
|
||||
mySettings.debugInfo = myGenerateDebugInfo.isSelected();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private String getExternalizableJarPath() {
|
||||
return FileUtil.toSystemIndependentName(myJarPath.getText());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void reset() {
|
||||
myJarPath.setText(mySettings.greclipsePath);
|
||||
myJarPath.setText(FileUtil.toSystemDependentName(mySettings.greclipsePath));
|
||||
myCmdLineParams.setText(mySettings.cmdLineParams);
|
||||
myGenerateDebugInfo.setSelected(mySettings.debugInfo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user