diff --git a/platform/lang-impl/src/com/intellij/codeInsight/actions/LayoutCodeDialog.form b/platform/lang-impl/src/com/intellij/codeInsight/actions/LayoutCodeDialog.form
index b6e07f4c8a5b..3c6a16512e86 100644
--- a/platform/lang-impl/src/com/intellij/codeInsight/actions/LayoutCodeDialog.form
+++ b/platform/lang-impl/src/com/intellij/codeInsight/actions/LayoutCodeDialog.form
@@ -107,7 +107,7 @@
-
+
diff --git a/platform/lang-impl/src/com/intellij/codeInsight/actions/LayoutCodeDialog.java b/platform/lang-impl/src/com/intellij/codeInsight/actions/LayoutCodeDialog.java
index 6dc2971b800c..cd0a9c0890f2 100644
--- a/platform/lang-impl/src/com/intellij/codeInsight/actions/LayoutCodeDialog.java
+++ b/platform/lang-impl/src/com/intellij/codeInsight/actions/LayoutCodeDialog.java
@@ -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