mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
MRI-2340 Manual fixes after converting all UI Designer forms to sources
GitOrigin-RevId: 8007d1f41deeb55bc6d0022eb637bf697e6f19b9
This commit is contained in:
committed by
intellij-monorepo-bot
parent
b5eb6d8e20
commit
5c3a0446ce
+1
-1
@@ -419,7 +419,7 @@ class IntroduceConstantDialog extends DialogWrapper {
|
||||
myCbDeleteVariable.setEnabled(false);
|
||||
myCbDeleteVariable.setSelected(true);
|
||||
}
|
||||
else if (myCbReplaceAll != null) {
|
||||
else {
|
||||
updateCbDeleteVariable();
|
||||
myCbReplaceAll.addItemListener(
|
||||
new ItemListener() {
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.openapi.ui.NamedConfigurable">
|
||||
<grid id="27dc6" binding="myWholePanel" 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>
|
||||
<xy x="20" y="20" width="244" height="83"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<grid id="5c267" binding="myOptionsPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
<grid id="24985" binding="myNamePanel" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children>
|
||||
<component id="49d71" class="com.intellij.ui.ErrorLabel" binding="myErrorLabel">
|
||||
<constraints>
|
||||
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties>
|
||||
<labelFor value="85a0f"/>
|
||||
<text resource-bundle="messages/CommonBundle" key="name.label.text"/>
|
||||
</properties>
|
||||
</component>
|
||||
<component id="85a0f" class="javax.swing.JTextField" binding="myNameField">
|
||||
<constraints>
|
||||
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
|
||||
<preferred-size width="150" height="-1"/>
|
||||
</grid>
|
||||
</constraints>
|
||||
<properties/>
|
||||
</component>
|
||||
<grid id="2b25e" binding="myTopRightPanel" layout-manager="BorderLayout" hgap="0" vgap="0">
|
||||
<constraints>
|
||||
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
<children/>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</children>
|
||||
</grid>
|
||||
</form>
|
||||
@@ -30,12 +30,12 @@ import java.lang.reflect.Method;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public abstract class NamedConfigurable<T> implements Configurable {
|
||||
private final JTextField myNameField;
|
||||
private final JPanel myNamePanel;
|
||||
private final JPanel myWholePanel;
|
||||
private final JPanel myOptionsPanel;
|
||||
private final JPanel myTopRightPanel;
|
||||
private final ErrorLabel myErrorLabel;
|
||||
private JTextField myNameField;
|
||||
private JPanel myNamePanel;
|
||||
private JPanel myWholePanel;
|
||||
private JPanel myOptionsPanel;
|
||||
private JPanel myTopRightPanel;
|
||||
private ErrorLabel myErrorLabel;
|
||||
private JComponent myOptionsComponent;
|
||||
private final boolean myNameEditable;
|
||||
private final @Nullable Runnable myUpdateTree;
|
||||
@@ -57,46 +57,12 @@ public abstract class NamedConfigurable<T> implements Configurable {
|
||||
@SuppressWarnings("unused")
|
||||
private NamedConfigurable(boolean fake) {
|
||||
this();
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
// DO NOT EDIT OR ADD ANY CODE HERE!
|
||||
myWholePanel = new JPanel();
|
||||
myWholePanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||
myOptionsPanel = new JPanel();
|
||||
myOptionsPanel.setLayout(new BorderLayout(0, 0));
|
||||
myWholePanel.add(myOptionsPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
null, null, null, 0, false));
|
||||
myNamePanel = new JPanel();
|
||||
myNamePanel.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||||
myWholePanel.add(myNamePanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
myErrorLabel = new ErrorLabel();
|
||||
this.$$$loadLabelText$$$(myErrorLabel, this.$$$getMessageFromBundle$$$("messages/CommonBundle", "name.label.text"));
|
||||
myNamePanel.add(myErrorLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null,
|
||||
null, 0, false));
|
||||
myNameField = new JTextField();
|
||||
myNamePanel.add(myNameField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,
|
||||
new Dimension(150, -1), null, 0, false));
|
||||
myTopRightPanel = new JPanel();
|
||||
myTopRightPanel.setLayout(new BorderLayout(0, 0));
|
||||
myNamePanel.add(myTopRightPanel, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
null, null, null, 0, false));
|
||||
myErrorLabel.setLabelFor(myNameField);
|
||||
}
|
||||
}
|
||||
|
||||
private static Method $$$cachedGetBundleMethod$$$ = null;
|
||||
|
||||
/** @noinspection ALL */
|
||||
private String $$$getMessageFromBundle$$$(String path, String key) {
|
||||
private String $$$getMessageFromBundle$$$(@NonNls String path, String key) {
|
||||
ResourceBundle bundle;
|
||||
try {
|
||||
Class<?> thisClass = this.getClass();
|
||||
@@ -182,6 +148,38 @@ public abstract class NamedConfigurable<T> implements Configurable {
|
||||
return myWholePanel;
|
||||
}
|
||||
|
||||
private void $$$setupUI$$$() {
|
||||
myWholePanel = new JPanel();
|
||||
myWholePanel.setLayout(new GridLayoutManager(2, 1, new Insets(0, 0, 0, 0), -1, -1));
|
||||
myOptionsPanel = new JPanel();
|
||||
myOptionsPanel.setLayout(new BorderLayout(0, 0));
|
||||
myWholePanel.add(myOptionsPanel, new GridConstraints(1, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
null, null, null, 0, false));
|
||||
myNamePanel = new JPanel();
|
||||
myNamePanel.setLayout(new GridLayoutManager(1, 3, new Insets(0, 0, 0, 0), -1, -1));
|
||||
myWholePanel.add(myNamePanel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
myErrorLabel = new ErrorLabel();
|
||||
this.$$$loadLabelText$$$(myErrorLabel, this.$$$getMessageFromBundle$$$("messages/CommonBundle", "name.label.text"));
|
||||
myNamePanel.add(myErrorLabel, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE,
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null,
|
||||
null, 0, false));
|
||||
myNameField = new JTextField();
|
||||
myNamePanel.add(myNameField, new GridConstraints(0, 1, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_HORIZONTAL,
|
||||
GridConstraints.SIZEPOLICY_WANT_GROW, GridConstraints.SIZEPOLICY_FIXED, null,
|
||||
new Dimension(150, -1), null, 0, false));
|
||||
myTopRightPanel = new JPanel();
|
||||
myTopRightPanel.setLayout(new BorderLayout(0, 0));
|
||||
myNamePanel.add(myTopRightPanel, new GridConstraints(0, 2, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_BOTH,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW,
|
||||
null, null, null, 0, false));
|
||||
myErrorLabel.setLabelFor(myNameField);
|
||||
}
|
||||
|
||||
private void ensureUiInitialized() {
|
||||
if (myWholePanel == null) {
|
||||
$$$setupUI$$$();
|
||||
|
||||
+14
-14
@@ -54,14 +54,14 @@ public final class RainbowDescriptionPanel extends JPanel implements OptionsPane
|
||||
private final JBLabel myLStop3;
|
||||
private final JBLabel myLStop4;
|
||||
private final JBLabel myLStop5;
|
||||
private final JBLabel[] myLStops = new JBLabel[]{myLStop1, myLStop2, myLStop3, myLStop4, myLStop5};
|
||||
private final JBLabel[] myLStops;
|
||||
|
||||
final ColorPanel myStop1;
|
||||
final ColorPanel myStop2;
|
||||
final ColorPanel myStop3;
|
||||
final ColorPanel myStop4;
|
||||
final ColorPanel myStop5;
|
||||
private final ColorPanel[] myStops = new ColorPanel[]{myStop1, myStop2, myStop3, myStop4, myStop5};
|
||||
private final ColorPanel[] myStops;
|
||||
|
||||
private final JBCheckBox myRainbow;
|
||||
private final JTextPane myInheritanceLabel;
|
||||
@@ -71,7 +71,14 @@ public final class RainbowDescriptionPanel extends JPanel implements OptionsPane
|
||||
public RainbowDescriptionPanel() {
|
||||
super(new BorderLayout());
|
||||
{
|
||||
createOverwritePanel();
|
||||
myOverwrittenPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
||||
JLabel iconLabel = new JLabel();
|
||||
iconLabel.setIcon(AllIcons.General.Warning);
|
||||
myOverwrittenPanel.add(iconLabel);
|
||||
myOverwrittenPanel.add(Box.createRigidArea(new JBDimension(5, 0)));
|
||||
JLabel overwrittenLabel = new JLabel(ApplicationBundle.message("rainbow.option.panel.overwritten.by.host"));
|
||||
myOverwrittenPanel.add(overwrittenLabel);
|
||||
myOverwrittenPanel.setVisible(false);
|
||||
}
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
@@ -166,6 +173,10 @@ public final class RainbowDescriptionPanel extends JPanel implements OptionsPane
|
||||
GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null,
|
||||
null, 0, false));
|
||||
}
|
||||
|
||||
myLStops = new JBLabel[]{myLStop1, myLStop2, myLStop3, myLStop4, myLStop5};
|
||||
myStops = new ColorPanel[]{myStop1, myStop2, myStop3, myStop4, myStop5};
|
||||
|
||||
add(myPanel, BorderLayout.CENTER);
|
||||
|
||||
setBorder(JBUI.Borders.empty(4, 0, 4, 4));
|
||||
@@ -268,17 +279,6 @@ public final class RainbowDescriptionPanel extends JPanel implements OptionsPane
|
||||
/** @noinspection ALL */
|
||||
public JComponent $$$getRootComponent$$$() { return myPanel; }
|
||||
|
||||
private void createOverwritePanel() {
|
||||
myOverwrittenPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));
|
||||
JLabel iconLabel = new JLabel();
|
||||
iconLabel.setIcon(AllIcons.General.Warning);
|
||||
myOverwrittenPanel.add(iconLabel);
|
||||
myOverwrittenPanel.add(Box.createRigidArea(new JBDimension(5, 0)));
|
||||
JLabel overwrittenLabel = new JLabel(ApplicationBundle.message("rainbow.option.panel.overwritten.by.host"));
|
||||
myOverwrittenPanel.add(overwrittenLabel);
|
||||
myOverwrittenPanel.setVisible(false);
|
||||
}
|
||||
|
||||
@Contract(pure = true)
|
||||
private static @NotNull String checkRightArrow(@NotNull String str) {
|
||||
return str.replaceAll("->", FontUtil.rightArrow(StartupUiUtil.getLabelFont()));
|
||||
|
||||
@@ -50,7 +50,7 @@ public final class StartBrowserPanel {
|
||||
private final JCheckBox myStartJavaScriptDebuggerCheckBox;
|
||||
|
||||
private final TextFieldWithBrowseButton myUrlField;
|
||||
private BrowserSelector myBrowserSelector;
|
||||
private final BrowserSelector myBrowserSelector;
|
||||
|
||||
private final JPanel myRoot;
|
||||
|
||||
@@ -58,9 +58,6 @@ public final class StartBrowserPanel {
|
||||
{
|
||||
myBrowserSelector = new BrowserSelector();
|
||||
myBrowserComboBox = (ComboboxWithBrowseButton)myBrowserSelector.getMainComponent();
|
||||
myBrowserComboBox.getComboBox().addActionListener(e -> {
|
||||
myStartJavaScriptDebuggerCheckBox.setEnabled(isDebugAllowed(myBrowserSelector.getSelected()));
|
||||
});
|
||||
}
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
@@ -114,6 +111,11 @@ public final class StartBrowserPanel {
|
||||
GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false));
|
||||
jBLabel1.setLabelFor(myUrlField);
|
||||
}
|
||||
|
||||
myBrowserComboBox.getComboBox().addActionListener(e -> {
|
||||
myStartJavaScriptDebuggerCheckBox.setEnabled(isDebugAllowed(myBrowserSelector.getSelected()));
|
||||
});
|
||||
|
||||
myStartJavaScriptDebuggerCheckBox.setVisible(JavaScriptDebuggerStarter.Util.hasStarters());
|
||||
myRoot.addAncestorListener(new AncestorListenerAdapter() {
|
||||
@Override
|
||||
|
||||
+1
-7
@@ -26,10 +26,6 @@ import java.util.ResourceBundle;
|
||||
public abstract class StandardVersionFilterComponent<T extends ChangeBrowserSettings> implements ChangesBrowserSettingsEditor<T> {
|
||||
private final JPanel myPanel;
|
||||
|
||||
protected JPanel getDatePanel() {
|
||||
return myDateFilterComponent.getPanel();
|
||||
}
|
||||
|
||||
protected Component getStandardPanel() {
|
||||
return myPanel;
|
||||
}
|
||||
@@ -43,7 +39,7 @@ public abstract class StandardVersionFilterComponent<T extends ChangeBrowserSett
|
||||
|
||||
private T mySettings;
|
||||
|
||||
public StandardVersionFilterComponent() {
|
||||
public StandardVersionFilterComponent(boolean showDateFilter) {
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
// >>> IMPORTANT!! <<<
|
||||
@@ -85,9 +81,7 @@ public abstract class StandardVersionFilterComponent<T extends ChangeBrowserSett
|
||||
GridConstraints.SIZEPOLICY_CAN_SHRINK | GridConstraints.SIZEPOLICY_CAN_GROW, null, null, null, 0,
|
||||
false));
|
||||
}
|
||||
}
|
||||
|
||||
public StandardVersionFilterComponent(boolean showDateFilter) {
|
||||
myDateFilterComponent.getPanel().setVisible(showDateFilter);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public class ExportEclipseProjectsDialog extends DialogWrapper {
|
||||
{
|
||||
moduleChooser = new ElementsChooser<>(true) {
|
||||
@Override
|
||||
protected String getItemText(final @NotNull java.lang.Module module) {
|
||||
protected String getItemText(final @NotNull Module module) {
|
||||
return module.getName();
|
||||
}
|
||||
};
|
||||
|
||||
+7
-6
@@ -71,24 +71,26 @@ public class GroovyExtractMethodDialog extends DialogWrapper {
|
||||
private final EditorTextField myNameField;
|
||||
private final JCheckBox myCbSpecifyType;
|
||||
private final JLabel myNameLabel;
|
||||
private MethodSignatureComponent mySignature;
|
||||
private final MethodSignatureComponent mySignature;
|
||||
private final ComboBoxVisibilityPanel<String> myVisibilityPanel;
|
||||
private final Splitter mySplitter;
|
||||
private final JCheckBox myForceReturnCheckBox;
|
||||
private GrParameterTablePanel myParameterTablePanel;
|
||||
private final Project myProject;
|
||||
private final GrParameterTablePanel myParameterTablePanel;
|
||||
|
||||
public GroovyExtractMethodDialog(InitialInfo info, PsiClass owner) {
|
||||
super(info.getProject(), true);
|
||||
|
||||
Project project = info.getProject();
|
||||
|
||||
{
|
||||
mySignature = new GrMethodSignatureComponent("", myProject);
|
||||
mySignature = new GrMethodSignatureComponent("", project);
|
||||
mySignature.setPreferredSize(JBUI.size(500, 100));
|
||||
mySignature.setMinimumSize(JBUI.size(500, 100));
|
||||
mySignature.setBorder(
|
||||
IdeBorderFactory.createTitledBorder(GroovyRefactoringBundle.message("signature.preview.border.title"), false));
|
||||
mySignature.setFocusable(false);
|
||||
|
||||
myNameField = new EditorTextField("", myProject, GroovyFileType.GROOVY_FILE_TYPE);
|
||||
myNameField = new EditorTextField("", project, GroovyFileType.GROOVY_FILE_TYPE);
|
||||
myVisibilityPanel = new GroovyComboboxVisibilityPanel();
|
||||
|
||||
String visibility = GroovyApplicationSettings.getInstance().EXTRACT_METHOD_VISIBILITY;
|
||||
@@ -172,7 +174,6 @@ public class GroovyExtractMethodDialog extends DialogWrapper {
|
||||
GridConstraints.SIZEPOLICY_CAN_GROW, GridConstraints.SIZEPOLICY_FIXED,
|
||||
null, null, null, 0, false));
|
||||
}
|
||||
myProject = info.getProject();
|
||||
myHelper = new ExtractMethodInfoHelper(info, "", owner, false);
|
||||
|
||||
myParameterTablePanel.init(myHelper);
|
||||
|
||||
+6
-5
@@ -56,7 +56,6 @@ public final class KotlinRunConfigurationEditor extends SettingsEditor<KotlinRun
|
||||
private JComponent anchor;
|
||||
|
||||
private final ConfigurationModuleSelector moduleSelector;
|
||||
private final Project project;
|
||||
|
||||
private ClassBrowser createApplicationClassBrowser(
|
||||
Project project,
|
||||
@@ -89,12 +88,10 @@ public final class KotlinRunConfigurationEditor extends SettingsEditor<KotlinRun
|
||||
}
|
||||
|
||||
public KotlinRunConfigurationEditor(Project project) {
|
||||
this.project = project;
|
||||
{
|
||||
mainClassEditorField = new LabeledComponent<>();
|
||||
mainClassEditorField.setComponent(ClassEditorField.createClassField(project, () -> moduleSelector.getModule(), VISIBILITY_CHECKER,
|
||||
createApplicationClassBrowser(project,
|
||||
() -> moduleSelector.getModule())));
|
||||
mainClassEditorField.setComponent(ClassEditorField.createClassField(project, () -> getModule(), VISIBILITY_CHECKER,
|
||||
createApplicationClassBrowser(project, () -> getModule())));
|
||||
}
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
@@ -180,6 +177,10 @@ public final class KotlinRunConfigurationEditor extends SettingsEditor<KotlinRun
|
||||
/** @noinspection ALL */
|
||||
public JComponent $$$getRootComponent$$$() { return mainPanel; }
|
||||
|
||||
private Module getModule() {
|
||||
return moduleSelector.getModule();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void applyEditorTo(@NotNull KotlinRunConfiguration configuration) {
|
||||
commonProgramParameters.applyTo(configuration);
|
||||
|
||||
+8
-6
@@ -56,12 +56,7 @@ public class ShellcheckOptionsPanel {
|
||||
myInspectionsChangeListener = inspectionsChangeListener;
|
||||
myDisabledInspections = disabledInspections;
|
||||
{
|
||||
myShellcheckDownloadLink = new ActionLink(ShBundle.message("sh.shellcheck.download.label.text"), e -> {
|
||||
ShShellcheckUtil.download(myProject,
|
||||
() -> myShellcheckSelector.setText(ShSettings.getShellcheckPath(myProject)),
|
||||
() -> myErrorLabel.setVisible(true));
|
||||
EditorNotifications.getInstance(myProject).updateAllNotifications();
|
||||
});
|
||||
myShellcheckDownloadLink = new ActionLink(ShBundle.message("sh.shellcheck.download.label.text"));
|
||||
|
||||
myInspectionsCheckboxPanel = new MultipleCheckboxOptionsPanel(new OptionAccessor() {
|
||||
@Override
|
||||
@@ -133,6 +128,13 @@ public class ShellcheckOptionsPanel {
|
||||
}
|
||||
myProject = ProjectUtil.getProject(getPanel());
|
||||
|
||||
myShellcheckDownloadLink.addActionListener(e -> {
|
||||
ShShellcheckUtil.download(myProject,
|
||||
() -> myShellcheckSelector.setText(ShSettings.getShellcheckPath(myProject)),
|
||||
() -> myErrorLabel.setVisible(true));
|
||||
EditorNotifications.getInstance(myProject).updateAllNotifications();
|
||||
});
|
||||
|
||||
myShellcheckSelector.addBrowseFolderListener(myProject, FileChooserDescriptorFactory.createSingleFileDescriptor()
|
||||
.withTitle(ShBundle.message("sh.shellcheck.path.label")));
|
||||
myShellcheckSelector.getTextField().getDocument().addDocumentListener(new DocumentAdapter() {
|
||||
|
||||
@@ -79,11 +79,7 @@ public class ShCodeStylePanel extends CodeStyleAbstractPanel {
|
||||
{
|
||||
myIndentField = new IntegerField(null, CodeStyleConstraints.MIN_INDENT_SIZE, CodeStyleConstraints.MAX_INDENT_SIZE);
|
||||
myTabField = new IntegerField(null, CodeStyleConstraints.MIN_TAB_SIZE, CodeStyleConstraints.MAX_TAB_SIZE);
|
||||
myShfmtDownloadLink = new ActionLink(ShBundle.message("sh.code.style.download.link"), e -> {
|
||||
ShFormatterDownloader.getInstance().download(myProject,
|
||||
() -> myShfmtPathSelector.setText(ShSettings.getShfmtPath(myProject)),
|
||||
() -> myErrorLabel.setVisible(true));
|
||||
});
|
||||
myShfmtDownloadLink = new ActionLink(ShBundle.message("sh.code.style.download.link"));
|
||||
}
|
||||
{
|
||||
// GUI initializer generated by IntelliJ IDEA GUI Designer
|
||||
@@ -239,9 +235,17 @@ public class ShCodeStylePanel extends CodeStyleAbstractPanel {
|
||||
panel5.add(spacer3, new GridConstraints(3, 1, 1, 1, GridConstraints.ANCHOR_CENTER, GridConstraints.FILL_VERTICAL, 1,
|
||||
GridConstraints.SIZEPOLICY_WANT_GROW, null, null, null, 0, false));
|
||||
}
|
||||
installPreviewPanel(myRightPanel);
|
||||
|
||||
myProject = ProjectUtil.getProject(getPanel());
|
||||
|
||||
myShfmtDownloadLink.addActionListener(e -> {
|
||||
ShFormatterDownloader.getInstance().download(myProject,
|
||||
() -> myShfmtPathSelector.setText(ShSettings.getShfmtPath(myProject)),
|
||||
() -> myErrorLabel.setVisible(true));
|
||||
});
|
||||
|
||||
installPreviewPanel(myRightPanel);
|
||||
|
||||
myShfmtPathSelector.addBrowseFolderListener(myProject, FileChooserDescriptorFactory.createSingleFileDescriptor()
|
||||
.withTitle(ShBundle.message("sh.code.style.choose.path")));
|
||||
myShfmtPathSelector.getTextField().getDocument().addDocumentListener(new DocumentAdapter() {
|
||||
|
||||
Reference in New Issue
Block a user