Browse Source

fix build action

ruki 8 years ago
parent
commit
d5a928c23e

+ 114 - 111
.idea/workspace.xml

@@ -26,45 +26,35 @@
   </component>
   <component name="FileEditorManager">
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="300">
-      <file leaf-file-name="plugin.xml" pinned="false" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/resources/META-INF/plugin.xml">
-          <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="362">
-              <caret line="58" column="0" lean-forward="false" selection-start-line="58" selection-start-column="0" selection-end-line="58" selection-end-column="0" />
-              <folding />
-            </state>
-          </provider>
-        </entry>
-      </file>
-      <file leaf-file-name="RunAction.kt" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/RunAction.kt">
+      <file leaf-file-name="BuildAction.kt" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/BuildAction.kt">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="513">
-              <caret line="38" column="92" lean-forward="false" selection-start-line="38" selection-start-column="92" selection-end-line="38" selection-end-column="92" />
+            <state relative-caret-position="374">
+              <caret line="31" column="9" lean-forward="true" selection-start-line="19" selection-start-column="0" selection-end-line="31" selection-end-column="9" />
               <folding>
-                <element signature="e#33#421#0" expanded="true" />
+                <element signature="e#33#379#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="XMakeRunner.kt" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/run/XMakeRunner.kt">
+      <file leaf-file-name="ProcessAdapter.class" pinned="false" current-in-tab="false">
+        <entry file="jar://$APPLICATION_HOME_DIR$/lib/util.jar!/com/intellij/execution/process/ProcessAdapter.class">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="120">
-              <caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
+            <state relative-caret-position="105">
+              <caret line="10" column="11" lean-forward="false" selection-start-line="10" selection-start-column="11" selection-end-line="10" selection-end-column="11" />
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="BuildAction.kt" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/BuildAction.kt">
+      <file leaf-file-name="ConsoleProcessHandler.kt" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/utils/ConsoleProcessHandler.kt">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="165">
-              <caret line="11" column="0" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="18" selection-end-column="29" />
+            <state relative-caret-position="237">
+              <caret line="21" column="8" lean-forward="true" selection-start-line="14" selection-start-column="0" selection-end-line="21" selection-end-column="8" />
               <folding>
-                <element signature="e#33#275#0" expanded="true" />
+                <element signature="e#31#379#0" expanded="true" />
               </folding>
             </state>
           </provider>
@@ -73,10 +63,10 @@
       <file leaf-file-name="SystemUtils.kt" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/utils/SystemUtils.kt">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="516">
-              <caret line="126" column="34" lean-forward="true" selection-start-line="126" selection-start-column="34" selection-end-line="126" selection-end-column="58" />
+            <state relative-caret-position="227">
+              <caret line="136" column="0" lean-forward="false" selection-start-line="136" selection-start-column="0" selection-end-line="136" selection-end-column="0" />
               <folding>
-                <element signature="e#31#530#0" expanded="true" />
+                <element signature="e#31#588#0" expanded="true" />
               </folding>
             </state>
           </provider>
@@ -97,10 +87,22 @@
       <file leaf-file-name="RebuildAction.kt" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/RebuildAction.kt">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="270">
-              <caret line="18" column="29" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="18" selection-end-column="29" />
+            <state relative-caret-position="277">
+              <caret line="31" column="9" lean-forward="true" selection-start-line="19" selection-start-column="0" selection-end-line="31" selection-end-column="9" />
               <folding>
-                <element signature="e#33#275#0" expanded="true" />
+                <element signature="e#33#379#0" expanded="true" />
+              </folding>
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="RunAction.kt" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/RunAction.kt">
+          <provider selected="true" editor-type-id="text-editor">
+            <state relative-caret-position="281">
+              <caret line="37" column="67" lean-forward="false" selection-start-line="37" selection-start-column="67" selection-end-line="37" selection-end-column="67" />
+              <folding>
+                <element signature="e#33#525#0" expanded="true" />
               </folding>
             </state>
           </provider>
@@ -109,34 +111,34 @@
       <file leaf-file-name="CleanAction.kt" pinned="false" current-in-tab="false">
         <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/CleanAction.kt">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="375">
-              <caret line="25" column="19" lean-forward="false" selection-start-line="25" selection-start-column="19" selection-end-line="25" selection-end-column="19" />
+            <state relative-caret-position="97">
+              <caret line="19" column="0" lean-forward="true" selection-start-line="19" selection-start-column="0" selection-end-line="31" selection-end-column="9" />
               <folding>
-                <element signature="e#33#275#0" expanded="true" />
+                <element signature="e#33#379#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="CleanConfigurationAction.kt" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/CleanConfigurationAction.kt">
+      <file leaf-file-name="XMakeProjectTasksRunner.kt" pinned="false" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/run/XMakeProjectTasksRunner.kt">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="270">
-              <caret line="18" column="26" lean-forward="false" selection-start-line="18" selection-start-column="26" selection-end-line="18" selection-end-column="26" />
+            <state relative-caret-position="50">
+              <caret line="16" column="15" lean-forward="false" selection-start-line="16" selection-start-column="15" selection-end-line="16" selection-end-column="15" />
               <folding>
-                <element signature="e#33#275#0" expanded="true" />
+                <element signature="e#29#531#0" expanded="true" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="XMakeProjectTasksRunner.kt" pinned="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/run/XMakeProjectTasksRunner.kt">
+      <file leaf-file-name="CleanConfigurationAction.kt" pinned="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/CleanConfigurationAction.kt">
           <provider selected="true" editor-type-id="text-editor">
-            <state relative-caret-position="345">
-              <caret line="24" column="9" lean-forward="true" selection-start-line="24" selection-start-column="9" selection-end-line="24" selection-end-column="9" />
+            <state relative-caret-position="270">
+              <caret line="18" column="26" lean-forward="false" selection-start-line="18" selection-start-column="26" selection-end-line="18" selection-end-column="26" />
               <folding>
-                <element signature="e#29#427#0" expanded="true" />
+                <element signature="e#33#275#0" expanded="true" />
               </folding>
             </state>
           </provider>
@@ -240,20 +242,20 @@
         <option value="$PROJECT_DIR$/src/org/tboox/xmake/project/XMakeToolWindowPanel.kt" />
         <option value="$PROJECT_DIR$/src/org/tboox/xmake/project/XMakeToolWindowProblemPanel.kt" />
         <option value="$PROJECT_DIR$/src/org/tboox/xmake/project/XMakeToolWindowFactory.kt" />
-        <option value="$PROJECT_DIR$/src/org/tboox/xmake/utils/SystemUtils.kt" />
         <option value="$PROJECT_DIR$/src/org/tboox/xmake/run/XMakeRunState.kt" />
         <option value="$PROJECT_DIR$/src/org/tboox/xmake/run/XMakeRunConfiguration.kt" />
         <option value="$PROJECT_DIR$/src/org/tboox/xmake/utils/ConsoleProcessHandler.kt" />
         <option value="$PROJECT_DIR$/src/org/tboox/xmake/shared/XMakeConfiguration.kt" />
         <option value="$PROJECT_DIR$/src/org/tboox/xmake/project/XMakeToolWindowOutputPanel.kt" />
-        <option value="$PROJECT_DIR$/src/org/tboox/xmake/actions/BuildAction.kt" />
-        <option value="$PROJECT_DIR$/src/org/tboox/xmake/actions/CleanAction.kt" />
         <option value="$PROJECT_DIR$/src/org/tboox/xmake/actions/CleanConfigurationAction.kt" />
         <option value="$PROJECT_DIR$/src/org/tboox/xmake/actions/QuickStartAction.kt" />
+        <option value="$PROJECT_DIR$/resources/META-INF/plugin.xml" />
+        <option value="$PROJECT_DIR$/src/org/tboox/xmake/utils/SystemUtils.kt" />
+        <option value="$PROJECT_DIR$/src/org/tboox/xmake/actions/BuildAction.kt" />
+        <option value="$PROJECT_DIR$/src/org/tboox/xmake/actions/CleanAction.kt" />
         <option value="$PROJECT_DIR$/src/org/tboox/xmake/actions/RebuildAction.kt" />
-        <option value="$PROJECT_DIR$/src/org/tboox/xmake/run/XMakeProjectTasksRunner.kt" />
         <option value="$PROJECT_DIR$/src/org/tboox/xmake/actions/RunAction.kt" />
-        <option value="$PROJECT_DIR$/resources/META-INF/plugin.xml" />
+        <option value="$PROJECT_DIR$/src/org/tboox/xmake/run/XMakeProjectTasksRunner.kt" />
       </list>
     </option>
   </component>
@@ -525,7 +527,7 @@
       <window_info id="Capture Analysis" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
       <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32907802" sideWeight="0.5031348" order="7" side_tool="true" content_ui="tabs" />
       <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.32907802" sideWeight="0.4968652" order="2" side_tool="false" content_ui="tabs" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.32907802" sideWeight="0.4968652" order="2" side_tool="false" content_ui="tabs" />
       <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
       <window_info id="Capture Tool" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
@@ -557,13 +559,6 @@
     <watches-manager />
   </component>
   <component name="editorHistoryManager">
-    <entry file="jar://$APPLICATION_HOME_DIR$/lib/openapi.jar!/com/intellij/openapi/ui/LabeledComponent.class">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="196">
-          <caret line="64" column="38" lean-forward="false" selection-start-line="64" selection-start-column="29" selection-end-line="64" selection-end-column="38" />
-        </state>
-      </provider>
-    </entry>
     <entry file="jar://$APPLICATION_HOME_DIR$/lib/openapi.jar!/com/intellij/execution/configurations/GeneralCommandLine.class">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="-94">
@@ -771,16 +766,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/project/XMakeToolWindowFactory.kt">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="137">
-          <caret line="28" column="31" lean-forward="false" selection-start-line="28" selection-start-column="31" selection-end-line="28" selection-end-column="31" />
-          <folding>
-            <element signature="e#33#307#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="jar://$APPLICATION_HOME_DIR$/lib/openapi.jar!/com/intellij/openapi/wm/ToolWindow.class">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="150">
@@ -847,16 +832,6 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/utils/ConsoleProcessHandler.kt">
-      <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="416">
-          <caret line="33" column="13" lean-forward="true" selection-start-line="33" selection-start-column="13" selection-end-line="33" selection-end-column="13" />
-          <folding>
-            <element signature="e#31#379#0" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
     <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/project/XMakeProjectConfigurable.kt">
       <provider selected="true" editor-type-id="text-editor">
         <state relative-caret-position="-2950">
@@ -887,50 +862,66 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/utils/SystemUtils.kt">
+    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/run/XMakeRunner.kt">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="516">
-          <caret line="126" column="34" lean-forward="true" selection-start-line="126" selection-start-column="34" selection-end-line="126" selection-end-column="58" />
-          <folding>
-            <element signature="e#31#530#0" expanded="true" />
-          </folding>
+        <state relative-caret-position="120">
+          <caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/run/XMakeProjectTasksRunner.kt">
+    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/project/XMakeToolWindowFactory.kt">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="345">
-          <caret line="24" column="9" lean-forward="true" selection-start-line="24" selection-start-column="9" selection-end-line="24" selection-end-column="9" />
+        <state relative-caret-position="245">
+          <caret line="19" column="66" lean-forward="false" selection-start-line="19" selection-start-column="66" selection-end-line="19" selection-end-column="66" />
           <folding>
-            <element signature="e#29#427#0" expanded="true" />
+            <element signature="e#33#307#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/run/XMakeRunner.kt">
+    <entry file="file://$PROJECT_DIR$/resources/META-INF/plugin.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="120">
-          <caret line="11" column="0" lean-forward="false" selection-start-line="11" selection-start-column="0" selection-end-line="11" selection-end-column="0" />
+        <state relative-caret-position="228">
+          <caret line="35" column="0" lean-forward="true" selection-start-line="35" selection-start-column="0" selection-end-line="35" selection-end-column="0" />
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/RebuildAction.kt">
+    <entry file="jar://$APPLICATION_HOME_DIR$/lib/util.jar!/com/intellij/execution/process/ProcessAdapter.class">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="270">
-          <caret line="18" column="29" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="18" selection-end-column="29" />
+        <state relative-caret-position="105">
+          <caret line="10" column="11" lean-forward="false" selection-start-line="10" selection-start-column="11" selection-end-line="10" selection-end-column="11" />
+          <folding />
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/utils/ConsoleProcessHandler.kt">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="237">
+          <caret line="21" column="8" lean-forward="true" selection-start-line="14" selection-start-column="0" selection-end-line="21" selection-end-column="8" />
           <folding>
-            <element signature="e#33#275#0" expanded="true" />
+            <element signature="e#31#379#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/QuickStartAction.kt">
+    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/utils/SystemUtils.kt">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="270">
-          <caret line="18" column="22" lean-forward="false" selection-start-line="18" selection-start-column="22" selection-end-line="18" selection-end-column="22" />
+        <state relative-caret-position="227">
+          <caret line="136" column="0" lean-forward="false" selection-start-line="136" selection-start-column="0" selection-end-line="136" selection-end-column="0" />
           <folding>
-            <element signature="e#33#275#0" expanded="true" />
+            <element signature="e#31#588#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/CleanAction.kt">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="97">
+          <caret line="19" column="0" lean-forward="true" selection-start-line="19" selection-start-column="0" selection-end-line="31" selection-end-column="9" />
+          <folding>
+            <element signature="e#33#379#0" expanded="true" />
           </folding>
         </state>
       </provider>
@@ -945,41 +936,53 @@
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/BuildAction.kt">
+    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/QuickStartAction.kt">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="165">
-          <caret line="11" column="0" lean-forward="true" selection-start-line="11" selection-start-column="0" selection-end-line="18" selection-end-column="29" />
+        <state relative-caret-position="270">
+          <caret line="18" column="22" lean-forward="false" selection-start-line="18" selection-start-column="22" selection-end-line="18" selection-end-column="22" />
           <folding>
             <element signature="e#33#275#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/CleanAction.kt">
+    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/RebuildAction.kt">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="375">
-          <caret line="25" column="19" lean-forward="false" selection-start-line="25" selection-start-column="19" selection-end-line="25" selection-end-column="19" />
+        <state relative-caret-position="277">
+          <caret line="31" column="9" lean-forward="true" selection-start-line="19" selection-start-column="0" selection-end-line="31" selection-end-column="9" />
           <folding>
-            <element signature="e#33#275#0" expanded="true" />
+            <element signature="e#33#379#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/RunAction.kt">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="513">
-          <caret line="38" column="92" lean-forward="false" selection-start-line="38" selection-start-column="92" selection-end-line="38" selection-end-column="92" />
+        <state relative-caret-position="281">
+          <caret line="37" column="67" lean-forward="false" selection-start-line="37" selection-start-column="67" selection-end-line="37" selection-end-column="67" />
           <folding>
-            <element signature="e#33#421#0" expanded="true" />
+            <element signature="e#33#525#0" expanded="true" />
           </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/resources/META-INF/plugin.xml">
+    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/actions/BuildAction.kt">
       <provider selected="true" editor-type-id="text-editor">
-        <state relative-caret-position="362">
-          <caret line="58" column="0" lean-forward="false" selection-start-line="58" selection-start-column="0" selection-end-line="58" selection-end-column="0" />
-          <folding />
+        <state relative-caret-position="374">
+          <caret line="31" column="9" lean-forward="true" selection-start-line="19" selection-start-column="0" selection-end-line="31" selection-end-column="9" />
+          <folding>
+            <element signature="e#33#379#0" expanded="true" />
+          </folding>
+        </state>
+      </provider>
+    </entry>
+    <entry file="file://$PROJECT_DIR$/src/org/tboox/xmake/run/XMakeProjectTasksRunner.kt">
+      <provider selected="true" editor-type-id="text-editor">
+        <state relative-caret-position="50">
+          <caret line="16" column="15" lean-forward="false" selection-start-line="16" selection-start-column="15" selection-end-line="16" selection-end-column="15" />
+          <folding>
+            <element signature="e#29#531#0" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>

+ 1 - 1
resources/META-INF/plugin.xml

@@ -32,7 +32,7 @@
 
     <!-- project configurations -->
     <projectConfigurable instance="org.tboox.xmake.project.XMakeProjectConfigurable" displayName="XMake" groupId="language"/>
-    <toolWindow id="XMake"  anchor="right" factoryClass="org.tboox.xmake.project.XMakeToolWindowFactory" icon="/icons/xmake_13x13.png"/>
+    <toolWindow id="XMake" anchor="bottom" factoryClass="org.tboox.xmake.project.XMakeToolWindowFactory" icon="/icons/xmake_13x13.png"/>
 
     <!-- run configurations -->
     <programRunner implementation="org.tboox.xmake.run.XMakeRunner"/>

+ 10 - 5
src/org/tboox/xmake/actions/BuildAction.kt

@@ -1,5 +1,7 @@
 package org.tboox.xmake.actions
 
+import com.intellij.execution.process.ProcessAdapter
+import com.intellij.execution.process.ProcessEvent
 import com.intellij.openapi.actionSystem.AnAction
 import com.intellij.openapi.actionSystem.AnActionEvent
 import org.tboox.xmake.project.xmakeConsoleView
@@ -16,14 +18,17 @@ class BuildAction : AnAction() {
         // clear console first
         project.xmakeConsoleView.clear()
 
-        // configure it first
+        // configure and build it
         val xmakeConfiguration = project.xmakeConfiguration
         if (xmakeConfiguration.changed) {
-            SystemUtils.runvInConsole(project, xmakeConfiguration.configurationCommandLine)
+            SystemUtils.runvInConsole(project, xmakeConfiguration.configurationCommandLine).addProcessListener(object: ProcessAdapter() {
+                override fun processTerminated(e: ProcessEvent) {
+                    SystemUtils.runvInConsole(project, xmakeConfiguration.buildCommandLine, false)
+                }
+            })
             xmakeConfiguration.changed = false
+        } else {
+            SystemUtils.runvInConsole(project, xmakeConfiguration.buildCommandLine)
         }
-
-        // build it
-        SystemUtils.runvInConsole(project, xmakeConfiguration.buildCommandLine)
     }
 }

+ 10 - 5
src/org/tboox/xmake/actions/CleanAction.kt

@@ -1,5 +1,7 @@
 package org.tboox.xmake.actions
 
+import com.intellij.execution.process.ProcessAdapter
+import com.intellij.execution.process.ProcessEvent
 import com.intellij.openapi.actionSystem.AnAction
 import com.intellij.openapi.actionSystem.AnActionEvent
 import org.tboox.xmake.project.xmakeConsoleView
@@ -16,14 +18,17 @@ class CleanAction : AnAction() {
         // clear console first
         project.xmakeConsoleView.clear()
 
-        // configure it first
+        // configure and clean it
         val xmakeConfiguration = project.xmakeConfiguration
         if (xmakeConfiguration.changed) {
-            SystemUtils.runvInConsole(project, xmakeConfiguration.configurationCommandLine)
+            SystemUtils.runvInConsole(project, xmakeConfiguration.configurationCommandLine).addProcessListener(object: ProcessAdapter() {
+                override fun processTerminated(e: ProcessEvent) {
+                    SystemUtils.runvInConsole(project, xmakeConfiguration.cleanCommandLine, false)
+                }
+            })
             xmakeConfiguration.changed = false
+        } else {
+            SystemUtils.runvInConsole(project, xmakeConfiguration.cleanCommandLine)
         }
-
-        // clean it
-        SystemUtils.runvInConsole(project, xmakeConfiguration.cleanCommandLine)
     }
 }

+ 10 - 5
src/org/tboox/xmake/actions/RebuildAction.kt

@@ -1,5 +1,7 @@
 package org.tboox.xmake.actions
 
+import com.intellij.execution.process.ProcessAdapter
+import com.intellij.execution.process.ProcessEvent
 import com.intellij.openapi.actionSystem.AnAction
 import com.intellij.openapi.actionSystem.AnActionEvent
 import org.tboox.xmake.project.xmakeConsoleView
@@ -16,14 +18,17 @@ class RebuildAction : AnAction() {
         // clear console first
         project.xmakeConsoleView.clear()
 
-        // configure it first
+        // configure and rebuild it
         val xmakeConfiguration = project.xmakeConfiguration
         if (xmakeConfiguration.changed) {
-            SystemUtils.runvInConsole(project, xmakeConfiguration.configurationCommandLine)
+            SystemUtils.runvInConsole(project, xmakeConfiguration.configurationCommandLine).addProcessListener(object: ProcessAdapter() {
+                override fun processTerminated(e: ProcessEvent) {
+                    SystemUtils.runvInConsole(project, xmakeConfiguration.rebuildCommandLine, false)
+                }
+            })
             xmakeConfiguration.changed = false
+        } else {
+            SystemUtils.runvInConsole(project, xmakeConfiguration.rebuildCommandLine)
         }
-
-        // rebuild it
-        SystemUtils.runvInConsole(project, xmakeConfiguration.rebuildCommandLine)
     }
 }

+ 10 - 5
src/org/tboox/xmake/actions/RunAction.kt

@@ -1,6 +1,8 @@
 package org.tboox.xmake.actions
 
 import com.intellij.execution.RunManager
+import com.intellij.execution.process.ProcessAdapter
+import com.intellij.execution.process.ProcessEvent
 import com.intellij.execution.ui.ConsoleViewContentType
 import com.intellij.openapi.actionSystem.AnAction
 import com.intellij.openapi.actionSystem.AnActionEvent
@@ -23,16 +25,19 @@ class RunAction : AnAction() {
             // clear console first
             project.xmakeConsoleView.clear()
 
-            // configure it first
+            // configure and run it
             val xmakeConfiguration = project.xmakeConfiguration
             if (xmakeConfiguration.changed) {
-                SystemUtils.runvInConsole(project, xmakeConfiguration.configurationCommandLine)
+                SystemUtils.runvInConsole(project, xmakeConfiguration.configurationCommandLine).addProcessListener(object: ProcessAdapter() {
+                    override fun processTerminated(e: ProcessEvent) {
+                        SystemUtils.runvInConsole(project, runConfiguration.runCommandLine, false)
+                    }
+                })
                 xmakeConfiguration.changed = false
+            } else {
+                SystemUtils.runvInConsole(project, runConfiguration.runCommandLine)
             }
 
-            // run it
-            SystemUtils.runvInConsole(project, runConfiguration.runCommandLine)
-
         } else {
 
             // show tips

+ 10 - 5
src/org/tboox/xmake/run/XMakeProjectTasksRunner.kt

@@ -1,6 +1,8 @@
 package org.tboox.xmake.run
 
 import com.intellij.execution.*
+import com.intellij.execution.process.ProcessAdapter
+import com.intellij.execution.process.ProcessEvent
 import com.intellij.execution.runners.ExecutionEnvironment
 import com.intellij.openapi.diagnostic.Logger
 import com.intellij.openapi.project.Project
@@ -17,15 +19,18 @@ class XMakeProjectTasksRunner : ProjectTaskRunner() {
         // clear console first
         project.xmakeConsoleView.clear()
 
-        // configure it first
+        // configure and build it
         val xmakeConfiguration = project.xmakeConfiguration
         if (xmakeConfiguration.changed) {
-            SystemUtils.runvInConsole(project, xmakeConfiguration.configurationCommandLine)
+            SystemUtils.runvInConsole(project, xmakeConfiguration.configurationCommandLine).addProcessListener(object: ProcessAdapter() {
+                override fun processTerminated(e: ProcessEvent) {
+                    SystemUtils.runvInConsole(project, xmakeConfiguration.buildCommandLine, false)
+                }
+            })
             xmakeConfiguration.changed = false
+        } else {
+            SystemUtils.runvInConsole(project, xmakeConfiguration.buildCommandLine)
         }
-
-        // build it
-        SystemUtils.runvInConsole(project, xmakeConfiguration.buildCommandLine)
     }
 
     override fun canRun(projectTask: ProjectTask): Boolean {

+ 19 - 5
src/org/tboox/xmake/utils/SystemUtils.kt

@@ -1,13 +1,14 @@
 package org.tboox.xmake.utils
 
 import com.intellij.execution.configurations.GeneralCommandLine
+import com.intellij.execution.process.ProcessHandler
+import com.intellij.execution.process.ProcessListener
 import com.intellij.openapi.util.SystemInfo
 import com.intellij.openapi.diagnostic.Logger
 import com.intellij.openapi.project.Project
 import org.tboox.xmake.project.xmakeConsoleView
 import org.tboox.xmake.project.xmakeOutputPanel
 import org.tboox.xmake.project.xmakeToolWindow
-import org.tboox.xmake.shared.xmakeConfiguration
 import java.io.BufferedReader
 import java.io.IOException
 import java.io.InputStreamReader
@@ -120,11 +121,24 @@ object SystemUtils {
     }
 
     // run process in console
-    fun runvInConsole(project: Project, commandLine: GeneralCommandLine) {
+    fun runvInConsole(project: Project, commandLine: GeneralCommandLine, showConsole: Boolean = true): ProcessHandler {
 
-        project.xmakeToolWindow.show {
-            project.xmakeOutputPanel.showPanel()
-            ConsoleProcessHandler(project.xmakeConsoleView, commandLine).startNotify()
+        // create handler
+        val handler = ConsoleProcessHandler(project.xmakeConsoleView, commandLine)
+        if (showConsole) {
+
+            // show tool window first
+            project.xmakeToolWindow.show {
+
+                // show output panel first
+                project.xmakeOutputPanel.showPanel()
+            }
         }
+
+        // start process
+        handler.startNotify()
+
+        // failed
+        return handler
     }
 }