You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ah...@apache.org on 2013/11/18 20:36:36 UTC
[2/2] git commit: [flex-falcon] [refs/heads/develop] - better FB
integration
better FB integration
Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/a309f44b
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/a309f44b
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/a309f44b
Branch: refs/heads/develop
Commit: a309f44b9061262499fbb49977dda3945678de42
Parents: fd89dd0
Author: Alex Harui <ah...@apache.org>
Authored: Mon Nov 18 11:30:55 2013 -0800
Committer: Alex Harui <ah...@apache.org>
Committed: Mon Nov 18 11:30:55 2013 -0800
----------------------------------------------------------------------
.../apache/flex/compiler/clients/COMPJSC.java | 1 +
.../apache/flex/compiler/clients/MXMLJSC.java | 24 ++++++++++++++++++--
2 files changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a309f44b/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java b/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
index 4702195..d30d90f 100644
--- a/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
+++ b/compiler.jx/src/org/apache/flex/compiler/clients/COMPJSC.java
@@ -375,6 +375,7 @@ public class COMPJSC extends MXMLJSC
return true;
}
+ @Override
protected TargetType getTargetType()
{
return TargetType.SWC;
http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a309f44b/compiler.jx/src/org/apache/flex/compiler/clients/MXMLJSC.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/clients/MXMLJSC.java b/compiler.jx/src/org/apache/flex/compiler/clients/MXMLJSC.java
index ca717c3..841b815 100644
--- a/compiler.jx/src/org/apache/flex/compiler/clients/MXMLJSC.java
+++ b/compiler.jx/src/org/apache/flex/compiler/clients/MXMLJSC.java
@@ -51,6 +51,7 @@ import org.apache.flex.compiler.internal.codegen.js.JSPublisher;
import org.apache.flex.compiler.internal.codegen.js.JSSharedData;
import org.apache.flex.compiler.internal.codegen.js.goog.JSGoogPublisher;
import org.apache.flex.compiler.internal.codegen.mxml.flexjs.MXMLFlexJSPublisher;
+import org.apache.flex.compiler.internal.config.FlashBuilderConfigurator;
import org.apache.flex.compiler.internal.driver.as.ASBackend;
import org.apache.flex.compiler.internal.driver.js.amd.AMDBackend;
import org.apache.flex.compiler.internal.driver.js.goog.GoogBackend;
@@ -70,6 +71,7 @@ import org.apache.flex.compiler.problems.UnexpectedExceptionProblem;
import org.apache.flex.compiler.projects.ICompilerProject;
import org.apache.flex.compiler.targets.ITarget;
import org.apache.flex.compiler.targets.ITargetSettings;
+import org.apache.flex.compiler.targets.ITarget.TargetType;
import org.apache.flex.compiler.units.ICompilationUnit;
import org.apache.flex.utils.FileUtils;
import org.apache.flex.utils.FilenameNormalization;
@@ -638,8 +640,11 @@ public class MXMLJSC
try
{
- projectConfigurator.setConfiguration(args,
- ICompilerSettingsConstants.FILE_SPECS_VAR);
+ if (useFlashBuilderProjectFiles(args))
+ projectConfigurator.setConfiguration(FlashBuilderConfigurator.computeFlashBuilderArgs(args, getTargetType().getExtension()),
+ ICompilerSettingsConstants.FILE_SPECS_VAR);
+ else
+ projectConfigurator.setConfiguration(args, ICompilerSettingsConstants.FILE_SPECS_VAR);
projectConfigurator.applyToProject(project);
problems = new ProblemQuery(
projectConfigurator.getCompilerProblemSettings());
@@ -681,6 +686,21 @@ public class MXMLJSC
}
}
+ private boolean useFlashBuilderProjectFiles(String[] args)
+ {
+ for (String arg : args)
+ {
+ if (arg.equals("-fb") || arg.equals("-use-flashbuilder-project-files"))
+ return true;
+ }
+ return false;
+ }
+
+ protected TargetType getTargetType()
+ {
+ return TargetType.SWF;
+ }
+
/**
* Validate target file.
*