You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ft...@apache.org on 2012/12/09 03:14:09 UTC
svn commit: r1418809 - 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...
Author: fthomas
Date: Sun Dec 9 02:14:04 2012
New Revision: 1418809
URL: http://svn.apache.org/viewvc?rev=1418809&view=rev
Log:
- Created a CommandCallBack to type the custom async command results and errors in the parsley way.
- The properties window is now display at application launch if some required settings are missing
Added:
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
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBack.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBackError.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBackResult.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ICommandCallBack.as
Removed:
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/GetSettingsCommand.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.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/GeneralSettings.mxml
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/SettingsWindow.mxml
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/AbstractDBCommand.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/AbstractShellCommand.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/GetEnvironmentVariablesCommand.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/InitDBCommand.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateAntPathCommand.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateCygwinPathCommand.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateGitPathCommand.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateJavaPathCommand.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateMavenPathCommand.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateSvnPathCommand.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/config/ExecutorContext.mxml
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/ApplicationContext.mxml
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml
Added: 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/StartHelperCommand.as?rev=1418809&view=auto
==============================================================================
--- 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 (added)
+++ 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 Sun Dec 9 02:14:04 2012
@@ -0,0 +1,58 @@
+package org.apache.flex.utilities.developerToolSuite.infrastructure.command {
+ import mx.logging.ILogger;
+
+ import org.apache.flex.utilities.developerToolSuite.executor.domain.ISettingsModel;
+ import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command.CommandCallBackError;
+ import org.apache.flex.utilities.developerToolSuite.infrastructure.message.StartHelperMessage;
+ 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.presentation.graphic.settings.SettingsWindow;
+ import org.spicefactory.parsley.core.context.Context;
+
+ public class StartHelperCommand {
+
+ private static var LOG:ILogger = LogUtil.getLogger(StartHelperCommand);
+
+ [Inject]
+ public var context:Context;
+
+ [Inject]
+ public var settings:ISettingsModel;
+
+ [MessageDispatcher]
+ public var dispatch:Function;
+
+ public var callback:Function;
+
+ public function execute(msg:StartHelperMessage):void {
+
+ dispatch(new ValidateJavaPathMessage(settings.JAVA_HOME));
+ dispatch(new ValidateAntPathMessage(settings.ANT_HOME));
+ dispatch(new ValidateMavenPathMessage(settings.MAVEN_HOME));
+ dispatch(new ValidateCygwinPathMessage(settings.CYGWIN_HOME));
+ }
+
+ [CommandError]
+ public function validateJavaPathCommandError(error:CommandCallBackError, trigger:ValidateJavaPathMessage):void {
+ SettingsWindow.show(context);
+ }
+
+ [CommandError]
+ public function validateAntPathCommandError(error:CommandCallBackError, trigger:ValidateAntPathMessage):void {
+ SettingsWindow.show(context);
+ }
+
+ [CommandError]
+ public function validateMavenPathCommandError(error:CommandCallBackError, trigger:ValidateMavenPathMessage):void {
+ SettingsWindow.show(context);
+ }
+
+ [CommandError]
+ public function validateCygwinPathCommandError(error:CommandCallBackError, trigger:ValidateCygwinPathMessage):void {
+ SettingsWindow.show(context);
+ }
+ }
+}
Added: 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/StartHelperMessage.as?rev=1418809&view=auto
==============================================================================
--- 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 (added)
+++ 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 Sun Dec 9 02:14:04 2012
@@ -0,0 +1,6 @@
+package org.apache.flex.utilities.developerToolSuite.infrastructure.message {
+ public class StartHelperMessage {
+ public function StartHelperMessage() {
+ }
+ }
+}
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=1418809&r1=1418808&r2=1418809&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:14:04 2012
@@ -23,12 +23,14 @@ limitations under the License.
<parsley:DynamicObject type="{GeneralMenu}"/>
<parsley:MapCommand type="{MenuActionCommand}"/>
+ <parsley:MapCommand type="{StartHelperCommand}"/>
<menu:ApplicationMenuPM/>
</fx:Declarations>
<fx:Script><![CDATA[
import org.apache.flex.utilities.developerToolSuite.infrastructure.command.MenuActionCommand;
+ import org.apache.flex.utilities.developerToolSuite.infrastructure.command.StartHelperCommand;
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.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/GeneralSettings.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/graphic/settings/GeneralSettings.mxml?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/GeneralSettings.mxml (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/GeneralSettings.mxml Sun Dec 9 02:14:04 2012
@@ -22,7 +22,7 @@ limitations under the License.
xmlns:component="org.apache.flex.utilities.developerToolSuite.presentation.graphic.component.*"
xmlns:formitem="org.apache.flex.utilities.developerToolSuite.presentation.graphic.settings.formItem.*"
width="100%" height="100%"
- paddingTop="30" paddingLeft="30" paddingRight="30" verticalGap="12">
+ paddingTop="15" paddingLeft="30" paddingRight="30" verticalGap="12">
<fx:Declarations>
@@ -44,7 +44,7 @@ limitations under the License.
<mx:GridItem rowSpan="4">
<component:Frame label="{resourceManager.getString('SettingsWindow', 'TOOLS_PATH_LOCATION')}" skinClass="{FrameSkin}">
<component:layout>
- <s:VerticalLayout horizontalAlign="center" paddingRight="35"/>
+ <s:VerticalLayout horizontalAlign="center" paddingRight="40"/>
</component:layout>
<s:Form styleName="stackedForm">
<s:layout>
Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/SettingsWindow.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/graphic/settings/SettingsWindow.mxml?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/SettingsWindow.mxml (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/SettingsWindow.mxml Sun Dec 9 02:14:04 2012
@@ -21,7 +21,7 @@ limitations under the License.
xmlns:parsley="http://www.spicefactory.org/parsley"
xmlns:settings="org.apache.flex.utilities.developerToolSuite.presentation.graphic.settings.*"
title="{resourceManager.getString('Application', 'SETTINGS')}"
- width="100%" height="480"
+ width="100%" height="500"
addedToStage="addedToStageHandler(event)"
removedFromStage="removedFromStageHandler(event)"
close="closeWindow()">
@@ -66,13 +66,18 @@ limitations under the License.
import org.spicefactory.parsley.core.context.Context;
+ private static var __window:SettingsWindow;
+
public static function show(context:Context, modal:Boolean = true):SettingsWindow {
- var window:SettingsWindow = new SettingsWindow();
+ if (__window)
+ return __window;
+
+ __window = new SettingsWindow();
- context.viewManager.addViewRoot(window);
- PopUpManager.addPopUp(window, FlexGlobals.topLevelApplication as DisplayObject, modal);
- PopUpManager.centerPopUp(window);
- return window;
+ context.viewManager.addViewRoot(__window);
+ PopUpManager.addPopUp(__window, FlexGlobals.topLevelApplication as DisplayObject, modal);
+ PopUpManager.centerPopUp(__window);
+ return __window;
}
[Inject]
@@ -98,6 +103,7 @@ limitations under the License.
private function closeWindow():void{
PopUpManager.removePopUp(this);
dispatchEvent(new ModalWindowEvent(ModalWindowEvent.CLOSED));
+ __window = null;
}
]]></fx:Script>
</s:TitleWindow>
Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/AbstractDBCommand.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/AbstractDBCommand.as?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/AbstractDBCommand.as (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/AbstractDBCommand.as Sun Dec 9 02:14:04 2012
@@ -58,12 +58,12 @@ package org.apache.flex.utilities.develo
protected function result(result:SQLResult):void {
var resultMessage:String = (result.data != null) ? ObjectUtil.toString(result.data) : result.rowsAffected + " affected row(s)";
log.debug("Successfully executed shell: " + resultMessage);
- callback(resultMessage);
+ callback(new CommandCallBackResult(result));
}
protected function error(error:SQLError):void {
log.error("Error executing shell: " + ObjectUtil.toString(error));
- callback(error);
+ callback(new CommandCallBackError(error.message, error.detailID));
}
}
}
Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/AbstractShellCommand.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/AbstractShellCommand.as?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/AbstractShellCommand.as (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/AbstractShellCommand.as Sun Dec 9 02:14:04 2012
@@ -78,7 +78,7 @@ package org.apache.flex.utilities.develo
protected function IOErrorHandler(event:IOErrorEvent):void {
log.error(event.toString());
- error(event);
+ result(new CommandCallBackError(event.text, event.errorID));
}
protected function exitHandler(event:NativeProcessExitEvent):void {
@@ -86,12 +86,7 @@ package org.apache.flex.utilities.develo
removeShellListeners();
}
- protected function result(result:Object):void {
- shell.process.exit();
- callback(result);
- }
-
- protected function error(error:Object):void {
+ protected function result(error:ICommandCallBack):void {
shell.process.exit();
callback(error);
}
Added: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBack.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBack.as?rev=1418809&view=auto
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBack.as (added)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBack.as Sun Dec 9 02:14:04 2012
@@ -0,0 +1,6 @@
+package org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command {
+ public class CommandCallBack {
+ public static const DEFAULT_RESULT:ICommandCallBack = new CommandCallBackResult("Default Result Command");
+ public static const DEFAULT_ERROR:ICommandCallBack = new CommandCallBackError("Default Error Command");
+ }
+}
Added: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBackError.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBackError.as?rev=1418809&view=auto
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBackError.as (added)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBackError.as Sun Dec 9 02:14:04 2012
@@ -0,0 +1,8 @@
+package org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command {
+ public class CommandCallBackError extends Error implements ICommandCallBack{
+
+ public function CommandCallBackError(message:*, id:* = 0) {
+ super(message);
+ }
+ }
+}
Added: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBackResult.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBackResult.as?rev=1418809&view=auto
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBackResult.as (added)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/CommandCallBackResult.as Sun Dec 9 02:14:04 2012
@@ -0,0 +1,14 @@
+package org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command {
+ public class CommandCallBackResult implements ICommandCallBack{
+
+ private var _result:*;
+
+ public function CommandCallBackResult(result:*) {
+ _result = result;
+ }
+
+ public function get result():* {
+ return _result;
+ }
+ }
+}
Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/GetEnvironmentVariablesCommand.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/GetEnvironmentVariablesCommand.as?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/GetEnvironmentVariablesCommand.as (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/GetEnvironmentVariablesCommand.as Sun Dec 9 02:14:04 2012
@@ -19,6 +19,7 @@ package org.apache.flex.utilities.develo
import flash.utils.Dictionary;
import org.apache.flex.utilities.developerToolSuite.executor.domain.SettingModel;
+ import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.InitApplicationMessage;
public class GetEnvironmentVariablesCommand extends AbstractShellCommand {
@@ -27,7 +28,7 @@ package org.apache.flex.utilities.develo
private var _done:Boolean;
- public function execute():void {
+ public function execute(msg:InitApplicationMessage):void {
executeCommand();
}
@@ -57,7 +58,7 @@ package org.apache.flex.utilities.develo
var tuple:Array = row.split("=");
settings.environmentVariables[tuple[0]] = tuple[1];
}
- result(settings.environmentVariables);
+ result(new CommandCallBackResult(settings.environmentVariables));
}
override protected function outputDataHandler(event:ProgressEvent):void {
Added: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ICommandCallBack.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ICommandCallBack.as?rev=1418809&view=auto
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ICommandCallBack.as (added)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ICommandCallBack.as Sun Dec 9 02:14:04 2012
@@ -0,0 +1,4 @@
+package org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command {
+ public interface ICommandCallBack {
+ }
+}
Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/InitDBCommand.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/InitDBCommand.as?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/InitDBCommand.as (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/InitDBCommand.as Sun Dec 9 02:14:04 2012
@@ -27,6 +27,7 @@ package org.apache.flex.utilities.develo
import org.apache.flex.utilities.developerToolSuite.LocaleUtil;
import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.database.ApplicationDB;
+ import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.InitApplicationMessage;
import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.util.LogUtil;
public class InitDBCommand {
@@ -40,7 +41,7 @@ package org.apache.flex.utilities.develo
private static const SETTINGS_TABLE_SQL:String = "create table if not exists settings(id integer primary key autoincrement, name text, value text);";
private static var settingsDataSql:String;
- public function execute():void {
+ public function execute(msg:InitApplicationMessage):void {
_conn = new SQLConnection();
// The database file is in the application storage directory
Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateAntPathCommand.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateAntPathCommand.as?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateAntPathCommand.as (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateAntPathCommand.as Sun Dec 9 02:14:04 2012
@@ -50,7 +50,7 @@ package org.apache.flex.utilities.develo
if (!_msg.path) {
LOG.error("Path null, nothing to check, quit");
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
return;
}
@@ -58,12 +58,12 @@ package org.apache.flex.utilities.develo
file = new File(shell.formatPath(_msg.path));
if (!file.resolvePath("bin/ant.bat").exists) {
LOG.error("Error resolving ANT_HOME");
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
return;
}
} catch (err:Error) {
LOG.error(ObjectUtil.toString(err));
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
return;
}
;
@@ -89,9 +89,9 @@ package org.apache.flex.utilities.develo
_done = true;
if (output.indexOf("Apache Ant(TM) version") > -1) {
settings.antEnabled = true;
- result(true);
+ result(CommandCallBack.DEFAULT_RESULT);
} else {
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
}
}
Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateCygwinPathCommand.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateCygwinPathCommand.as?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateCygwinPathCommand.as (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateCygwinPathCommand.as Sun Dec 9 02:14:04 2012
@@ -53,7 +53,7 @@ package org.apache.flex.utilities.develo
if (!_msg.path) {
LOG.error("Path null, nothing to check, quit");
- callback(false);
+ callback(CommandCallBack.DEFAULT_ERROR);
return;
}
@@ -61,7 +61,7 @@ package org.apache.flex.utilities.develo
file = new File(NativeShellHelper.formatPath(_msg.path));
if (!file.resolvePath("Cygwin.bat").exists) {
LOG.error("Error resolving CYGWIN_HOME");
- callback(false);
+ callback(CommandCallBack.DEFAULT_ERROR);
return;
}
else {
@@ -70,12 +70,12 @@ package org.apache.flex.utilities.develo
}
} catch (err:Error) {
LOG.error("Ending Command with error: " + ObjectUtil.toString(err));
- callback(false);
+ callback(CommandCallBack.DEFAULT_ERROR);
return;
}
;
LOG.debug("Ending Command with result: " + file.nativePath);
- callback(true);
+ callback(CommandCallBack.DEFAULT_RESULT);
}
}
}
Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateGitPathCommand.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateGitPathCommand.as?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateGitPathCommand.as (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateGitPathCommand.as Sun Dec 9 02:14:04 2012
@@ -60,9 +60,9 @@ package org.apache.flex.utilities.develo
_done = true;
if (output.indexOf("git version") > -1) {
settings.gitEnabled = true;
- result(true);
+ result(CommandCallBack.DEFAULT_RESULT);
} else {
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
}
return;
Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateJavaPathCommand.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateJavaPathCommand.as?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateJavaPathCommand.as (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateJavaPathCommand.as Sun Dec 9 02:14:04 2012
@@ -50,7 +50,7 @@ package org.apache.flex.utilities.develo
if (!_msg.path) {
LOG.error("Path null, nothing to check, quit");
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
return;
}
@@ -58,12 +58,12 @@ package org.apache.flex.utilities.develo
file = new File(shell.formatPath(_msg.path));
if (!file.resolvePath("lib/tools.jar").exists) {
LOG.error("Error resolving JAVA_HOME");
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
return;
}
} catch (err:Error) {
LOG.error(ObjectUtil.toString(err));
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
return;
}
;
@@ -89,9 +89,9 @@ package org.apache.flex.utilities.develo
_done = true;
if (output.indexOf("1.6.") > -1) {
settings.javaEnabled = true;
- result(true);
+ result(CommandCallBack.DEFAULT_RESULT);
} else {
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
}
}
Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateMavenPathCommand.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateMavenPathCommand.as?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateMavenPathCommand.as (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateMavenPathCommand.as Sun Dec 9 02:14:04 2012
@@ -51,7 +51,7 @@ package org.apache.flex.utilities.develo
if (!_msg.path) {
LOG.error("Path null, nothing to check, quit");
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
return;
}
@@ -59,12 +59,12 @@ package org.apache.flex.utilities.develo
file = new File(shell.formatPath(_msg.path));
if (!file.resolvePath("bin/mvn.bat").exists) {
LOG.error("Error resolving ANT_HOME");
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
return;
}
} catch (err:Error) {
LOG.error(ObjectUtil.toString(err));
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
return;
}
;
@@ -91,9 +91,9 @@ package org.apache.flex.utilities.develo
if (output.indexOf("Apache Maven 3.") > -1) {
settings.mavenEnabled = true;
- result(true);
+ result(CommandCallBack.DEFAULT_RESULT);
} else {
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
}
}
Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateSvnPathCommand.as
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateSvnPathCommand.as?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateSvnPathCommand.as (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/command/ValidateSvnPathCommand.as Sun Dec 9 02:14:04 2012
@@ -60,9 +60,9 @@ package org.apache.flex.utilities.develo
_done = true;
if (output.indexOf("Subversion command-line client") > -1) {
settings.svnEnabled = true;
- result(true);
+ result(CommandCallBack.DEFAULT_RESULT);
} else {
- error(false);
+ result(CommandCallBack.DEFAULT_ERROR);
}
return;
Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/config/ExecutorContext.mxml
URL: http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/config/ExecutorContext.mxml?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/config/ExecutorContext.mxml (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/infrastructure/config/ExecutorContext.mxml Sun Dec 9 02:14:04 2012
@@ -27,8 +27,8 @@ limitations under the License.
<parsley:MapCommand messageType="{InitApplicationMessage}">
<parsley:CommandSequence>
<parsley:Command type="{InitDBCommand}"/>
- <parsley:Command type="{GetSettingsCommand}"/>
<parsley:Command type="{GetEnvironmentVariablesCommand}"/>
+ <parsley:Command type="{GetSettingsFromDBCommand}"/>
</parsley:CommandSequence>
</parsley:MapCommand>
@@ -43,13 +43,13 @@ limitations under the License.
<parsley:MapCommand type="{ValidateGitPathCommand}"/>
<parsley:MapCommand type="{ValidateCygwinPathCommand}"/>
- <domain:SettingModel/>
+ <domain:SettingModel id="applicationModel"/>
</fx:Declarations>
<fx:Script><![CDATA[
import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command.ChangeLanguageCommand;
import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command.GetEnvironmentVariablesCommand;
- import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command.GetSettingsCommand;
+ import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command.GetSettingsFromDBCommand;
import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command.InitDBCommand;
import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command.SaveSettingCommand;
import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command.SaveSettingsCommand;
Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/ApplicationContext.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/ApplicationContext.mxml?rev=1418809&r1=1418808&r2=1418809&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/ApplicationContext.mxml (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/ApplicationContext.mxml Sun Dec 9 02:14:04 2012
@@ -18,7 +18,8 @@ limitations under the License.
<fx:Object xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:parsley="http://www.spicefactory.org/parsley"
xmlns:menu="org.apache.flex.utilities.developerToolSuite.presentation.behavior.menu.*"
- xmlns:menuGraphic="org.apache.flex.utilities.developerToolSuite.presentation.graphic.menu.*">
+ xmlns:menuGraphic="org.apache.flex.utilities.developerToolSuite.presentation.graphic.menu.*"
+ xmlns:domain="org.apache.flex.utilities.developerToolSuite.executor.domain.*">
<fx:Declarations>
<menuGraphic:ApplicationMenu/>
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=1418809&r1=1418808&r2=1418809&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:14:04 2012
@@ -54,6 +54,11 @@ limitations under the License.
import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.ApplicationReadyMessage;
import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.InitApplicationMessage;
import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.SaveSettingMessage;
+ import org.apache.flex.utilities.developerToolSuite.infrastructure.message.StartHelperMessage;
+ 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.event.ModalWindowEvent;
import org.apache.flex.utilities.developerToolSuite.presentation.config.SettingsContext;
@@ -102,6 +107,35 @@ limitations under the License.
}
LogUtil.getLogger(this).info('Application ready');
+
+ dispatch(new StartHelperMessage());
+ }
+
+ [MessageHandler(selector='opened')]
+ public function modalWindowOpenedHandler(event:ModalWindowEvent):void {
+ menu = null;
+ }
+
+ [MessageHandler(selector='closed')]
+ public function modalWindowClosedHandler(event:ModalWindowEvent):void {
+ menu = applicationMenu;
+ }
+
+ private function closingHandler(event:Event):void {
+ dispatch(new SaveSettingMessage("appBounds", nativeWindow.x + "," + nativeWindow.y + "," + nativeWindow.width + "," + nativeWindow.height));
+ dispatch(new SaveSettingMessage("appDisplayState", nativeWindow.displayState));
+ }
+
+ public function execute():void {
+
+ dispatch(new ValidateJavaPathMessage(applicationSettings.JAVA_HOME));
+ dispatch(new ValidateAntPathMessage(applicationSettings.ANT_HOME));
+ dispatch(new ValidateMavenPathMessage(applicationSettings.MAVEN_HOME));
+ dispatch(new ValidateCygwinPathMessage(applicationSettings.CYGWIN_HOME));
+
+ /*var timer:Timer = new Timer(1000, 1);
+ timer.addEventListener(TimerEvent.TIMER_COMPLETE, timer_timerCompleteHandler);
+ timer.start();*/
}
private function addLog():void {
@@ -118,23 +152,9 @@ limitations under the License.
devLogger.level = LogEventLevel.ALL;
devLogger.includeCategory = true;
devLogger.includeLevel = true;
+ devLogger.includeTime = true;
devLogger.fieldSeparator = " -> ";
Log.addTarget(devLogger);
}
-
- [MessageHandler(selector='opened')]
- public function modalWindowOpenedHandler(event:ModalWindowEvent):void {
- menu = null;
- }
-
- [MessageHandler(selector='closed')]
- public function modalWindowClosedHandler(event:ModalWindowEvent):void {
- menu = applicationMenu;
- }
-
- private function closingHandler(event:Event):void {
- dispatch(new SaveSettingMessage("appBounds", nativeWindow.x + "," + nativeWindow.y + "," + nativeWindow.width + "," + nativeWindow.height));
- dispatch(new SaveSettingMessage("appDisplayState", nativeWindow.displayState));
- }
]]></fx:Script>
</s:WindowedApplication>