Show "Optional actions" label only if there are any (IDEA-136830)

This commit is contained in:
Yaroslav Lepenkin
2015-02-22 15:04:39 +03:00
parent 5bcf4c7f67
commit fae615a470
2 changed files with 4 additions and 1 deletions
@@ -107,7 +107,7 @@
<text value="Scope:"/>
</properties>
</component>
<component id="1fda7" class="javax.swing.JLabel">
<component id="1fda7" class="javax.swing.JLabel" binding="myOptionalLabel">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
@@ -51,6 +51,7 @@ public class LayoutCodeDialog extends DialogWrapper {
private JPanel myActionsPanel;
private JPanel myScopePanel;
private JLabel myOptionalLabel;
private LayoutCodeOptions myRunOptions;
@@ -127,6 +128,8 @@ public class LayoutCodeDialog extends DialogWrapper {
if (canRearrangeCode) {
myRearrangeCodeCb.setSelected(myLastRunOptions.isRearrangeCode(myFile.getLanguage()));
}
myOptionalLabel.setVisible(canOptimizeImports || canRearrangeCode);
}
@Nullable