mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-77127 Gradle: Support gradle wrapper
1. Correct gradle configurable processing in order to avoid 'modified after creation' situation; 2. Obsolete service is removed from the gradle plugin.xml;
This commit is contained in:
@@ -67,7 +67,6 @@
|
||||
|
||||
<projectService serviceImplementation="org.jetbrains.plugins.gradle.config.GradleSettings"/>
|
||||
<projectService serviceImplementation="org.jetbrains.plugins.gradle.config.GradleLocalSettings"/>
|
||||
<projectService serviceImplementation="org.jetbrains.plugins.gradle.config.GradleProjectState"/>
|
||||
|
||||
<toolWindow id="JetGradle" anchor="right" icon="GradleIcons.ToolWindowGradle"
|
||||
factoryClass="org.jetbrains.plugins.gradle.ui.GradleToolWindowFactory"/>
|
||||
|
||||
@@ -348,7 +348,7 @@ public class GradleConfigurable implements SearchableConfigurable, Configurable.
|
||||
|
||||
GradleSettings settings = myHelper.getSettings(myProject);
|
||||
|
||||
if (!Comparing.equal(myLinkedGradleProjectPathField.getText(), settings.getLinkedProjectPath())) {
|
||||
if (!Comparing.equal(normalizePath(myLinkedGradleProjectPathField.getText()), normalizePath(settings.getLinkedProjectPath()))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -362,16 +362,21 @@ public class GradleConfigurable implements SearchableConfigurable, Configurable.
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!Comparing.equal(myGradleHomePathField.getText(), settings.getGradleHome())) {
|
||||
if (myGradleHomeModifiedByUser) {
|
||||
useNormalColorForPath();
|
||||
}
|
||||
if (myGradleHomeModifiedByUser &&
|
||||
!Comparing.equal(normalizePath(myGradleHomePathField.getText()), normalizePath(settings.getGradleHome())))
|
||||
{
|
||||
useNormalColorForPath();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private static String normalizePath(@Nullable String s) {
|
||||
return StringUtil.isEmpty(s) ? null : s;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void apply() {
|
||||
if (myProject == null) {
|
||||
|
||||
Reference in New Issue
Block a user