From 86da2eb8bed18cb441b4b8ffb5019514ddd07b44 Mon Sep 17 00:00:00 2001 From: Laszlo Kishalmi Date: Mon, 2 Oct 2023 18:22:00 -0700 Subject: [PATCH] Removed a few defunct Gradle Settings --- extide/gradle/apichanges.xml | 15 +++ extide/gradle/manifest.mf | 2 +- .../gradle/api/execute/GradleCommandLine.java | 1 - .../modules/gradle/loaders/GradleDaemon.java | 16 --- .../modules/gradle/options/Bundle.properties | 4 - .../options/GradleOptionsController.java | 6 - .../modules/gradle/options/SettingsPanel.form | 111 ++++++------------ .../modules/gradle/options/SettingsPanel.java | 106 ++++++----------- .../modules/gradle/spi/GradleSettings.java | 41 +++++-- 9 files changed, 125 insertions(+), 177 deletions(-) diff --git a/extide/gradle/apichanges.xml b/extide/gradle/apichanges.xml index 219ebd3c0bbe..989bf242501a 100644 --- a/extide/gradle/apichanges.xml +++ b/extide/gradle/apichanges.xml @@ -83,6 +83,21 @@ is the proper place. + + + Some Gradle Settings Removed from Use + + + + + +

+ Setting the following properties: startDaemonOnStart, silentInstall, and noRebuild are + no longer in use. Their setters are no-ops,their getters returning false. +

+
+ +
Method to set the Gradle version when initalizing the wrapper diff --git a/extide/gradle/manifest.mf b/extide/gradle/manifest.mf index 95a1b8343ada..74f8a8e253eb 100644 --- a/extide/gradle/manifest.mf +++ b/extide/gradle/manifest.mf @@ -3,4 +3,4 @@ AutoUpdate-Show-In-Client: true OpenIDE-Module: org.netbeans.modules.gradle/2 OpenIDE-Module-Layer: org/netbeans/modules/gradle/layer.xml OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/gradle/Bundle.properties -OpenIDE-Module-Specification-Version: 2.35 +OpenIDE-Module-Specification-Version: 2.36 diff --git a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleCommandLine.java b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleCommandLine.java index 550a3e42304b..9b61766af68d 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleCommandLine.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/api/execute/GradleCommandLine.java @@ -1126,7 +1126,6 @@ public static GradleCommandLine getDefaultCommandLine() { ret.setFlag(Flag.OFFLINE, settings.isOffline()); ret.setFlag(Flag.CONFIGURE_ON_DEMAND, settings.isConfigureOnDemand()); - ret.setFlag(Flag.NO_REBUILD, settings.getNoRebuild()); ret.setFlag(Flag.CONFIGURATION_CACHE, settings.getUseConfigCache()); ret.setLogLevel(settings.getDefaultLogLevel()); diff --git a/extide/gradle/src/org/netbeans/modules/gradle/loaders/GradleDaemon.java b/extide/gradle/src/org/netbeans/modules/gradle/loaders/GradleDaemon.java index 5f2fab8b6294..a068117a5b3a 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/loaders/GradleDaemon.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/loaders/GradleDaemon.java @@ -21,7 +21,6 @@ import org.netbeans.modules.gradle.api.NbGradleProject; import org.netbeans.modules.gradle.api.execute.GradleCommandLine; -import org.netbeans.modules.gradle.spi.GradleSettings; import java.io.File; import java.io.IOException; import java.nio.file.Files; @@ -38,9 +37,7 @@ import org.gradle.tooling.GradleConnectionException; import org.gradle.tooling.GradleConnector; import org.gradle.tooling.ProjectConnection; -import org.netbeans.modules.gradle.api.execute.GradleDistributionManager; import org.openide.modules.InstalledFileLocator; -import org.openide.modules.OnStart; import org.openide.modules.Places; import org.openide.util.RequestProcessor; @@ -67,19 +64,6 @@ public final class GradleDaemon { private GradleDaemon() {} - @OnStart - public static class Loader implements Runnable { - - @Override - public void run() { - GradleSettings settings = GradleSettings.getDefault(); - GradleDistributionManager dmgr = GradleDistributionManager.get(settings.getGradleUserHome()); - if ( settings.isStartDaemonOnStart() && dmgr.defaultDistribution().isAvailable()) { - GRADLE_LOADER_RP.submit(GradleDaemon::doLoadDaemon); - } - } - } - public static String initScript() { File initScript = Places.getCacheSubfile("gradle/nb-tooling.gradle"); //NOI18N synchronized (initScriptReady) { diff --git a/extide/gradle/src/org/netbeans/modules/gradle/options/Bundle.properties b/extide/gradle/src/org/netbeans/modules/gradle/options/Bundle.properties index 9ef4ddbf665e..ade99a9cdb88 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/options/Bundle.properties +++ b/extide/gradle/src/org/netbeans/modules/gradle/options/Bundle.properties @@ -35,7 +35,6 @@ SettingsPanel.cbSkipCheck.text=Skip 'check' for non-test Related Executions SettingsPanel.cbSkipTest.text=Skip 'test' for non-test Related Executions SettingsPanel.cbConfigureOnDemand.text=Configure on Demand SettingsPanel.cbPreferWrapper.text=Prefer to use Gradle Wrapper that Comes with the Project -SettingsPanel.cbStartDaemonOnStart.text=Start Gradle Daemon on IDE Start SettingsPanel.lbVersionInfo.text= SettingsPanel.cbHideEmptyConfig.text=Hide 'Empty' Configurations SettingsPanel.cbAlwaysShowOutput.text=Always Show Build Output @@ -52,13 +51,10 @@ SettingsPanel.lbDownloadSources.text=Download Sources Along with the Dependencie SettingsPanel.lbDownloadJavadoc.text=Download JavaDoc Along with the Dependencies SettingsPanel.cbDownloadJavadoc.toolTipText=Not implemented yet. SettingsPanel.cbDownloadSources.toolTipText=Not implemented yet. -SettingsPanel.cbSilentInstall.text=Install Gradle Runtime Silently SettingsPanel.btDefaultHome.text=Default SettingsPanel.lbAllowExecution.text=Allow Gradle Execution: SettingsPanel.cbBundledLoading.text=Load Projects in Bundles SettingsPanel.cbBundledLoading.toolTipText=Instead of loading sub-projects of a multi-project build individually, try fetch the sub-project details in one run. SettingsPanel.cbUseConfigCache.toolTipText=This is an incubating feature. Use with care! SettingsPanel.cbUseConfigCache.text=Use Configuration Cache -SettingsPanel.cbNoRebuild.text=Do not Rebuild Project Dependencies -SettingsPanel.cbNoRebuild.toolTipText=This option was removed in Gradle 8.0 as this can lead to wrong results.
\nNetBeans is going to remove it in version 20.
Use with caution! SettingsPanel.lbNetworkProxy.text=Network Proxy: diff --git a/extide/gradle/src/org/netbeans/modules/gradle/options/GradleOptionsController.java b/extide/gradle/src/org/netbeans/modules/gradle/options/GradleOptionsController.java index 2ed99a7ea260..2894f66710a2 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/options/GradleOptionsController.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/options/GradleOptionsController.java @@ -51,12 +51,6 @@ public void update() { @Override public void applyChanges() { getPanel().applyValues(); - if (GradleSettings.getDefault().isSilentInstall()) { - // If allowed, let's just install the required Gradle version. - GradleDistributionManager gdm = GradleDistributionManager.get(); - GradleDistribution dist = gdm.distributionFromVersion(GradleSettings.getDefault().getGradleVersion()); - dist.install(); - } } @Override diff --git a/extide/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.form b/extide/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.form index bae51bb90393..50f4b4dd90a5 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.form +++ b/extide/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.form @@ -41,7 +41,7 @@ - + @@ -72,7 +72,7 @@ - + @@ -154,7 +154,7 @@ - + @@ -188,7 +188,7 @@ - + @@ -200,11 +200,7 @@ - - - - - + @@ -256,9 +252,6 @@ - - - @@ -345,13 +338,6 @@ - - - - - - - @@ -367,13 +353,6 @@ - - - - - - - @@ -411,26 +390,27 @@ - - - - - - - - + + + + - - - - - - - - + + + + + + + + + + + + + @@ -450,13 +430,10 @@ - - - - - + + @@ -467,7 +444,7 @@ - + @@ -480,17 +457,10 @@ - - - - - - - - + - + @@ -504,20 +474,17 @@ - + - + - + - - - - + @@ -582,7 +549,7 @@ - + @@ -667,7 +634,7 @@ - + @@ -742,7 +709,7 @@ - + @@ -775,7 +742,7 @@ - + @@ -890,7 +857,7 @@ - + @@ -917,7 +884,7 @@ - + @@ -965,7 +932,7 @@ - + @@ -996,7 +963,7 @@ - + diff --git a/extide/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.java b/extide/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.java index fbc06af42098..7b1ad6d225d0 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/options/SettingsPanel.java @@ -109,18 +109,15 @@ private void initComponents() { rbUseCustomGradle = new javax.swing.JRadioButton(); tfUseCustomGradle = new javax.swing.JTextField(); btUseCustomGradle = new javax.swing.JButton(); - cbStartDaemonOnStart = new javax.swing.JCheckBox(); cbPreferWrapper = new javax.swing.JCheckBox(); lbVersionInfo = new javax.swing.JLabel(); - cbSilentInstall = new javax.swing.JCheckBox(); btDefaultHome = new javax.swing.JButton(); javax.swing.JPanel jPanel2 = new javax.swing.JPanel(); cbOffline = new javax.swing.JCheckBox(); - cbSkipTest = new javax.swing.JCheckBox(); - cbSkipCheck = new javax.swing.JCheckBox(); - cbUseConfigCache = new javax.swing.JCheckBox(); cbConfigureOnDemand = new javax.swing.JCheckBox(); - cbNoRebuild = new javax.swing.JCheckBox(); + cbUseConfigCache = new javax.swing.JCheckBox(); + cbSkipCheck = new javax.swing.JCheckBox(); + cbSkipTest = new javax.swing.JCheckBox(); lbAllowExecution = new javax.swing.JLabel(); cbAllowExecution = new javax.swing.JComboBox<>(); lbNetworkProxy = new javax.swing.JLabel(); @@ -184,7 +181,7 @@ public void valueChanged(javax.swing.event.ListSelectionEvent evt) { .addContainerGap() .addComponent(lblCategories) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(lstCategories, javax.swing.GroupLayout.DEFAULT_SIZE, 382, Short.MAX_VALUE) + .addComponent(lstCategories, javax.swing.GroupLayout.DEFAULT_SIZE, 386, Short.MAX_VALUE) .addContainerGap()) ); @@ -242,15 +239,11 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { } }); - org.openide.awt.Mnemonics.setLocalizedText(cbStartDaemonOnStart, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbStartDaemonOnStart.text")); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(cbPreferWrapper, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbPreferWrapper.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(lbVersionInfo, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.lbVersionInfo.text")); // NOI18N lbVersionInfo.setEnabled(false); - org.openide.awt.Mnemonics.setLocalizedText(cbSilentInstall, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbSilentInstall.text")); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(btDefaultHome, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.btDefaultHome.text")); // NOI18N btDefaultHome.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { @@ -272,7 +265,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(rbUseStandardGradle) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(cbGradleVersion, 0, 107, Short.MAX_VALUE)) + .addComponent(cbGradleVersion, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(rbUseCustomGradle) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) @@ -280,10 +273,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btUseCustomGradle, javax.swing.GroupLayout.DEFAULT_SIZE, 102, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() - .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(cbSilentInstall) - .addComponent(cbStartDaemonOnStart) - .addComponent(cbPreferWrapper)) + .addComponent(cbPreferWrapper) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(lblGradleUserHome) @@ -326,27 +316,21 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(btUseCustomGradle)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(cbPreferWrapper) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(cbStartDaemonOnStart) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(cbSilentInstall)) + .addContainerGap()) ); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.jPanel2.border.title"))); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(cbOffline, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbOffline.text")); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(cbSkipTest, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbSkipTest.text")); // NOI18N - - org.openide.awt.Mnemonics.setLocalizedText(cbSkipCheck, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbSkipCheck.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(cbConfigureOnDemand, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbConfigureOnDemand.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(cbUseConfigCache, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbUseConfigCache.text")); // NOI18N cbUseConfigCache.setToolTipText(org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbUseConfigCache.toolTipText")); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(cbConfigureOnDemand, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbConfigureOnDemand.text")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(cbSkipCheck, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbSkipCheck.text")); // NOI18N - org.openide.awt.Mnemonics.setLocalizedText(cbNoRebuild, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbNoRebuild.text")); // NOI18N - cbNoRebuild.setToolTipText(org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbNoRebuild.toolTipText")); // NOI18N + org.openide.awt.Mnemonics.setLocalizedText(cbSkipTest, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.cbSkipTest.text")); // NOI18N lbAllowExecution.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING); org.openide.awt.Mnemonics.setLocalizedText(lbAllowExecution, org.openide.util.NbBundle.getMessage(SettingsPanel.class, "SettingsPanel.lbAllowExecution.text")); // NOI18N @@ -363,22 +347,22 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(cbOffline) - .addComponent(cbConfigureOnDemand) - .addComponent(cbNoRebuild, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(cbUseConfigCache) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(cbSkipCheck, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(cbSkipTest, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) - .addGroup(jPanel2Layout.createSequentialGroup() - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(lbAllowExecution, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(lbNetworkProxy, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(cbConfigureOnDemand)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 107, Short.MAX_VALUE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) - .addComponent(cbNetworkProxy, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(cbAllowExecution, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(cbSkipCheck, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(cbSkipTest, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(jPanel2Layout.createSequentialGroup() + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(lbAllowExecution, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(lbNetworkProxy, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(cbNetworkProxy, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(cbAllowExecution, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addComponent(cbUseConfigCache)) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); @@ -392,11 +376,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cbSkipTest) - .addComponent(cbNoRebuild, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(cbConfigureOnDemand)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(cbConfigureOnDemand) - .addComponent(cbUseConfigCache)) + .addComponent(cbUseConfigCache) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cbAllowExecution, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) @@ -405,7 +387,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(cbNetworkProxy, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(lbNetworkProxy)) - .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addContainerGap(56, Short.MAX_VALUE)) ); javax.swing.GroupLayout pnlExecutionLayout = new javax.swing.GroupLayout(pnlExecution); @@ -426,7 +408,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(14, Short.MAX_VALUE)) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pnlCards.add(pnlExecution, "Execution"); @@ -477,7 +459,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(jPanel5Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(cbReuseEditorOnStackTrace, javax.swing.GroupLayout.DEFAULT_SIZE, 541, Short.MAX_VALUE) + .addComponent(cbReuseEditorOnStackTrace, javax.swing.GroupLayout.DEFAULT_SIZE, 581, Short.MAX_VALUE) .addComponent(cbReuseOutputTabs, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(cbAlwaysShowOutput, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) @@ -511,7 +493,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(216, Short.MAX_VALUE)) + .addContainerGap(214, Short.MAX_VALUE)) ); pnlCards.add(pnlAppearance, "Appearance"); @@ -547,7 +529,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(lbDownloadLibs, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(cbDownloadSources, 0, 238, Short.MAX_VALUE) + .addComponent(cbDownloadSources, 0, 251, Short.MAX_VALUE) .addComponent(cbDownloadLibs, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(cbDownloadJavadoc, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) @@ -584,7 +566,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(pnlDependenciesLayout.createSequentialGroup() .addContainerGap() .addComponent(jPanel8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(294, Short.MAX_VALUE)) + .addContainerGap(295, Short.MAX_VALUE)) ); pnlCards.add(pnlDependencies, "Dependencies"); @@ -600,7 +582,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addComponent(cbPreferMaven) - .addContainerGap(231, Short.MAX_VALUE)) + .addContainerGap(241, Short.MAX_VALUE)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -624,7 +606,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(pnlMavenLayout.createSequentialGroup() .addContainerGap() .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(354, Short.MAX_VALUE)) + .addContainerGap(357, Short.MAX_VALUE)) ); pnlCards.add(pnlMaven, "Maven"); @@ -650,7 +632,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addComponent(cbOpenLazy) .addComponent(cbEnableCache) .addComponent(cbBundledLoading)) - .addContainerGap(289, Short.MAX_VALUE)) + .addContainerGap(310, Short.MAX_VALUE)) ); jPanel7Layout.setVerticalGroup( jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -678,7 +660,7 @@ public void actionPerformed(java.awt.event.ActionEvent evt) { .addGroup(pnlExperimentalLayout.createSequentialGroup() .addContainerGap() .addComponent(jPanel7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) - .addContainerGap(300, Short.MAX_VALUE)) + .addContainerGap(301, Short.MAX_VALUE)) ); pnlCards.add(pnlExperimental, "Experimental"); @@ -783,11 +765,7 @@ public void setValues() { ? rbUseCustomGradle.getModel() : rbUseStandardGradle.getModel(); bgUsedDistribution.setSelected(bm, true); - cbStartDaemonOnStart.setSelected(settings.isStartDaemonOnStart()); - cbSilentInstall.setSelected(settings.isSilentInstall()); - cbOffline.setSelected(settings.isOffline()); - cbNoRebuild.setSelected(settings.getNoRebuild()); cbConfigureOnDemand.setSelected(settings.isConfigureOnDemand()); cbUseConfigCache.setSelected(settings.getUseConfigCache()); @@ -863,11 +841,7 @@ public void applyValues() { boolean useCustomGradle = bgUsedDistribution.getSelection() == rbUseCustomGradle.getModel(); settings.setUseCustomGradle(useCustomGradle); - settings.setStartDaemonOnStart(cbStartDaemonOnStart.isSelected()); - settings.setSilentInstall(cbSilentInstall.isSelected()); - settings.setOffline(cbOffline.isSelected()); - settings.setNoRebuild(cbNoRebuild.isSelected()); settings.setConfigureOnDemand(cbConfigureOnDemand.isSelected()); settings.setUseConfigCache(cbUseConfigCache.isSelected()); settings.setSkipCheck(cbSkipCheck.isSelected()); @@ -911,9 +885,6 @@ public boolean hasChanges() { boolean useCustomGradle = bgUsedDistribution.getSelection() == rbUseCustomGradle.getModel(); isChanged |= settings.useCustomGradle() != useCustomGradle; - isChanged |= settings.isStartDaemonOnStart() != cbStartDaemonOnStart.isSelected(); - isChanged |= settings.isSilentInstall() != cbSilentInstall.isSelected(); - isChanged |= settings.isOffline() != cbOffline.isSelected(); isChanged |= settings.isConfigureOnDemand() != cbConfigureOnDemand.isSelected(); isChanged |= settings.getUseConfigCache() != cbUseConfigCache.isSelected(); @@ -1005,17 +976,14 @@ private static String getDefaultGradleUserHome() { private javax.swing.JComboBox cbGradleVersion; private javax.swing.JCheckBox cbHideEmptyConfig; private javax.swing.JComboBox cbNetworkProxy; - private javax.swing.JCheckBox cbNoRebuild; private javax.swing.JCheckBox cbOffline; private javax.swing.JCheckBox cbOpenLazy; private javax.swing.JCheckBox cbPreferMaven; private javax.swing.JCheckBox cbPreferWrapper; private javax.swing.JCheckBox cbReuseEditorOnStackTrace; private javax.swing.JCheckBox cbReuseOutputTabs; - private javax.swing.JCheckBox cbSilentInstall; private javax.swing.JCheckBox cbSkipCheck; private javax.swing.JCheckBox cbSkipTest; - private javax.swing.JCheckBox cbStartDaemonOnStart; private javax.swing.JCheckBox cbUseConfigCache; private javax.swing.JLabel lbAllowExecution; private javax.swing.JLabel lbDownloadJavadoc; diff --git a/extide/gradle/src/org/netbeans/modules/gradle/spi/GradleSettings.java b/extide/gradle/src/org/netbeans/modules/gradle/spi/GradleSettings.java index 4e1703512c62..228398697220 100644 --- a/extide/gradle/src/org/netbeans/modules/gradle/spi/GradleSettings.java +++ b/extide/gradle/src/org/netbeans/modules/gradle/spi/GradleSettings.java @@ -96,13 +96,16 @@ public String toString() { public static final String PROP_PREFER_WRAPPER = "preferWrapper"; public static final String PROP_GRADLE_USER_HOME = "gradleUserHome"; + @Deprecated public static final String PROP_START_DAEMON_ON_START = "startDaemonOnStart"; public static final String PROP_REUSE_OUTPUT_TABS = "reuseOutputTabs"; public static final String PROP_USE_CUSTOM_GRADLE = "useCustomGradle"; public static final String PROP_GRADLE_VERSION = "gradleVersion"; + @Deprecated public static final String PROP_SILENT_INSTALL = "silentInstall"; public static final String PROP_OPT_OFFLINE = "offline"; + @Deprecated public static final String PROP_OPT_NO_REBUILD = "noRebuild"; public static final String PROP_OPT_USE_CONFIG_CACHE = "useConfigCache"; public static final String PROP_OPT_CONFIGURE_ON_DEMAND = "configureOnDemand"; @@ -182,12 +185,24 @@ public File getGradleUserHome() { return dir != null ? new File(dir) : new File(System.getProperty("user.home"), ".gradle"); //NOI18N } + /** + * Not in use. + * @param b + * @deprecated + */ + @Deprecated public void setSilentInstall(boolean b) { - getPreferences().putBoolean(PROP_SILENT_INSTALL, b); } + /** + * Not in use, returns {@code false}. + * + * @return + * @deprecated + */ + @Deprecated public boolean isSilentInstall() { - return getPreferences().getBoolean(PROP_SILENT_INSTALL, false); + return false; } public void setReuseOutputTabs(boolean b) { @@ -223,12 +238,23 @@ public boolean isAlwaysShowOutput() { return getPreferences().getBoolean(PROP_ALWAYS_SHOW_OUTPUT, true); } + /** + * Not in used. + * @param b + * @deprecated + */ + @Deprecated public void setStartDaemonOnStart(boolean b) { - getPreferences().putBoolean(PROP_START_DAEMON_ON_START, b); } + /** + * Not used, returns {@code false} + * @return + * @deprecated + */ + @Deprecated public boolean isStartDaemonOnStart() { - return getPreferences().getBoolean(PROP_START_DAEMON_ON_START, false); + return false; } public void setUseCustomGradle(boolean b) { @@ -269,11 +295,10 @@ public String getGradleVersion() { * available to keep binary compatibility, but would be un-effective. * * @param b - * @deprecated Do not use, could produce undesirable results. + * @deprecated Not in use, since version 2.36 (NB20) */ @Deprecated public void setNoRebuild(boolean b) { - getPreferences().putBoolean(PROP_OPT_NO_REBUILD, b); } /** @@ -282,11 +307,11 @@ public void setNoRebuild(boolean b) { * available to keep binary compatibility, but would return {@code false}. * * @return whether the {@code --no-rebuild} command line option should be set by default. - * @deprecated Do not use, could produce undesirable results. + * @deprecated Always returns {@code false}, since version 2.36 (NB20) */ @Deprecated public boolean getNoRebuild() { - return getPreferences().getBoolean(PROP_OPT_NO_REBUILD, false); + return false; } public void setUseConfigCache(boolean b) {