Author: fthomas
Date: Thu Dec 6 15:54:24 2012
New Revision: 1417962
URL: http://svn.apache.org/viewvc?rev=1417962&view=rev
Log:
- Replaced an ugly trick by a nice one :)
- Added window state, size and position settings.
- Fixed: initial launch initialization problems
- Prepared the frame for SVN / GIT detection
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
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.component-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/presentation/graphic/settings/formItem/ToolHomeFormItem.mxml
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/domain/ISettingsModel.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/domain/SettingModel.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/ValidateAntHomePathCommand.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/ValidateJavaHomePathCommand.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/ValidateMavenHomePathCommand.as
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.host-swf/src/main/flex/org/apache/flex/utilities/developerToolSuite/MainApplication.mxml
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/en_US/Application.properties
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/en_US/SettingsWindow.properties
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/fr_FR/Application.properties
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=1417962&r1=1417961&r2=1417962&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
Thu Dec 6 15:54:24 2012
@@ -41,7 +41,7 @@ limitations under the License.
change="localeComboBox_changeHandler(event)"
width="180"/>
</component:Frame>
</mx:GridItem>
- <mx:GridItem>
+ <mx:GridItem rowSpan="3">
<component:Frame
label="{resourceManager.getString('SettingsWindow', 'TOOLS_PATH_LOCATION')}"
skinClass="{FrameSkin}">
<component:layout>
<s:VerticalLayout horizontalAlign="center"
paddingRight="35"/>
@@ -50,15 +50,30 @@ limitations under the License.
<s:layout>
<s:FormLayout gap="-14"/>
</s:layout>
- <formitem:JavaHomeFormItem id="javaHomeFormItem"
installationPathValidated="{model.javaEnabled}"/>
- <formitem:AntHomeFormItem id="antHomeFormItem"
installationPathValidated="{model.antEnabled}"/>
- <formitem:MavenHomeFormItem id="mavenHomeFormItem"
installationPathValidated="{model.mavenEnabled}"/>
+ <formitem:JavaHomeFormItem id="javaHomeFormItem"
installationPathValidated="{model.javaEnabled}"
+ propertyValue="{model.JAVA_HOME
? model.JAVA_HOME : model.environmentVariables['JAVA_HOME']}"/>
+ <formitem:AntHomeFormItem id="antHomeFormItem"
installationPathValidated="{model.antEnabled}"
+ propertyValue="{model.ANT_HOME ?
model.ANT_HOME : model.environmentVariables['ANT_HOME']}"/>
+ <formitem:MavenHomeFormItem id="mavenHomeFormItem"
installationPathValidated="{model.mavenEnabled}"
+
propertyValue="{model.MAVEN_HOME ? model.MAVEN_HOME :
model.environmentVariables['MAVEN_HOME']}"/>
</s:Form>
</component:Frame>
</mx:GridItem>
</mx:GridRow>
- <mx:GridRow/>
+ <mx:GridRow width="100%" horizontalAlign="center">
+ <mx:GridItem rowSpan="2">
+ <component:Frame
label="{resourceManager.getString('SettingsWindow', 'LANGUAGE')}"
skinClass="{FrameSkin}" height="100%">
+ <component:layout>
+ <s:HorizontalLayout horizontalAlign="center"
+ verticalAlign="middle"
paddingLeft="30" paddingRight="30" paddingTop="30" paddingBottom="30"
+ gap="16"/>
+ </component:layout>
+ <s:DropDownList id="languageComboBox2"
+ change="localeComboBox_changeHandler(event)"
width="180"/>
+ </component:Frame>
+ </mx:GridItem>
+ </mx:GridRow>
<mx:GridRow/>
<fx:Script><![CDATA[
@@ -80,14 +95,7 @@ limitations under the License.
languageComboBox.dataProvider = model.availableLanguages;
languageComboBox.selectedItem = model.currentLanguage;
- javaHomeFormItem.dispatch = dispatch;
- javaHomeFormItem.propertyValue = model.JAVA_HOME ? model.JAVA_HOME
: model.environmentVariables["JAVA_HOME"];
-
- antHomeFormItem.dispatch = dispatch;
- antHomeFormItem.propertyValue = model.ANT_HOME ? model.ANT_HOME :
model.environmentVariables["ANT_HOME"];
-
- mavenHomeFormItem.dispatch = dispatch;
- mavenHomeFormItem.propertyValue = model.MAVEN_HOME ?
model.MAVEN_HOME : model.environmentVariables["MAVEN_HOME"];
+ javaHomeFormItem.dispatch = antHomeFormItem.dispatch =
mavenHomeFormItem.dispatch = dispatch;
}
private function
localeComboBox_changeHandler(event:IndexChangeEvent):void {
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/formItem/ToolHomeFormItem.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/formItem/ToolHomeFormItem.mxml?rev=1417962&r1=1417961&r2=1417962&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/formItem/ToolHomeFormItem.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/formItem/ToolHomeFormItem.mxml
Thu Dec 6 15:54:24 2012
@@ -38,7 +38,7 @@ limitations under the License.
</fx:Declarations>
<s:HGroup gap="0">
- <s:TextInput id="toolHomeLocation"
+ <s:TextInput id="toolHomeLocation" text="{propertyValue}"
width="240"
change="toolHomeLocation_changeHandler(event)"/>
<mx:Button id="browseButton" label="..." width="28"
@@ -86,9 +86,6 @@ limitations under the License.
public var dispatch:Function;
private function creationCompleteHandler(event:FlexEvent):void {
-
- toolHomeLocation.text = propertyValue;
-
dispatch(new validateToolMessageClass(propertyValue));
}
Modified:
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/domain/ISettingsModel.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/domain/ISettingsModel.as?rev=1417962&r1=1417961&r2=1417962&view=diff
==============================================================================
---
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/domain/ISettingsModel.as
(original)
+++
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/domain/ISettingsModel.as
Thu Dec 6 15:54:24 2012
@@ -5,6 +5,11 @@ package org.apache.flex.utilities.develo
[Bindable]
public interface ISettingsModel {
+
+ function get appBounds():String;
+
+ function get appDisplayState():String;
+
function get availableLanguages():ArrayCollection;
function get currentLanguage():Object;
Modified:
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/domain/SettingModel.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/domain/SettingModel.as?rev=1417962&r1=1417961&r2=1417962&view=diff
==============================================================================
---
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/domain/SettingModel.as
(original)
+++
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.executor-lib/src/main/flex/org/apache/flex/utilities/developerToolSuite/executor/domain/SettingModel.as
Thu Dec 6 15:54:24 2012
@@ -43,6 +43,9 @@ package org.apache.flex.utilities.develo
private var _antEnabled:Boolean;
private var _mavenEnabled:Boolean;
+ private var _appBounds:String;
+ private var _appDisplayState:String;
+
public function get environmentVariables():Dictionary {
return _environmentVariables;
}
@@ -114,5 +117,23 @@ package org.apache.flex.utilities.develo
public function set mavenEnabled(value:Boolean):void {
_mavenEnabled = value;
}
+
+ public function get appBounds():String {
+ return _appBounds;
+ }
+
+ [Bindable]
+ public function set appBounds(value:String):void {
+ _appBounds = value;
+ }
+
+ public function get appDisplayState():String {
+ return _appDisplayState;
+ }
+
+ [Bindable]
+ public function set appDisplayState(value:String):void {
+ _appDisplayState = value;
+ }
}
}
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=1417962&r1=1417961&r2=1417962&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
Thu Dec 6 15:54:24 2012
@@ -25,6 +25,8 @@ package org.apache.flex.utilities.develo
[Inject]
public var settings:SettingModel;
+ private var _done:Boolean;
+
public function execute():void {
executeCommand();
}
@@ -41,6 +43,11 @@ package org.apache.flex.utilities.develo
}
private function extractVariables(output:String):void {
+
+ if (_done)
+ return;
+
+ _done = true;
settings.environmentVariables = new Dictionary();
var rows:Array = output.split("\r\n");
@@ -55,5 +62,10 @@ package org.apache.flex.utilities.develo
super.outputDataHandler(event);
extractVariables(standardOutput);
}
+
+ override protected function errorDataHandler(event:ProgressEvent):void
{
+ super.outputDataHandler(event);
+ extractVariables(standardError);
+ }
}
}
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=1417962&r1=1417961&r2=1417962&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
Thu Dec 6 15:54:24 2012
@@ -33,6 +33,8 @@ package org.apache.flex.utilities.develo
private static var LOG:ILogger = LogUtil.getLogger(InitDBCommand);
+ public var callback:Function;
+
private static var _conn:SQLConnection;
private static const SETTINGS_TABLE_SQL:String = "create table if not
exists settings(id integer primary key autoincrement, name text, value text);";
@@ -54,6 +56,7 @@ package org.apache.flex.utilities.develo
_conn.close();
LOG.debug("Closing DB: " + ApplicationDB.DATABASE_NAME);
+ callback(true);
}
private function settingsTableCreated():Boolean {
@@ -100,7 +103,7 @@ package org.apache.flex.utilities.develo
function insertSettingsTable():void {
LOG.debug("Inserting data");
- prepareData();
+ prepareSettingsData();
var stmtInsertSettingsTable:SQLStatement;
stmtInsertSettingsTable = new SQLStatement();
stmtInsertSettingsTable.sqlConnection = _conn;
@@ -108,11 +111,13 @@ package org.apache.flex.utilities.develo
stmtInsertSettingsTable.execute();
}
- function prepareData():void {
+ function prepareSettingsData():void {
settingsDataSql = "INSERT INTO 'settings' SELECT '1' AS 'id',
'locale' AS 'name', '" + LocaleUtil.getDefaultLanguage().data + "' AS 'value' ";
settingsDataSql += "UNION SELECT '2', 'JAVA_HOME', '' ";
settingsDataSql += "UNION SELECT '3', 'ANT_HOME', '' ";
- settingsDataSql += "UNION SELECT '4', 'MAVEN_HOME', '';";
+ settingsDataSql += "UNION SELECT '4', 'MAVEN_HOME', '' ";
+ settingsDataSql += "UNION SELECT '5', 'appDisplayState', '' ";
+ settingsDataSql += "UNION SELECT '6', 'appBounds', '';";
}
}
}
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/ValidateAntHomePathCommand.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/ValidateAntHomePathCommand.as?rev=1417962&r1=1417961&r2=1417962&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/ValidateAntHomePathCommand.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/ValidateAntHomePathCommand.as
Thu Dec 6 15:54:24 2012
@@ -47,6 +47,13 @@ package org.apache.flex.utilities.develo
LOG.debug("Executing Command with message: " +
ObjectUtil.toString(_msg));
var file:File;
+
+ if (!_msg.path) {
+ LOG.error("Path null, nothing to check, quit");
+ error(false);
+ return;
+ }
+
try {
file = new File(shell.formatPath(_msg.path));
if (!file.resolvePath("bin/ant.bat").exists) {
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/ValidateJavaHomePathCommand.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/ValidateJavaHomePathCommand.as?rev=1417962&r1=1417961&r2=1417962&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/ValidateJavaHomePathCommand.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/ValidateJavaHomePathCommand.as
Thu Dec 6 15:54:24 2012
@@ -47,6 +47,13 @@ package org.apache.flex.utilities.develo
LOG.debug("Executing Command with message: " +
ObjectUtil.toString(_msg));
var file:File;
+
+ if (!_msg.path) {
+ LOG.error("Path null, nothing to check, quit");
+ error(false);
+ return;
+ }
+
try {
file = new File(shell.formatPath(_msg.path));
if (!file.resolvePath("lib/tools.jar").exists) {
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/ValidateMavenHomePathCommand.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/ValidateMavenHomePathCommand.as?rev=1417962&r1=1417961&r2=1417962&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/ValidateMavenHomePathCommand.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/ValidateMavenHomePathCommand.as
Thu Dec 6 15:54:24 2012
@@ -22,7 +22,6 @@ package org.apache.flex.utilities.develo
import mx.utils.ObjectUtil;
import
org.apache.flex.utilities.developerToolSuite.executor.domain.SettingModel;
-
import
org.apache.flex.utilities.developerToolSuite.executor.infrastructure.message.ValidateMavenHomePathMessage;
import
org.apache.flex.utilities.developerToolSuite.executor.infrastructure.util.LogUtil;
@@ -48,6 +47,13 @@ package org.apache.flex.utilities.develo
LOG.debug("Executing Command with message: " +
ObjectUtil.toString(_msg));
var file:File;
+
+ if (!_msg.path) {
+ LOG.error("Path null, nothing to check, quit");
+ error(false);
+ return;
+ }
+
try {
file = new File(shell.formatPath(_msg.path));
if (!file.resolvePath("bin/mvn.bat").exists) {
@@ -64,8 +70,9 @@ package org.apache.flex.utilities.develo
var mvn:String =
shell.formatPath(file.resolvePath("bin/mvn.bat").nativePath);
- if (shell.OS == "win")
+ if (shell.OS == "win") {
command.push("/C");
+ }
command.push(mvn);
command.push("-version");
@@ -75,8 +82,9 @@ package org.apache.flex.utilities.develo
private function extractVersion(output:String):void {
- if (_done)
+ if (_done) {
return;
+ }
_done = 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=1417962&r1=1417961&r2=1417962&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
Thu Dec 6 15:54:24 2012
@@ -21,7 +21,8 @@ limitations under the License.
xmlns:parsley="http://www.spicefactory.org/parsley"
title="Apache Flex Developer Tool Suite"
menu="{applicationMenu}"
- width="800" height="600">
+ width="800" height="600"
+ closing="closingHandler(event)">
<fx:Declarations>
<parsley:ContextBuilder>
@@ -42,17 +43,20 @@ limitations under the License.
<s:VerticalLayout/>
</s:layout>
- <s:Label text="{resourceManager.getString('Application','HELLO')}"/>
+ <s:Label id="helloLabel"
text="{resourceManager.getString('Application','HELLO')}"/>
<fx:Script><![CDATA[
+ import mx.controls.Alert;
import mx.logging.Log;
import mx.logging.LogEventLevel;
import mx.logging.targets.TraceTarget;
+ import mx.managers.PopUpManager;
import
org.apache.flex.utilities.developerToolSuite.executor.domain.ISettingsModel;
import
org.apache.flex.utilities.developerToolSuite.executor.infrastructure.config.ExecutorContext;
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.executor.infrastructure.util.LogUtil;
import
org.apache.flex.utilities.developerToolSuite.presentation.config.SettingsContext;
import
org.apache.flex.utilities.developerToolSuite.presentation.graphic.menu.ApplicationMenu;
@@ -67,21 +71,39 @@ limitations under the License.
[MessageDispatcher]
public var dispatch:Function;
+ private var alert:Alert;
+
[Init]
public function init():void {
- // Without that, the menu is not shown until the first resize or
desactivate/activate but that's an ugly hack.
- // TODO: Fix the bug.
- minimize();
- restore();
-
addLog();
-
LogUtil.getLogger(this).info('Application initialization');
+
dispatch(new InitApplicationMessage());
+
+ if (!applicationSettings.appDisplayState) {
+ alert = Alert.show(resourceManager.getString('Application',
'WELCOME_MSG'), resourceManager.getString('Application','WELCOME_TITLE'));
+ }
}
[MessageHandler]
public function applicationReady(msg:ApplicationReadyMessage):void {
+
+ PopUpManager.removePopUp(alert);
+
+ if (applicationSettings.appDisplayState) {
+ if (applicationSettings.appDisplayState ==
NativeWindowDisplayState.MAXIMIZED) {
+ nativeWindow.maximize();
+ } else {
+ nativeWindow.restore();
+ if (applicationSettings.appBounds) {
+ var bounds:Array =
applicationSettings.appBounds.split(",");
+ nativeWindow.bounds = new Rectangle(bounds[0],
bounds[1], bounds[2], bounds[3]);
+ }
+ }
+ } else {
+ nativeWindow.bounds = new Rectangle(120, 120, 1150, 720);
+ }
+
LogUtil.getLogger(this).info('Application ready');
}
@@ -102,5 +124,10 @@ limitations under the License.
devLogger.fieldSeparator = " -> ";
Log.addTarget(devLogger);
}
+
+ 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>
Modified:
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/en_US/Application.properties
URL:
http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/en_US/Application.properties?rev=1417962&r1=1417961&r2=1417962&view=diff
==============================================================================
---
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/en_US/Application.properties
(original)
+++
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/en_US/Application.properties
Thu Dec 6 15:54:24 2012
@@ -1,4 +1,6 @@
-HELLO=Hello
+WELCOME_TITLE=Welcome to Apache Flex Developer Tool Suite
+WELCOME_MSG=This is the first time you open the application, to initialize it,
please close it and reopen it.
+
PROJECT=Project
NEW_PROJECT=New Project...
OPEN_PROJECT=Open Project...
Modified:
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/en_US/SettingsWindow.properties
URL:
http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/en_US/SettingsWindow.properties?rev=1417962&r1=1417961&r2=1417962&view=diff
==============================================================================
---
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/en_US/SettingsWindow.properties
(original)
+++
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/en_US/SettingsWindow.properties
Thu Dec 6 15:54:24 2012
@@ -1,7 +1,7 @@
GENERAL=General
LANGUAGE=Language
CLOSE=Close
-TOOL_PATH_ERROR_STRING=You must enter a valid home path for this tool
+TOOLS_PATH_LOCATION=Tools path location
BROWSE_JAVA_HOME=Browse to the JDK 1.6 installation Directory
INDICATE_JAVA_HOME=Indicate the JDK 1.6 home directory.
PLEASE_INDICATE_JAVA_HOME=Please, indicate the JDK 1.6 home directory...
Modified:
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/fr_FR/Application.properties
URL:
http://svn.apache.org/viewvc/incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/fr_FR/Application.properties?rev=1417962&r1=1417961&r2=1417962&view=diff
==============================================================================
---
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/fr_FR/Application.properties
(original)
+++
incubator/flex/whiteboard/fthomas/developerToolSuite/trunk/org.apache.flex.utilities.developerToolSuite.locale/src/main/resources/locale/fr_FR/Application.properties
Thu Dec 6 15:54:24 2012
@@ -1,4 +1,6 @@
-HELLO=Bonjour
+WELCOME_TITLE=Bienvenue dans Apache Flex Developer Tool Suite
+WELCOME_MSG=Ceci est la 1ère fois que vous ouvrez cette application, afin de
l'initialiser, veuillez s'il vous plait la fermer et la ré-ouvrir.
+
PROJECT=Projet
NEW_PROJECT=Nouveau Projet...
OPEN_PROJECT=Ouvrir un Projet...