Hide whole completion options wrapper panels in completion settings

IDEA-CR-32838
This commit is contained in:
Kirill Smelov
2018-05-22 10:09:34 +03:00
parent bb61328163
commit eba3b6cc89
2 changed files with 7 additions and 5 deletions
@@ -160,7 +160,7 @@
</component>
</children>
</grid>
<grid id="e7f70" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="e7f70" binding="myCbOnCodeCompletionPanel" 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="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
@@ -192,7 +192,7 @@
</hspacer>
</children>
</grid>
<grid id="d12fa" layout-manager="GridLayoutManager" row-count="1" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<grid id="d12fa" binding="myCbOnSmartTypeCompletionPanel" 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="3" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
@@ -62,6 +62,8 @@ public class CodeCompletionPanel {
private JBRadioButton myAllLetters;
private JBLabel myBasicShortcut;
private JBLabel mySmartShortcut;
private JPanel myCbOnCodeCompletionPanel;
private JPanel myCbOnSmartTypeCompletionPanel;
public CodeCompletionPanel() {
ChangeListener updateCaseCheckboxes = __ -> {
@@ -106,9 +108,9 @@ public class CodeCompletionPanel {
}
);
hideOption(myCbOnSmartTypeCompletion, OptionId.COMPLETION_SMART_TYPE);
hideOption(myCbOnCodeCompletion, OptionId.AUTOCOMPLETE_ON_BASIC_CODE_COMPLETION);
if(!myCbOnSmartTypeCompletion.isVisible() && !myCbOnCodeCompletion.isVisible())
hideOption(myCbOnSmartTypeCompletionPanel, OptionId.COMPLETION_SMART_TYPE);
hideOption(myCbOnCodeCompletionPanel, OptionId.AUTOCOMPLETE_ON_BASIC_CODE_COMPLETION);
if(!myCbOnSmartTypeCompletionPanel.isVisible() && !myCbOnCodeCompletionPanel.isVisible())
myAutoInsertLabel.setVisible(false);
reset();