git commit: [flex-asjs] [refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list] - FLEX-35328 - Update MDLExample DropDownList tab with prompt property when nothing is selected

2017-06-24 Thread piotrz
Repository: flex-asjs
Updated Branches:
  refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list 69139d976 -> 
09a4afccf


FLEX-35328 - Update MDLExample DropDownList tab with prompt property when 
nothing is selected


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/09a4afcc
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/09a4afcc
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/09a4afcc

Branch: refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list
Commit: 09a4afccf8605c9f17fd6f088d65195112ae0a33
Parents: 69139d9
Author: piotrz 
Authored: Sat Jun 24 19:30:37 2017 +0200
Committer: piotrz 
Committed: Sat Jun 24 19:30:37 2017 +0200

--
 examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/09a4afcc/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml
--
diff --git a/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml 
b/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml
index a50413a..e17af31 100644
--- a/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml
@@ -31,8 +31,7 @@ limitations under the License.
 
 
   
+prompt="Text" change="onDplChange(event)">
   
   

git commit: [flex-asjs] [refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list] - FLEX-35328 - Add prompt property to MDL DropDownList - it displays text if nothing is selected

2017-06-24 Thread piotrz
Repository: flex-asjs
Updated Branches:
  refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list 2fc506e62 -> 
69139d976


FLEX-35328 - Add prompt property to MDL DropDownList - it displays text if 
nothing is selected


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/69139d97
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/69139d97
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/69139d97

Branch: refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list
Commit: 69139d976fdfe282f8ee503b10f1c3d848fa7919
Parents: 2fc506e
Author: piotrz 
Authored: Sat Jun 24 19:29:46 2017 +0200
Committer: piotrz 
Committed: Sat Jun 24 19:29:46 2017 +0200

--
 .../flex/org/apache/flex/mdl/DropDownList.as| 23 ++--
 .../flex/mdl/beads/views/DropDownListView.as|  3 ++-
 2 files changed, 23 insertions(+), 3 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69139d97/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/DropDownList.as
--
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/DropDownList.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/DropDownList.as
index 2dddaf3..708b8ba 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/DropDownList.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/DropDownList.as
@@ -23,7 +23,6 @@ package org.apache.flex.mdl
 import org.apache.flex.core.UIBase;
 import org.apache.flex.events.ItemAddedEvent;
 import org.apache.flex.html.DataContainer;
-import org.apache.flex.html.Option;
 import org.apache.flex.html.Select;
 
 COMPILE::JS
@@ -56,13 +55,33 @@ package org.apache.flex.mdl
  *  @langversion 3.0
  *  @playerversion Flash 10.2
  *  @playerversion AIR 2.6
- *  @productversion FlexJS 0.0
+ *  @productversion FlexJS 0.8
  */
 public function DropDownList()
 {
 super();
 }
 
+private var _prompt:String;
+
+/**
+ *  The prompt for the DropDownList control.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10.2
+ *  @playerversion AIR 2.6
+ *  @productversion FlexJS 0.9
+ */
+public function get prompt():String
+{
+return _prompt;
+}
+
+public function set prompt(value:String):void
+{
+_prompt = value;
+}
+
 protected var _dropDown:Select;
 
 public function get dropDown():Select

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/69139d97/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/DropDownListView.as
--
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/DropDownListView.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/DropDownListView.as
index cad3e0d..de2d1a0 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/DropDownListView.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/DropDownListView.as
@@ -47,7 +47,7 @@ package org.apache.flex.mdl.beads.views
  *  @copy org.apache.flex.core.IBead#strand
  *
  *  @flexjsignorecoercion HTMLLabelElement
- * 
+ *
  *  @langversion 3.0
  *  @playerversion Flash 10.2
  *  @playerversion AIR 2.6
@@ -62,6 +62,7 @@ package org.apache.flex.mdl.beads.views
 var dropDownList:DropDownList = (value as DropDownList);
 
 dropDownList.labelDisplay = document.createElement('label') as 
HTMLLabelElement;
+dropDownList.labelDisplay.innerText = dropDownList.prompt;
 
dropDownList.labelDisplay.classList.add("mdl-textfield__label");
 
 dropDownList.dropDown = new Select();



git commit: [flex-asjs] [refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list] - FLEX-35328 - Adjust MDLExample layout in DropDownList tab

2017-06-24 Thread piotrz
Repository: flex-asjs
Updated Branches:
  refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list 4b6de1691 -> 
2fc506e62


FLEX-35328 - Adjust MDLExample layout in DropDownList tab


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/2fc506e6
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/2fc506e6
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/2fc506e6

Branch: refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list
Commit: 2fc506e626afc39b1cef546714d151a4f3463633
Parents: 4b6de16
Author: piotrz 
Authored: Sat Jun 24 16:42:29 2017 +0200
Committer: piotrz 
Committed: Sat Jun 24 16:42:29 2017 +0200

--
 .../MDLExample/src/main/flex/DropDownList.mxml  | 32 
 1 file changed, 20 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/2fc506e6/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml
--
diff --git a/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml 
b/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml
index 72aa9e9..a50413a 100644
--- a/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml
+++ b/examples/flexjs/MDLExample/src/main/flex/DropDownList.mxml
@@ -28,18 +28,26 @@ limitations under the License.
 
 
 
-
-  
-  
-  
-  
-  
-
-
+
+
+  
+  
+  
+  
+  
+
+
+
+
+
+
+
 
 

git commit: [flex-asjs] [refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list] - FLEX-35328 - Add ability to programmatic selection in MDL DropDownList

2017-06-24 Thread piotrz
Repository: flex-asjs
Updated Branches:
  refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list f74836d4f -> 
4b6de1691


FLEX-35328 - Add ability to programmatic selection in MDL DropDownList


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4b6de169
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4b6de169
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4b6de169

Branch: refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list
Commit: 4b6de1691e02e2226deb5af4b81909907fff8bc1
Parents: f74836d
Author: piotrz 
Authored: Sat Jun 24 16:24:56 2017 +0200
Committer: piotrz 
Committed: Sat Jun 24 16:24:56 2017 +0200

--
 .../beads/controllers/DropDownListController.as | 12 +++--
 .../flex/mdl/beads/views/DropDownListView.as| 47 +++-
 2 files changed, 53 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4b6de169/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/controllers/DropDownListController.as
--
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/controllers/DropDownListController.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/controllers/DropDownListController.as
index ed1a90c..149be7d 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/controllers/DropDownListController.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/controllers/DropDownListController.as
@@ -83,10 +83,14 @@ package org.apache.flex.mdl.beads.controllers
COMPILE::JS
 private function onSelectChanged(event:Event):void
 {
-   var eventTarget:Object = event.target;
-   
-   model.selectedIndex = eventTarget.selectedIndex;
-   model.selectedItem = 
model.dataProvider[model.selectedIndex];
+var eventTarget:Object = event.target;
+   var selectedIndex:int = eventTarget.selectedIndex - 1;
+
+   if (model.selectedIndex != selectedIndex)
+{
+model.selectedIndex = selectedIndex;
+model.selectedItem = model.dataProvider[selectedIndex];
+}
 }
 }
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4b6de169/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/DropDownListView.as
--
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/DropDownListView.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/DropDownListView.as
index e3c1658..cad3e0d 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/DropDownListView.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/views/DropDownListView.as
@@ -18,6 +18,7 @@
 

 package org.apache.flex.mdl.beads.views
 {
+import org.apache.flex.core.ISelectionModel;
 import org.apache.flex.core.IStrand;
 import org.apache.flex.html.Option;
 import org.apache.flex.html.Select;
@@ -27,8 +28,7 @@ package org.apache.flex.mdl.beads.views
 
 /**
  *  The DropDownListView class creates the visual elements of the 
org.apache.flex.mdl.DropDownList
- *  component. The job of the view bead is to put together the parts of 
the DropDownList such as the Label
- *  control and material icon ARROW_DROP_DOWN to trigger the pop-up.
+ *  component. The job of the view bead is to put together the parts of 
the DropDownList such as the Select and Label
  *
  *  @viewbead
  *  @langversion 3.0
@@ -79,9 +79,39 @@ package org.apache.flex.mdl.beads.views
 }
 }
 
+override protected function dataProviderChangeHandler(event:Event):void
+{
+super.dataProviderChangeHandler(event);
+
+COMPILE::JS
+{
+setProgrammaticallyChangedSelection();
+}
+}
+
+override protected function 
itemsCreatedHandler(event:org.apache.flex.events.Event):void
+{
+super.itemsCreatedHandler(event);
+
+COMPILE::JS
+{
+setProgrammaticallyChangedSelection();
+}
+}
+
+private function selectionChangeHandler(event:Event):void
+{
+COMPILE::JS
+{
+setProgrammaticall

git commit: [flex-asjs] [refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list] - FLEX-35328 - Make "change" event working for DropDownList

2017-06-24 Thread piotrz
Repository: flex-asjs
Updated Branches:
  refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list 0c7da1b74 -> 
f74836d4f


FLEX-35328 - Make "change" event working for DropDownList


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/f74836d4
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/f74836d4
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/f74836d4

Branch: refs/heads/feature/FLEX-35328_simplify_mdl_drop_down_list
Commit: f74836d4f5016c550f34fac7cd9c8dc17dced31d
Parents: 0c7da1b
Author: piotrz 
Authored: Sat Jun 24 14:39:57 2017 +0200
Committer: piotrz 
Committed: Sat Jun 24 14:39:57 2017 +0200

--
 .../flex/mdl/beads/controllers/DropDownListController.as| 9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/f74836d4/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/controllers/DropDownListController.as
--
diff --git 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/controllers/DropDownListController.as
 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/controllers/DropDownListController.as
index bd9bf3b..ed1a90c 100644
--- 
a/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/controllers/DropDownListController.as
+++ 
b/frameworks/projects/MaterialDesignLite/src/main/flex/org/apache/flex/mdl/beads/controllers/DropDownListController.as
@@ -18,10 +18,9 @@
 

 package org.apache.flex.mdl.beads.controllers
 {
-   import org.apache.flex.core.IBeadController;
+import org.apache.flex.core.IBeadController;
 import org.apache.flex.core.ISelectionModel;
 import org.apache.flex.core.IStrand;
-import org.apache.flex.events.IEventDispatcher;
 import org.apache.flex.mdl.DropDownList;
 import org.apache.flex.events.Event;
 
@@ -77,19 +76,17 @@ package org.apache.flex.mdl.beads.controllers
 
COMPILE::JS
 {
-dropDownList.dropDown.element.addEventListener("onchange", 
onDisplayItemClick, false);
+dropDownList.dropDown.element.addEventListener(Event.CHANGE, 
onSelectChanged, false);
 }
}
 
COMPILE::JS
-private function onDisplayItemClick(event:Event):void
+private function onSelectChanged(event:Event):void
 {
var eventTarget:Object = event.target;

model.selectedIndex = eventTarget.selectedIndex;
model.selectedItem = 
model.dataProvider[model.selectedIndex];
-
-   IEventDispatcher(_strand).dispatchEvent(new 
Event(Event.CHANGE));
 }
 }
 }



Build failed in Jenkins: flex-utilities_installer #1204

2017-06-24 Thread flex . ci . builds
See 


--
Started by timer
Building remotely on flex_sdk_slave2 in workspace 

 > C:\Program Files (x86)\Git\cmd\git.exe rev-parse --is-inside-work-tree # 
 > timeout=10
Fetching changes from the remote Git repository
 > C:\Program Files (x86)\Git\cmd\git.exe config remote.origin.url 
 > https://git-wip-us.apache.org/repos/asf/flex-utilities.git # timeout=10
Fetching upstream changes from 
https://git-wip-us.apache.org/repos/asf/flex-utilities.git
 > C:\Program Files (x86)\Git\cmd\git.exe --version # timeout=10
 > C:\Program Files (x86)\Git\cmd\git.exe fetch --tags --progress 
 > https://git-wip-us.apache.org/repos/asf/flex-utilities.git 
 > +refs/heads/*:refs/remotes/origin/*
 > C:\Program Files (x86)\Git\cmd\git.exe rev-parse "origin/develop^{commit}" # 
 > timeout=10
Checking out Revision 4d898afa7d1fa020a5b6dff191205cd9e3b13823 (origin/develop)
 > C:\Program Files (x86)\Git\cmd\git.exe config core.sparsecheckout # 
 > timeout=10
 > C:\Program Files (x86)\Git\cmd\git.exe checkout -f 
 > 4d898afa7d1fa020a5b6dff191205cd9e3b13823
 > C:\Program Files (x86)\Git\cmd\git.exe rev-list 
 > 4d898afa7d1fa020a5b6dff191205cd9e3b13823 # timeout=10
[ant_on_air] $ cmd.exe /C 
"c:\Jenkins\tools\hudson.tasks.Ant_AntInstallation\c_apache-ant-1.9.3\bin\ant.bat
 -file build.xml -Dplayerglobal.version=11.7 main && exit %%ERRORLEVEL%%"
Buildfile: 


clean:
   [delete] Deleting directory 


init:

check-as3commons.swc:

get-as3commons.swc:

third-party:
  [get] Destination already exists (skipping): 

  [get] Destination already exists (skipping): 

  [get] Destination already exists (skipping): 

  [get] Destination already exists (skipping): 

  [get] Destination already exists (skipping): 

  [get] Destination already exists (skipping): 

  [get] Destination already exists (skipping): 


compile:
[compc] Loading configuration file 
C:\Jenkins\workspace\flex-sdk\frameworks\air-config.xml
[compc] 
C:\Jenkins\workspace\flex-utilities_installer\flex-installer\ant_on_air\bin\ant_on_air.swc
 (134456 bytes)
[compc] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8

test:
[mxmlc] Loading configuration file 
C:\Jenkins\workspace\flex-sdk\frameworks\air-config.xml
[mxmlc] 
C:\Jenkins\workspace\flex-utilities_installer\flex-installer\ant_on_air\tests\AntOnAir.swf
 (1147470 bytes)
[mxmlc] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8

failuretests:

main:

BUILD SUCCESSFUL
Total time: 1 minute 25 seconds
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[flex-installer] $ cmd.exe /C 
"c:\Jenkins\tools\hudson.tasks.Ant_AntInstallation\c_apache-ant-1.9.3\bin\ant.bat
 -file build.xml -Dplayerglobal.version=11.7 clean build source-package 
create-md5s copy-misc && exit %%ERRORLEVEL%%"
Buildfile: 


clean:
   [delete] Deleting directory 

   [delete] Deleting directory 

   [delete] Deleting directory 

   [delete] Deleting directory 


clean:

createDirs:
 [echo] ***
 [echo] Execute the update-version target once,
 [echo] and only once, when you modifiy

Jenkins build is back to normal : flex-tlf #1111

2017-06-24 Thread flex . ci . builds
See 



[1/2] git commit: [flex-falcon] [refs/heads/initializers] - make default initialisers configurable

2017-06-24 Thread jmclean
Repository: flex-falcon
Updated Branches:
  refs/heads/initializers c17bdc9a5 -> b805d6d99


make default initialisers configurable


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/62d53ed4
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/62d53ed4
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/62d53ed4

Branch: refs/heads/initializers
Commit: 62d53ed404bfa1cd2c3f75ce2463c0f01e3c7afe
Parents: c17bdc9
Author: Justin Mclean 
Authored: Fri Jun 16 12:49:57 2017 +1000
Committer: Justin Mclean 
Committed: Fri Jun 16 12:49:57 2017 +1000

--
 .../codegen/js/jx/VarDeclarationEmitter.java| 57 ++--
 .../flex/compiler/config/Configuration.java | 23 
 .../apache/flex/compiler/messages_en.properties |  1 +
 .../org/apache/flex/compiler/ant/COMPCTask.java |  1 +
 .../org/apache/flex/compiler/ant/MXMLCTask.java |  1 +
 5 files changed, 54 insertions(+), 29 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/62d53ed4/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
--
diff --git 
a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
 
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
index 67ae28f..a4c8e22 100644
--- 
a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
+++ 
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
@@ -19,6 +19,7 @@
 
 package org.apache.flex.compiler.internal.codegen.js.jx;
 
+import org.apache.flex.compiler.clients.JSConfiguration;
 import org.apache.flex.compiler.codegen.ISubEmitter;
 import org.apache.flex.compiler.codegen.js.IJSEmitter;
 import org.apache.flex.compiler.constants.IASLanguageConstants;
@@ -28,6 +29,7 @@ import 
org.apache.flex.compiler.definitions.metadata.IMetaTagAttribute;
 import org.apache.flex.compiler.internal.codegen.as.ASEmitterTokens;
 import org.apache.flex.compiler.internal.codegen.js.JSSubEmitter;
 import org.apache.flex.compiler.internal.codegen.js.flexjs.JSFlexJSEmitter;
+import org.apache.flex.compiler.internal.projects.FlexJSProject;
 import org.apache.flex.compiler.internal.tree.as.ChainedVariableNode;
 import org.apache.flex.compiler.internal.tree.as.DynamicAccessNode;
 import org.apache.flex.compiler.internal.tree.as.FunctionCallNode;
@@ -42,10 +44,14 @@ import org.apache.flex.compiler.tree.as.IVariableNode;
 public class VarDeclarationEmitter extends JSSubEmitter implements
 ISubEmitter
 {
+boolean ignoreInitilization;
 
 public VarDeclarationEmitter(IJSEmitter emitter)
 {
 super(emitter);
+
+JSConfiguration configuration = ((FlexJSProject) getProject()).config;
+ignoreInitilization = configuration.getIgnoreDefaultInitilization();
 }
 
 @Override
@@ -180,40 +186,33 @@ public class VarDeclarationEmitter extends JSSubEmitter 
implements
 IExpressionNode enode = 
node.getVariableTypeNode();//getAssignedValueNode();
 if (enode != null)
 typedef = enode.resolveType(getWalker().getProject());
-if (typedef != null)
-{
-   String defName = typedef.getQualifiedName();
-   if (defName.equals("int") || defName.equals("uint"))
-   {
-   if (node.getParent() != null &&
-   node.getParent().getParent() != 
null &&
-   
node.getParent().getParent().getNodeID() != ASTNodeID.Op_InID)
-   {
-   write(ASEmitterTokens.SPACE);
-   writeToken(ASEmitterTokens.EQUAL);
-   write("0");
-   }
-   }
-else if (defName.equals("Boolean"))
-{
+if (typedef != null) {
+String defName = typedef.getQualifiedName();
+if (defName.equals("int") || defName.equals("uint")) {
 if (node.getParent() != null &&
 node.getParent().getParent() != null &&
-node.getParent().getParent().getNodeID() != 
ASTNodeID.Op_InID)
-{
+node.getParent().getParent().getNodeID() != 
ASTNodeID.Op_InID) {
 write(ASEmitterTokens.SPACE);
 writeToken(ASEmitterTokens.EQUAL);
-write(ASEmitterT

[2/2] git commit: [flex-falcon] [refs/heads/initializers] - add config option to ignore initialisers

2017-06-24 Thread jmclean
add config option to ignore initialisers


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/b805d6d9
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/b805d6d9
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/b805d6d9

Branch: refs/heads/initializers
Commit: b805d6d995b33a96f074d06ec020938ad1956eb2
Parents: 62d53ed
Author: Justin Mclean 
Authored: Fri Jun 23 09:36:20 2017 +1000
Committer: Justin Mclean 
Committed: Fri Jun 23 09:36:20 2017 +1000

--
 .../codegen/js/jx/VarDeclarationEmitter.java   | 17 -
 .../apache/flex/compiler/config/Configuration.java |  5 ++---
 2 files changed, 10 insertions(+), 12 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b805d6d9/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
--
diff --git 
a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
 
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
index a4c8e22..3b883c8 100644
--- 
a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
+++ 
b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/jx/VarDeclarationEmitter.java
@@ -42,16 +42,15 @@ import org.apache.flex.compiler.tree.as.IExpressionNode;
 import org.apache.flex.compiler.tree.as.IVariableNode;
 
 public class VarDeclarationEmitter extends JSSubEmitter implements
-ISubEmitter
-{
-boolean ignoreInitilization;
+ISubEmitter {
 
-public VarDeclarationEmitter(IJSEmitter emitter)
-{
+public VarDeclarationEmitter(IJSEmitter emitter) {
 super(emitter);
+}
 
+protected boolean defaultInitialisation() {
 JSConfiguration configuration = ((FlexJSProject) getProject()).config;
-ignoreInitilization = configuration.getIgnoreDefaultInitilization();
+return configuration == null || 
!configuration.getIgnoreDefaultInitilization();
 }
 
 @Override
@@ -196,8 +195,8 @@ public class VarDeclarationEmitter extends JSSubEmitter 
implements
 writeToken(ASEmitterTokens.EQUAL);
 write("0");
 }
-} else if (!ignoreInitilization) {
-if (ignoreInitilization && defName.equals("Boolean")) {
+} else if (defaultInitialisation()) {
+if (defName.equals("Boolean")) {
 if (node.getParent() != null &&
 node.getParent().getParent() != null &&
 node.getParent().getParent().getNodeID() != 
ASTNodeID.Op_InID) {
@@ -205,7 +204,7 @@ public class VarDeclarationEmitter extends JSSubEmitter 
implements
 writeToken(ASEmitterTokens.EQUAL);
 write(ASEmitterTokens.FALSE);
 }
-} else if (ignoreInitilization && 
defName.equals("Number")) {
+} else if (defName.equals("Number")) {
 if (node.getParent() != null &&
 node.getParent().getParent() != null &&
 node.getParent().getParent().getNodeID() != 
ASTNodeID.Op_InID) {

http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/b805d6d9/compiler/src/main/java/org/apache/flex/compiler/config/Configuration.java
--
diff --git 
a/compiler/src/main/java/org/apache/flex/compiler/config/Configuration.java 
b/compiler/src/main/java/org/apache/flex/compiler/config/Configuration.java
index e21ef65..64ff7c9 100644
--- a/compiler/src/main/java/org/apache/flex/compiler/config/Configuration.java
+++ b/compiler/src/main/java/org/apache/flex/compiler/config/Configuration.java
@@ -3966,9 +3966,9 @@ public class Configuration
 
 /**
  * Allow the user to set Boolean and Number type to be undefined and 
ignore them being initialised
- * to false and NaN respectively. Note that use this option breaks 
compatability with ActionScript.
+ * to false and NaN respectively. Note that using this option breaks 
compatability with ActionScript.
  */
-private boolean ignoreDefaultInitilization = true;
+private boolean ignoreDefaultInitilization = false;
 
 public boolean getIgnoreDefaultInitilization()
 {
@@ -3977,7 +3977,6 @@ public class Configuration
 
 @Config(advanced = true)
 @Mapping({ "compiler", "ignore-default-initilization" })
-@FlexOnly
 public void setIgnoreDefaultInitilization(ConfigurationValue cv, boole