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:17:43 UTC

svn commit: r1418810 - 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:17:40 2012
New Revision: 1418810

URL: http://svn.apache.org/viewvc?rev=1418810&view=rev
Log:
- optimized imports

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/GetSettingsFromDBCommand.as
Modified:
    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/event/ModalWindowEvent.as
    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/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/ValidateCygwinPathCommand.as
    incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml

Modified: 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=1418810&r1=1418809&r2=1418810&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/StartHelperCommand.as Sun Dec  9 02:17:40 2012
@@ -3,12 +3,12 @@ package org.apache.flex.utilities.develo
 
     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.infrastructure.message.StartHelperMessage;
     import org.apache.flex.utilities.developerToolSuite.presentation.graphic.settings.SettingsWindow;
     import org.spicefactory.parsley.core.context.Context;
 

Modified: incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/event/ModalWindowEvent.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/event/ModalWindowEvent.as?rev=1418810&r1=1418809&r2=1418810&view=diff
==============================================================================
--- incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/event/ModalWindowEvent.as (original)
+++ incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/infrastructure/event/ModalWindowEvent.as Sun Dec  9 02:17:40 2012
@@ -1,13 +1,13 @@
 package org.apache.flex.utilities.developerToolSuite.infrastructure.event {
     import flash.events.Event;
 
-    public class ModalWindowEvent extends Event{
+    public class ModalWindowEvent extends Event {
 
         public static const OPENED:String = "opened";
         public static const CLOSED:String = "closed";
 
         public function ModalWindowEvent(type:String) {
-            super (type);
+            super(type);
         }
     }
 }

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=1418810&r1=1418809&r2=1418810&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:17:40 2012
@@ -63,14 +63,14 @@ limitations under the License.
         import mx.managers.PopUpManager;
 
         import org.apache.flex.utilities.developerToolSuite.infrastructure.event.ModalWindowEvent;
-
         import org.spicefactory.parsley.core.context.Context;
 
         private static var __window:SettingsWindow;
 
         public static function show(context:Context, modal:Boolean = true):SettingsWindow {
-            if (__window)
+            if (__window) {
                 return __window;
+            }
 
             __window = new SettingsWindow();
 
@@ -100,7 +100,7 @@ limitations under the License.
             PopUpManager.centerPopUp(this);
         }
 
-        private function closeWindow():void{
+        private function closeWindow():void {
             PopUpManager.removePopUp(this);
             dispatchEvent(new ModalWindowEvent(ModalWindowEvent.CLOSED));
             __window = null;

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/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=1418810&r1=1418809&r2=1418810&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/CommandCallBackError.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/CommandCallBackError.as Sun Dec  9 02:17:40 2012
@@ -1,5 +1,5 @@
 package org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command {
-    public class CommandCallBackError extends Error implements ICommandCallBack{
+    public class CommandCallBackError extends Error implements ICommandCallBack {
 
         public function CommandCallBackError(message:*, id:* = 0) {
             super(message);

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/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=1418810&r1=1418809&r2=1418810&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/CommandCallBackResult.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/CommandCallBackResult.as Sun Dec  9 02:17:40 2012
@@ -1,5 +1,5 @@
 package org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command {
-    public class CommandCallBackResult implements ICommandCallBack{
+    public class CommandCallBackResult implements ICommandCallBack {
 
         private var _result:*;
 

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/GetSettingsFromDBCommand.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/GetSettingsFromDBCommand.as?rev=1418810&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/GetSettingsFromDBCommand.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/GetSettingsFromDBCommand.as Sun Dec  9 02:17:40 2012
@@ -0,0 +1,65 @@
+/**
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+package org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command {
+    import flash.data.SQLResult;
+
+    import mx.resources.ResourceManager;
+    import mx.utils.ObjectUtil;
+
+    import org.apache.flex.utilities.developerToolSuite.LocaleUtil;
+    import org.apache.flex.utilities.developerToolSuite.executor.domain.SettingModel;
+    import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.ApplicationReadyMessage;
+    import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.InitApplicationMessage;
+
+    public class GetSettingsFromDBCommand extends AbstractDBCommand {
+
+        [Inject]
+        public var settings:SettingModel;
+
+        public function execute(msg:InitApplicationMessage):void {
+            executeAsync();
+        }
+
+        override protected function prepareSql():void {
+            sql = "SELECT name, value FROM settings;";
+            super.prepareSql();
+        }
+
+        override protected function result(result:SQLResult):void {
+            var row:Object;
+
+            if (result.data) {
+                var numResults:int = result.data.length;
+                for (var i:int = 0; i < numResults; i++) {
+                    row = result.data[i];
+                    settings[row.name] = row.value;
+                }
+            }
+
+            if (settings.locale == null) {
+                settings.locale = LocaleUtil.getDefaultLanguage().data;
+            }
+            ResourceManager.getInstance().localeChain = LocaleUtil.getOrderedLocalChain(settings.locale);
+            dispatch(new ApplicationReadyMessage());
+
+            var resultMessage:String = (result.data != null) ? ObjectUtil.toString(result.data) : result.rowsAffected + " affected row(s)";
+            log.debug("Successfully executed shell: " + resultMessage);
+
+            callback(new CommandCallBackResult(settings));
+        }
+    }
+}

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=1418810&r1=1418809&r2=1418810&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:17:40 2012
@@ -15,7 +15,6 @@
  limitations under the License.
  */
 package org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command {
-    import flash.events.ProgressEvent;
     import flash.filesystem.File;
 
     import mx.logging.ILogger;
@@ -63,8 +62,7 @@ package org.apache.flex.utilities.develo
                     LOG.error("Error resolving CYGWIN_HOME");
                     callback(CommandCallBack.DEFAULT_ERROR);
                     return;
-                }
-                else {
+                } else {
                     LOG.debug("Resolved CYGWIN_HOME");
                     settings.cygwinEnabled = true;
                 }

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=1418810&r1=1418809&r2=1418810&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:17:40 2012
@@ -54,13 +54,13 @@ 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.infrastructure.message.StartHelperMessage;
         import org.apache.flex.utilities.developerToolSuite.presentation.config.SettingsContext;
         import org.apache.flex.utilities.developerToolSuite.presentation.graphic.menu.ApplicationMenu;