Skip to content

Commit 9e7f08c

Browse files
committed
'Editor > Code Style' never loads In WebStorm 2017.3 (#120)
Opted to hide the unsupported tab indentation components since the existing solution appeared to prevent the form from loading in 2017.3.
1 parent ac938f4 commit 9e7f08c

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

src/main/com/intellij/lang/jsgraphql/ide/formatter/JSGraphQLLanguageCodeStyleSettingsProvider.java

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,11 @@
1010
import com.intellij.application.options.IndentOptionsEditor;
1111
import com.intellij.lang.Language;
1212
import com.intellij.lang.jsgraphql.JSGraphQLLanguage;
13-
import com.intellij.openapi.application.ApplicationBundle;
1413
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
1514
import com.intellij.psi.codeStyle.LanguageCodeStyleSettingsProvider;
1615
import org.jetbrains.annotations.NotNull;
1716
import org.jetbrains.annotations.Nullable;
1817

19-
import javax.swing.*;
20-
2118
public class JSGraphQLLanguageCodeStyleSettingsProvider extends LanguageCodeStyleSettingsProvider {
2219

2320
@NotNull
@@ -41,16 +38,10 @@ public CommonCodeStyleSettings getDefaultCommonSettings() {
4138
public IndentOptionsEditor getIndentOptionsEditor() {
4239
return new IndentOptionsEditor() {
4340
protected void addComponents() {
44-
addTabOptions();
45-
myTabSizeField = new JTextField();
46-
myTabSizeLabel = new JLabel();
47-
myIndentField = createIndentTextField();
48-
myIndentLabel = new JLabel(ApplicationBundle.message("editbox.indent.indent"));
49-
add(myIndentLabel, myIndentField);
50-
}
51-
52-
protected void addTabOptions() {
53-
myCbUseTab = new JCheckBox("");
41+
super.addComponents();
42+
myCbUseTab.setVisible(false);
43+
myTabSizeField.setVisible(false);
44+
myTabSizeLabel.setVisible(false);
5445
}
5546
};
5647
}

0 commit comments

Comments
 (0)