Skip to content

Commit

Permalink
Remove unused experimental settings (#7803)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwren authored Nov 20, 2024
1 parent 0c530b6 commit 72caf42
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 70 deletions.
3 changes: 0 additions & 3 deletions flutter-idea/src/io/flutter/FlutterBundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,7 @@ flutter.androidstudio.open.hide.notification.text=Hide
flutter.androidstudio.open.hide.notification.description=Hide notification until IDE restart

settings.try.out.features.still.under.development=Try out features still under development (a restart may be required)
settings.enable.android.gradle.sync=Enable code completion, navigation, etc. for Java / Kotlin (requires restart to do Gradle build)
settings.report.google.analytics=&Report usage information to Google Analytics
settings.enable.hot.ui=Enable Hot UI (an early preview of property editing in the outline view)
settings.enable.verbose.logging=Enable &verbose logging
settings.format.code.on.save=Format code on save
settings.organize.imports.on.save=Organize imports on save
Expand All @@ -202,7 +200,6 @@ settings.enable.bazel.hot.restart=Enable Bazel hot restart (refreshes generated
settings.allow.tests.in.sources=<html>Allow files ending with <b>_test.dart</b> to be recognized as tests
settings.allow.tests.tooltip=The directory must be marked as a sources root, such as <b>lib</b>.
settings.font.packages=Font Packages
settings.show.all.configs=Show all possible run configurations for apps or tests, even if a created configuration already exists
settings.show.all.configs.tooltip=If there is a defined run configuration to watch a specific test and one to just run it, show both.
settings.jcef.browser=Use JCEF browser to show embedded DevTools
settings.jcef.browser.tooltip=JCEF is a browser included in IntelliJ that is an alternative to using JxBrowser for showing embedded DevTools.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ public class FlutterSearchableOptionContributor extends SearchableOptionContribu
public void processOptions(@NotNull SearchableOptionProcessor processor) {
// Keep these in the same order as FlutterBundle.properties
add(processor, FlutterBundle.message("settings.try.out.features.still.under.development"));
add(processor, FlutterBundle.message("settings.enable.android.gradle.sync"));
// For some reason the word "report" is ignored by the search feature, but the other words work.
add(processor, FlutterBundle.message("settings.report.google.analytics"));
add(processor, FlutterBundle.message("settings.enable.hot.ui"));
add(processor, FlutterBundle.message("settings.enable.verbose.logging"));
add(processor, FlutterBundle.message("settings.format.code.on.save"));
add(processor, FlutterBundle.message("settings.organize.imports.on.save"));
Expand All @@ -32,7 +30,6 @@ public void processOptions(@NotNull SearchableOptionProcessor processor) {
add(processor, FlutterBundle.message("settings.allow.tests.in.sources"));
add(processor, FlutterBundle.message("settings.allow.tests.tooltip"));
add(processor, FlutterBundle.message("settings.font.packages"));
add(processor, FlutterBundle.message("settings.show.all.configs"));
add(processor, FlutterBundle.message("settings.show.all.configs.tooltip"));
add(processor, FlutterBundle.message("settings.enable.androi.gradle.sync.tooltip"));
add(processor, FlutterBundle.message("settings.experiments"));
Expand Down
31 changes: 2 additions & 29 deletions flutter-idea/src/io/flutter/sdk/FlutterSettingsConfigurable.form
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
</grid>
</children>
</grid>
<grid id="23e52" layout-manager="GridLayoutManager" row-count="5" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="23e52" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<grid row="5" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
Expand All @@ -240,36 +240,9 @@
<text resource-bundle="io/flutter/FlutterBundle" key="settings.try.out.features.still.under.development"/>
</properties>
</component>
<component id="33088" class="javax.swing.JCheckBox" binding="mySyncAndroidLibrariesCheckBox">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="io/flutter/FlutterBundle" key="settings.enable.android.gradle.sync"/>
<toolTipText resource-bundle="io/flutter/FlutterBundle" key="settings.enable.androi.gradle.sync.tooltip"/>
</properties>
</component>
<component id="33088" class="javax.swing.JCheckBox" binding="myEnableHotUiCheckBox">
<constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="io/flutter/FlutterBundle" key="settings.enable.hot.ui"/>
<toolTipText value="Experimental features to graphically edit Flutter build methods."/>
</properties>
</component>
<component id="e902c" class="javax.swing.JCheckBox" binding="myShowAllRunConfigurationsInContextCheckBox">
<constraints>
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="io/flutter/FlutterBundle" key="settings.show.all.configs"/>
<toolTipText resource-bundle="io/flutter/FlutterBundle" key="settings.show.all.configs.tooltip"/>
</properties>
</component>
<component id="909bb" class="javax.swing.JCheckBox" binding="myEnableJcefBrowserCheckBox">
<constraints>
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text resource-bundle="io/flutter/FlutterBundle" key="settings.jcef.browser"/>
Expand Down
35 changes: 0 additions & 35 deletions flutter-idea/src/io/flutter/sdk/FlutterSettingsConfigurable.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import com.intellij.execution.process.ProcessOutput;
import com.intellij.ide.actions.ShowSettingsUtilImpl;
import com.intellij.ide.actionsOnSave.ActionsOnSaveConfigurable;
import com.intellij.ide.browsers.BrowserLauncher;
import com.intellij.notification.Notification;
import com.intellij.notification.NotificationType;
import com.intellij.notification.Notifications;
Expand All @@ -30,7 +29,6 @@
import com.intellij.ui.DocumentAdapter;
import com.intellij.ui.components.ActionLink;
import com.intellij.ui.components.JBLabel;
import com.intellij.ui.components.labels.LinkLabel;
import com.intellij.util.PlatformIcons;
import icons.FlutterIcons;
import io.flutter.*;
Expand All @@ -48,8 +46,6 @@
import javax.swing.event.DocumentEvent;
import javax.swing.text.JTextComponent;
import java.awt.datatransfer.StringSelection;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.concurrent.Semaphore;

Expand All @@ -70,12 +66,8 @@ public class FlutterSettingsConfigurable implements SearchableConfigurable {
private JCheckBox myOrganizeImportsOnSaveCheckBox;
private JCheckBox myShowStructuredErrors;
private JCheckBox myIncludeAllStackTraces;
private JCheckBox mySyncAndroidLibrariesCheckBox;
private JCheckBox myEnableHotUiCheckBox;
private JCheckBox myEnableBazelHotRestartCheckBox;

private JCheckBox myShowAllRunConfigurationsInContextCheckBox;

private JCheckBox myEnableJcefBrowserCheckBox;

private JCheckBox myShowBuildMethodGuides;
Expand Down Expand Up @@ -143,13 +135,6 @@ protected void textChanged(@NotNull final DocumentEvent e) {
myShowStructuredErrors.addChangeListener(
(e) -> myIncludeAllStackTraces.setEnabled(myShowStructuredErrors.isSelected()));

// There are other experiments so it is alright to show the experiments
// panel even if the syncAndroidLibraries experiment is hidden.
// If there are only experiments available on Android studio then add back
// the following statement:
// experimentsPanel.setVisible(FlutterUtils.isAndroidStudio());
mySyncAndroidLibrariesCheckBox.setVisible(FlutterUtils.isAndroidStudio());

myEnableBazelHotRestartCheckBox.setVisible(WorkspaceCache.getInstance(myProject).isBazel());
}

Expand Down Expand Up @@ -228,14 +213,6 @@ public boolean isModified() {
return true;
}

if (settings.isSyncingAndroidLibraries() != mySyncAndroidLibrariesCheckBox.isSelected()) {
return true;
}

if (settings.isEnableHotUi() != myEnableHotUiCheckBox.isSelected()) {
return true;
}

if (settings.isEnableBazelHotRestart() != myEnableBazelHotRestartCheckBox.isSelected()) {
return true;
}
Expand All @@ -248,11 +225,6 @@ public boolean isModified() {
return true;
}

//noinspection RedundantIfStatement
if (settings.showAllRunConfigurationsInContext() != myShowAllRunConfigurationsInContextCheckBox.isSelected()) {
return true;
}

return settings.isEnableJcefBrowser() != myEnableJcefBrowserCheckBox.isSelected();
}

Expand Down Expand Up @@ -303,11 +275,8 @@ public void apply() throws ConfigurationException {
settings.setOpenInspectorOnAppLaunch(myOpenInspectorOnAppLaunchCheckBox.isSelected());
settings.setPerserveLogsDuringHotReloadAndRestart(myEnableLogsPreserveAfterHotReloadOrRestart.isSelected());
settings.setVerboseLogging(myEnableVerboseLoggingCheckBox.isSelected());
settings.setSyncingAndroidLibraries(mySyncAndroidLibrariesCheckBox.isSelected());
settings.setEnableHotUi(myEnableHotUiCheckBox.isSelected());
settings.setEnableBazelHotRestart(myEnableBazelHotRestartCheckBox.isSelected());
settings.setAllowTestsInSourcesRoot(myAllowTestsInSourcesRoot.isSelected());
settings.setShowAllRunConfigurationsInContext(myShowAllRunConfigurationsInContextCheckBox.isSelected());
settings.setFontPackages(myFontPackagesTextArea.getText());
settings.setEnableJcefBrowser(myEnableJcefBrowserCheckBox.isSelected());

Expand Down Expand Up @@ -368,17 +337,13 @@ public void reset() {
myOpenInspectorOnAppLaunchCheckBox.setSelected(settings.isOpenInspectorOnAppLaunch());
myEnableLogsPreserveAfterHotReloadOrRestart.setSelected(settings.isPerserveLogsDuringHotReloadAndRestart());
myEnableVerboseLoggingCheckBox.setSelected(settings.isVerboseLogging());
mySyncAndroidLibrariesCheckBox.setSelected(settings.isSyncingAndroidLibraries());

myEnableHotUiCheckBox.setSelected(settings.isEnableHotUi());

myEnableBazelHotRestartCheckBox.setSelected(settings.isEnableBazelHotRestart());
myAllowTestsInSourcesRoot.setSelected(settings.isAllowTestsInSourcesRoot());

myOrganizeImportsOnSaveCheckBox.setEnabled(myFormatCodeOnSaveCheckBox.isSelected());
myIncludeAllStackTraces.setEnabled(myShowStructuredErrors.isSelected());

myShowAllRunConfigurationsInContextCheckBox.setSelected(settings.showAllRunConfigurationsInContext());
myEnableJcefBrowserCheckBox.setSelected(settings.isEnableJcefBrowser());
myFontPackagesTextArea.setText(settings.getFontPackages());
}
Expand Down

0 comments on commit 72caf42

Please sign in to comment.