Skip to content
Permalink
Browse files
- Minor adjustments
git-svn-id: https://svn.apache.org/repos/asf/flex/whiteboard@1451103 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
doublefx committed Feb 28, 2013
1 parent 9d6b7c5 commit 9c10d256a0790d212946ed906569fb981b9336fb
Showing 7 changed files with 58 additions and 57 deletions.
@@ -47,8 +47,6 @@ package org.apache.flex.utilities.developerToolSuite.infrastructure.command {
_progress.currentStepLabel = "VALIDATING_JAVA_HOME";
_progress.currentStep = 1;

settings.validationInProgress = _progress;

dispatch(new ValidateJavaPathMessage(settings.JAVA_HOME));
dispatch(new ValidateAntPathMessage(settings.ANT_HOME));
dispatch(new ValidateMavenPathMessage(settings.MAVEN_HOME));
@@ -84,7 +84,7 @@ limitations under the License.
<mx:GridRow/>

<fx:Script><![CDATA[
import org.apache.flex.utilities.developerToolSuite.executor.domain.ISettingsModel;
import org.apache.flex.utilities.developerToolSuite.executor.domain.ISettingsToSave;
import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.ChangeLanguageMessage;
import org.apache.flex.utilities.developerToolSuite.presentation.graphic.component.FrameSkin;
@@ -95,7 +95,7 @@ limitations under the License.
[Inject]
[Bindable]
public var model:ISettingsModel;
public var model:ISettingsToSave;
[Init]
public function init():void {
@@ -1,45 +1,6 @@
package org.apache.flex.utilities.developerToolSuite.executor.domain {
import flash.utils.Dictionary;

import mx.collections.ArrayCollection;

[Bindable]
public interface ISettingsModel {

function get dbVersion():uint;

function get appBounds():String;

function get appDisplayState():String;

function get availableLanguages():ArrayCollection;

function get currentLanguage():Object;

function get environmentVariables():Dictionary;

function get locale():String;

function get JAVA_HOME():String;

function get ANT_HOME():String;

function get MAVEN_HOME():String;

function get CYGWIN_HOME():String;

function get javaEnabled():Boolean;

function get antEnabled():Boolean;

function get mavenEnabled():Boolean;

function get cygwinEnabled():Boolean;

function get svnEnabled():Boolean;

function get gitEnabled():Boolean;

public interface ISettingsModel extends ISettingsToSave {
function get validationInProgress():ISettingsValidationInProgressModel;
}
}
@@ -0,0 +1,42 @@
package org.apache.flex.utilities.developerToolSuite.executor.domain {
import flash.utils.Dictionary;

import mx.collections.ArrayCollection;

public interface ISettingsToSave {

function get dbVersion():uint;

function get appBounds():String;

function get appDisplayState():String;

function get availableLanguages():ArrayCollection;

function get currentLanguage():Object;

function get environmentVariables():Dictionary;

function get locale():String;

function get JAVA_HOME():String;

function get ANT_HOME():String;

function get MAVEN_HOME():String;

function get CYGWIN_HOME():String;

function get javaEnabled():Boolean;

function get antEnabled():Boolean;

function get mavenEnabled():Boolean;

function get cygwinEnabled():Boolean;

function get svnEnabled():Boolean;

function get gitEnabled():Boolean;
}
}
@@ -17,8 +17,8 @@
package org.apache.flex.utilities.developerToolSuite.executor.infrastructure.command {
import mx.utils.ObjectUtil;

import org.apache.flex.utilities.developerToolSuite.executor.domain.ISettingsToSave;
import org.apache.flex.utilities.developerToolSuite.executor.domain.ISettingsValidationInProgressModel;

import org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.SaveSettingsMessage;
import org.spicefactory.lib.reflect.ClassInfo;
import org.spicefactory.lib.reflect.Property;
@@ -34,12 +34,10 @@ package org.apache.flex.utilities.developerToolSuite.executor.infrastructure.com
}

override protected function prepareSql():void {
var classInfo:ClassInfo = ClassInfo.forInstance(_msg.settings);
var property:String;
sql = "";
for (var i:uint=0; i < classInfo.getProperties().length; i++) {
var property:Property = classInfo.getProperties()[i] as Property;
if (!(property.type is ISettingsValidationInProgressModel))
sql += "UPDATE setting SET value='" + _msg.settings[property.name] + "' WHERE name='" + property.name + "';";
for (property in _msg.settings) {
sql += "UPDATE setting SET value='" + _msg.settings[property] + "' WHERE name='" + property + "';";
}

super.prepareSql();
@@ -15,17 +15,17 @@
limitations under the License.
*/
package org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message {
import org.apache.flex.utilities.developerToolSuite.executor.domain.ISettingsModel;
import org.apache.flex.utilities.developerToolSuite.executor.domain.ISettingsToSave;

public class SaveSettingsMessage {

private var _settings:ISettingsModel;
private var _settings:ISettingsToSave;

public function SaveSettingsMessage(settings:ISettingsModel) {
public function SaveSettingsMessage(settings:ISettingsToSave) {
this._settings = settings;
}

public function get settings():ISettingsModel {
public function get settings():ISettingsToSave {
return _settings;
}
}
@@ -75,6 +75,8 @@ limitations under the License.
import org.spicefactory.parsley.core.command.ManagedCommandFactory;
import org.spicefactory.parsley.core.context.Context;
private const APP_DEFAULT_SIZE:Rectangle = new Rectangle(120, 120, 1200, 825);
[Inject]
public var context:Context;
@@ -115,7 +117,7 @@ limitations under the License.
var bounds:Array = applicationSettings.appBounds.split(",");
_appBounds = nativeWindow.bounds = new Rectangle(bounds[0], bounds[1], bounds[2], bounds[3]);
} else {
_appBounds = nativeWindow.bounds = new Rectangle(120, 120, 1200, 825);
_appBounds = nativeWindow.bounds = APP_DEFAULT_SIZE;
}
if (applicationSettings.appDisplayState) {
@@ -183,12 +185,12 @@ limitations under the License.
[MessageHandler]
public function applicationExitReady(msg:ApplicationExitReadyMessage):void {
LogUtil.getLogger(this).info('Application Exiting');
this.exit();
exit();
}
private static function addLogTargets():void {
var parsleyLogger:TraceTarget = new TraceTarget();
parsleyLogger.filters = ["org.spicefactory.*", "mx.*"];
parsleyLogger.filters = ["org.spicefactory.*"];
parsleyLogger.level = LogEventLevel.ERROR;
parsleyLogger.includeCategory = true;
parsleyLogger.includeLevel = true;

0 comments on commit 9c10d25

Please sign in to comment.