intentions ui cleanup
authorDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Thu, 29 Dec 2011 15:19:49 +0000 (19:19 +0400)
committerDmitry Avdeev <Dmitry.Avdeev@jetbrains.com>
Fri, 30 Dec 2011 11:02:58 +0000 (15:02 +0400)
platform/lang-impl/src/com/intellij/codeInsight/intention/impl/config/IntentionDescriptionPanel.form
platform/lang-impl/src/com/intellij/codeInsight/intention/impl/config/IntentionDescriptionPanel.java
platform/lang-impl/src/com/intellij/codeInsight/intention/impl/config/IntentionSettingsPanel.form

index cb666308bea700cbf30cca76e679f2b04e19e243..f778120a12973eb932553217a248e2c0e9aff7e6 100644 (file)
@@ -1,34 +1,13 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.intellij.codeInsight.intention.impl.config.IntentionDescriptionPanel">
   <grid id="d0bf1" binding="myPanel" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-    <margin top="0" left="0" bottom="0" right="0"/>
+    <margin top="0" left="5" bottom="0" right="0"/>
     <constraints>
       <xy x="26" y="23" width="498" height="354"/>
     </constraints>
     <properties/>
     <border type="none"/>
     <children>
-      <grid id="c496" layout-manager="GridLayoutManager" row-count="1" 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>
-          <grid row="1" 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>
-          <grid id="ed462" binding="myPoweredByPanel" layout-manager="BorderLayout" hgap="0" vgap="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/>
-            <clientProperties>
-              <BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent"/>
-            </clientProperties>
-            <border type="none" title-resource-bundle="messages/CodeInsightBundle" title-key="powered.by"/>
-            <children/>
-          </grid>
-        </children>
-      </grid>
       <grid id="596f2" layout-manager="GridLayoutManager" row-count="1" 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>
@@ -51,7 +30,7 @@
             <properties/>
             <border type="none"/>
             <children>
-              <component id="3f761" class="javax.swing.JEditorPane" binding="myDescriptionBrowser">
+              <component id="3f761" class="javax.swing.JEditorPane" binding="myDescriptionBrowser" custom-create="true">
                 <constraints/>
                 <properties>
                   <contentType value="text/html" noi18n="true"/>
       <grid id="3853d" layout-manager="GridLayoutManager" row-count="4" 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>
-          <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"/>
+          <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/>
         <clientProperties>
           <BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent"/>
         </clientProperties>
-        <border type="none" title-resource-bundle="messages/CodeInsightBundle" title-key="dialog.intention.settings.description.usage.example.title"/>
+        <border type="none"/>
         <children>
           <xy id="a6fdd" binding="myAfterPanel" layout-manager="XYLayout" hgap="-1" vgap="-1">
             <margin top="0" left="0" bottom="0" right="0"/>
@@ -95,7 +74,9 @@
             <constraints>
               <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
             </constraints>
-            <properties/>
+            <properties>
+              <text value="Before:"/>
+            </properties>
           </component>
           <component id="967ce" class="com.intellij.ui.TitledSeparator" binding="myAfterSeparator">
             <constraints>
             </constraints>
             <properties>
               <alignmentY value="0.2"/>
+              <text value="After:"/>
             </properties>
           </component>
         </children>
       </grid>
+      <grid id="2dd7d" layout-manager="GridLayoutManager" row-count="1" 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>
+          <grid row="2" 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>
+          <grid id="1048c" binding="myPoweredByPanel" layout-manager="BorderLayout" hgap="0" vgap="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/>
+            <clientProperties>
+              <BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent"/>
+            </clientProperties>
+            <border type="none" title-resource-bundle="messages/CodeInsightBundle" title-key="powered.by"/>
+            <children/>
+          </grid>
+        </children>
+      </grid>
     </children>
   </grid>
 </form>
index def771dcf3a90af83a26e001e8ed21e4d2129d7f..8ff483061ab6677e3d2b2f8a608052a691adb3f3 100644 (file)
@@ -139,6 +139,10 @@ public class IntentionDescriptionPanel {
     }
   }
 
+  private void createUIComponents() {
+    // TODO: place custom component creation code here
+  }
+
   private static void showUsages(final JPanel panel,
                                  final TitledSeparator separator,
                                  final List<IntentionUsagePanel> usagePanels,
@@ -181,7 +185,6 @@ public class IntentionDescriptionPanel {
         }
         usagePanel.reset(exampleUsage.getText(), fileType);
 
-        separator.setText(name);
         if (!reuse) {
           if (i == exampleUsages.length) {
             gb.gridwidth = GridBagConstraints.REMAINDER;
index bf0ce974d35ef06befd86909f28f3353a6303c85..d90f966ee4839451319e6f64853699d935c672b9 100644 (file)
@@ -30,8 +30,8 @@
             <border type="none"/>
             <children/>
           </grid>
-          <grid id="42207" layout-manager="GridLayoutManager" row-count="2" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
-            <margin top="5" left="5" bottom="5" right="5"/>
+          <grid id="42207" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
+            <margin top="0" left="0" bottom="0" right="5"/>
             <constraints>
               <splitpane position="left"/>
             </constraints>
               <xy id="c0963" binding="myTreePanel" layout-manager="XYLayout" hgap="-1" vgap="-1">
                 <margin top="0" left="0" bottom="0" right="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"/>
+                  <grid row="0" 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/>
               </xy>
-              <component id="6ba53" class="com.intellij.ui.TitledSeparator">
-                <constraints>
-                  <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
-                </constraints>
-                <properties>
-                  <text resource-bundle="messages/CodeInsightBundle" key="dialog.intention.settings.intention.list.title"/>
-                </properties>
-              </component>
             </children>
           </grid>
         </children>