incubator-flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ftho...@apache.org
Subject svn commit: r1418813 - in /incubator/flex/whiteboard/fthomas/developerToolSuite/trunk: org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/command/ org.apache.flex.utiliti...
Date Sun, 09 Dec 2012 02:42:19 GMT
Author: fthomas
Date: Sun Dec  9 02:42:18 2012
New Revision: 1418813

URL: http://svn.apache.org/viewvc?rev=1418813&view=rev
Log:
- prepared to auto launch ui relatively to the context

Added:
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/command/LaunchUICommand.as
      - copied, changed from r1418812, incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/command/StartHelperCommand.as
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/message/LaunchUIMessage.as
      - copied, changed from r1418809, incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/message/StartHelperMessage.as
Removed:
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/command/StartHelperCommand.as
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/message/StartHelperMessage.as
Modified:
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/config/SettingsContext.mxml
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml

Copied: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/command/LaunchUICommand.as
(from r1418812, incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/command/StartHelperCommand.as)
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/command/LaunchUICommand.as?p2=incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/command/LaunchUICommand.as&p1=incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/command/StartHelperCommand.as&r1=1418812&r2=1418813&rev=1418813&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/command/StartHelperCommand.as
(original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/command/LaunchUICommand.as
Sun Dec  9 02:42:18 2012
@@ -2,34 +2,37 @@ package org.apache.flex.utilities.develo
     import mx.logging.ILogger;
 
     import org.apache.flex.utilities.developerToolSuite.executor.domain.ISettingsModel;
-    import org.apache.flex.utilities.developerToolSuite.executor.domain.SettingModel;
     import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command.CommandCallBack;
-    import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command.CommandCallBackError;
     import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.ValidateAntPathMessage;
     import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.ValidateCygwinPathMessage;
     import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.ValidateJavaPathMessage;
     import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.ValidateMavenPathMessage;
     import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.util.LogUtil;
-    import org.apache.flex.utilities.developerToolSuite.infrastructure.message.StartHelperMessage;
+    import org.apache.flex.utilities.developerToolSuite.infrastructure.message.LaunchUIMessage;
     import org.apache.flex.utilities.developerToolSuite.presentation.graphic.settings.SettingsWindow;
     import org.spicefactory.parsley.core.context.Context;
 
-    public class StartHelperCommand {
+    public class LaunchUICommand {
 
-        private static var LOG:ILogger = LogUtil.getLogger(StartHelperCommand);
+        private static var LOG:ILogger = LogUtil.getLogger(LaunchUICommand);
 
         [Inject]
         public var context:Context;
 
         [Inject]
-        public var settings:SettingModel;
+        public var settings:ISettingsModel;
 
         [MessageDispatcher]
         public var dispatch:Function;
 
         public var callback:Function;
 
-        public function execute(msg:StartHelperMessage):void {
+        private var _javaCompleted:Boolean;
+        private var _antCompleted:Boolean;
+        private var _mavenCompleted:Boolean;
+        private var _cygwinCompleted:Boolean;
+
+        public function execute(msg:LaunchUIMessage):void {
 
             dispatch(new ValidateJavaPathMessage(settings.JAVA_HOME));
             dispatch(new ValidateAntPathMessage(settings.ANT_HOME));
@@ -37,28 +40,42 @@ package org.apache.flex.utilities.develo
             dispatch(new ValidateCygwinPathMessage(settings.CYGWIN_HOME));
         }
 
-        [CommandError]
-        public function validateJavaPathCommandError(error:CommandCallBackError, trigger:ValidateJavaPathMessage):void
{
-            openSettingsWindow()
-        }
-
-        [CommandError]
-        public function validateAntPathCommandError(error:CommandCallBackError, trigger:ValidateAntPathMessage):void
{
-            openSettingsWindow()
-        }
-
-        [CommandError]
-        public function validateMavenPathCommandError(error:CommandCallBackError, trigger:ValidateMavenPathMessage):void
{
-            openSettingsWindow()
-        }
-
-        [CommandError]
-        public function validateCygwinPathCommandError(error:CommandCallBackError, trigger:ValidateCygwinPathMessage):void
{
-            openSettingsWindow()
-        }
-
-        private function openSettingsWindow():void {
-            SettingsWindow.show(context);
+        [CommandComplete]
+        public function validateJavaPathCommandError(trigger:ValidateJavaPathMessage):void
{
+            _javaCompleted = true;
+            if(_antCompleted && _mavenCompleted && _cygwinCompleted)
+                launchUI();
+        }
+
+        [CommandComplete]
+        public function validateAntPathCommandError(trigger:ValidateAntPathMessage):void
{
+            _antCompleted = true;
+            if (_javaCompleted && _mavenCompleted && _cygwinCompleted)
+                launchUI();
+        }
+
+        [CommandComplete]
+        public function validateMavenPathCommandError(trigger:ValidateMavenPathMessage):void
{
+            _mavenCompleted = true;
+            if (_antCompleted && _javaCompleted && _cygwinCompleted)
+                launchUI();
+        }
+
+        [CommandComplete]
+        public function validateCygwinPathCommandError(trigger:ValidateCygwinPathMessage):void
{
+            _cygwinCompleted = true;
+            if (_antCompleted && _mavenCompleted && _javaCompleted)
+                launchUI();
+        }
+
+        private function launchUI():void {
+            with (settings) {
+                if (javaEnabled && antEnabled && mavenEnabled &&
cygwinEnabled) {
+                    // open last project or create project
+                } else {
+                    SettingsWindow.show(context);
+                }
+            }
             callback(CommandCallBack.DEFAULT_RESULT);
         }
     }

Copied: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/message/LaunchUIMessage.as
(from r1418809, incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/message/StartHelperMessage.as)
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/message/LaunchUIMessage.as?p2=incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/message/LaunchUIMessage.as&p1=incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/message/StartHelperMessage.as&r1=1418809&r2=1418813&rev=1418813&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/message/StartHelperMessage.as
(original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/message/LaunchUIMessage.as
Sun Dec  9 02:42:18 2012
@@ -1,6 +1,6 @@
 package org.apache.flex.utilities.developerToolSuite.infrastructure.message {
-    public class StartHelperMessage {
-        public function StartHelperMessage() {
+    public class LaunchUIMessage {
+        public function LaunchUIMessage() {
         }
     }
 }

Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/config/SettingsContext.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/config/SettingsContext.mxml?rev=1418813&r1=1418812&r2=1418813&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/config/SettingsContext.mxml
(original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/config/SettingsContext.mxml
Sun Dec  9 02:42:18 2012
@@ -23,14 +23,15 @@ limitations under the License.
         <parsley:DynamicObject type="{GeneralMenu}"/>
 
         <parsley:MapCommand type="{MenuActionCommand}"/>
-        <parsley:MapCommand type="{StartHelperCommand}"/>
+        <parsley:MapCommand type="{LaunchUICommand}"/>
 
         <menu:ApplicationMenuPM/>
     </fx:Declarations>
 
     <fx:Script><![CDATA[
+        import org.apache.flex.utilities.developerToolSuite.infrastructure.command.LaunchUICommand;
         import org.apache.flex.utilities.developerToolSuite.infrastructure.command.MenuActionCommand;
-        import org.apache.flex.utilities.developerToolSuite.infrastructure.command.StartHelperCommand;
+        import org.apache.flex.utilities.developerToolSuite.infrastructure.command.LaunchUICommand;
         import org.apache.flex.utilities.developerToolSuite.presentation.graphic.menu.GeneralMenu;
         ]]></fx:Script>
 </fx:Object>

Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml?rev=1418813&r1=1418812&r2=1418813&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml
(original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml
Sun Dec  9 02:42:18 2012
@@ -60,7 +60,7 @@ limitations under the License.
         import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.ValidateMavenPathMessage;
         import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.util.LogUtil;
         import org.apache.flex.utilities.developerToolSuite.infrastructure.event.ModalWindowEvent;
-        import org.apache.flex.utilities.developerToolSuite.infrastructure.message.StartHelperMessage;
+        import org.apache.flex.utilities.developerToolSuite.infrastructure.message.LaunchUIMessage;
         import org.apache.flex.utilities.developerToolSuite.presentation.config.SettingsContext;
         import org.apache.flex.utilities.developerToolSuite.presentation.graphic.menu.ApplicationMenu;
 
@@ -108,7 +108,7 @@ limitations under the License.
 
             LogUtil.getLogger(this).info('Application ready');
 
-            dispatch(new StartHelperMessage());
+            dispatch(new LaunchUIMessage());
         }
 
         [MessageHandler(selector='opened')]



Mime
View raw message