flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [06/14] git commit: [flex-falcon] [refs/heads/develop] - - Merged latest changes from develop - Hopefully fixed an issue if the closure-lib is specified on the commandline/ant
Date Thu, 10 Nov 2016 17:40:39 GMT
- Merged latest changes from develop
- Hopefully fixed an issue if the closure-lib is specified on the commandline/ant


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

Branch: refs/heads/develop
Commit: 10e23ff62fcd086ebc2502709368875cf22bdc26
Parents: dd6e2c1 9f20c16
Author: Christofer Dutz <christofer.dutz@codecentric.de>
Authored: Sat Nov 5 09:50:11 2016 +0100
Committer: Christofer Dutz <christofer.dutz@codecentric.de>
Committed: Sat Nov 5 09:50:11 2016 +0100

----------------------------------------------------------------------
 Jenkinsfile                                     |   13 +-
 compiler-jx/pom.xml                             |    7 +-
 .../apache/flex/compiler/clients/ASDOCJSC.java  |    5 -
 .../apache/flex/compiler/clients/COMPJSC.java   |    5 -
 .../apache/flex/compiler/clients/MXMLJSC.java   |   51 +-
 .../flex/compiler/clients/VF2JSToolGroup.java   |   35 -
 .../flex/compiler/codegen/as/IASEmitter.java    |    3 +
 .../codegen/js/vf2js/IJSVF2JSEmitter.java       |   30 -
 .../internal/codegen/as/ASBlockWalker.java      |    2 +-
 .../compiler/internal/codegen/as/ASEmitter.java |    6 +
 .../internal/codegen/js/JSEmitterTokens.java    |    1 +
 .../internal/codegen/js/JSPublisher.java        |   15 +-
 .../codegen/js/flexjs/JSFlexJSDocEmitter.java   |    1 -
 .../codegen/js/flexjs/JSFlexJSEmitter.java      |   64 +
 .../codegen/js/goog/JSGoogDocEmitter.java       |    1 -
 .../codegen/js/goog/JSGoogPublisher.java        |  169 +-
 .../internal/codegen/js/goog/JarSourceFile.java |  117 ++
 .../internal/codegen/js/jsc/JSCPublisher.java   |    4 +-
 .../codegen/js/jx/BinaryOperatorEmitter.java    |   28 +-
 .../codegen/js/jx/MemberAccessEmitter.java      |   13 +-
 .../js/jx/ObjectDefinePropertyEmitter.java      |    1 -
 .../codegen/js/jx/SuperCallEmitter.java         |   68 +-
 .../internal/codegen/js/node/NodePublisher.java |    4 +-
 .../codegen/js/vf2js/JSVF2JSDocEmitter.java     |  270 ---
 .../codegen/js/vf2js/JSVF2JSEmitter.java        | 1950 ------------------
 .../mxml/flexjs/MXMLFlexJSPublisher.java        |  698 +++----
 .../vf2js/MXMLVF2JSDescriptorSpecifier.java     |  337 ---
 .../codegen/mxml/vf2js/MXMLVF2JSEmitter.java    | 1589 --------------
 .../codegen/mxml/vf2js/MXMLVF2JSPublisher.java  |  600 ------
 .../driver/js/vf2js/JSVF2JSConfiguration.java   |   86 -
 .../internal/driver/js/vf2js/VF2JSBackend.java  |   55 -
 .../driver/mxml/vf2js/MXMLVF2JSBackend.java     |  132 --
 .../driver/mxml/vf2js/MXMLVF2JSSWCBackend.java  |  121 --
 .../compiler/internal/graph/GoogDepsWriter.java |   19 +-
 .../internal/graph/VF2JSDepsWriter.java         |  406 ----
 .../internal/projects/FlexJSProject.java        |    1 -
 .../internal/visitor/as/ASNodeSwitch.java       |    1 -
 .../utils/JSClosureCompilerWrapper.java         |   15 +-
 .../utils/VF2JSClosureCompilerWrapper.java      |  224 --
 .../flex/compiler/utils/VF2JSProjectUtils.java  |  132 --
 .../org.apache.flex.tools.FlexToolGroup         |    1 -
 .../flexjs/closure-whitelist.properites         |   44 +
 compiler-jx/src/test/build.xml                  |    2 -
 .../js/flexjs/TestFlexJSAccessorMembers.java    |    8 +-
 .../codegen/js/flexjs/TestFlexJSClass.java      |    6 +-
 .../js/flexjs/TestFlexJSExpressions.java        |   16 +-
 .../codegen/js/vf2js/TestVF2JSClass.java        |  401 ----
 .../codegen/js/vf2js/TestVF2JSExpressions.java  |  124 --
 .../codegen/js/vf2js/TestVF2JSFile.java         |   92 -
 .../codegen/js/vf2js/TestVF2JSProject.java      |  131 --
 .../codegen/js/vf2js/TestVF2JSStatements.java   |  549 -----
 .../mxml/flexjs/TestFlexJSMXMLScript.java       |    2 +-
 .../mxml/vf2js/TestVF2JSMXMLApplication.java    |   97 -
 .../internal/test/VF2JSMXMLTestBase.java        |  219 --
 .../compiler/internal/test/VF2JSTestBase.java   |  238 ---
 .../flexjs/projects/super/Base_result.js        |    6 +-
 .../src/test/resources/vf2js/files/SimpleAS.as  |   43 -
 .../resources/vf2js/files/SimpleAS_result.js    |   72 -
 .../test/resources/vf2js/files/SimpleMXML.mxml  |   28 -
 .../resources/vf2js/files/SimpleMXML_result.js  |   67 -
 .../src/test/resources/vf2js/files/Version.as   |   25 -
 .../resources/vf2js/projects/interfaces/Test.as |   46 -
 .../vf2js/projects/interfaces/Test_result.js    |   64 -
 .../vf2js/projects/interfaces/classes/A.as      |   32 -
 .../projects/interfaces/classes/A_result.js     |   51 -
 .../vf2js/projects/interfaces/classes/B.as      |   25 -
 .../projects/interfaces/classes/B_result.js     |   37 -
 .../vf2js/projects/interfaces/classes/C.as      |   25 -
 .../projects/interfaces/classes/C_result.js     |   37 -
 .../vf2js/projects/interfaces/interfaces/IA.as  |   22 -
 .../projects/interfaces/interfaces/IA_result.js |   41 -
 .../vf2js/projects/interfaces/interfaces/IB.as  |   22 -
 .../projects/interfaces/interfaces/IB_result.js |   38 -
 .../vf2js/projects/interfaces/interfaces/IC.as  |   22 -
 .../projects/interfaces/interfaces/IC_result.js |   41 -
 .../vf2js/projects/interfaces/interfaces/ID.as  |   22 -
 .../projects/interfaces/interfaces/ID_result.js |   38 -
 .../vf2js/projects/interfaces/interfaces/IE.as  |   26 -
 .../projects/interfaces/interfaces/IE_result.js |   53 -
 .../vf2js/projects/sdk/SomeSDKClass.as          |   68 -
 .../vf2js/projects/sdk/SomeSDKClass_result.js   |  114 -
 .../vf2js/projects/sdk/bases/HelperBaseClass.as |   33 -
 .../sdk/bases/HelperBaseClass_result.js         |   46 -
 .../simpleMXML/src/SimpleMXML_Project.mxml      |   37 -
 .../simpleMXML/src/SimpleMXML_Project_result.js |   68 -
 .../simpleMXML/src/example/Component.as         |   31 -
 .../simpleMXML/src/example/Component_result.js  |   45 -
 .../test/resources/vf2js/projects/super/Base.as |   65 -
 .../vf2js/projects/super/Base_result.js         |  120 --
 .../resources/vf2js/projects/super/Super.as     |   54 -
 .../vf2js/projects/super/Super_result.js        |   89 -
 .../clients/problems/ProblemContext.java        |   42 +
 .../flex/compiler/config/Configuration.java     |    5 +
 .../compiler/internal/embedding/EmbedData.java  |    3 +
 .../internal/embedding/EmbedMIMEType.java       |    2 +
 .../internal/mxml/MXMLTagAttributeData.java     |    2 +
 .../compiler/internal/mxml/MXMLTagData.java     |    4 +
 .../compiler/internal/mxml/MXMLTextData.java    |    2 +
 .../compiler/internal/tree/as/EmbedNode.java    |   36 +
 .../flex/compiler/problems/CompilerProblem.java |   59 +-
 .../src/main/java/flex2/tools/MxmlJSC.java      |    4 -
 .../resources/config/compile-extern-config.xml  |    4 +
 102 files changed, 931 insertions(+), 10094 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/10e23ff6/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
----------------------------------------------------------------------
diff --cc compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
index 4791887,e2c28d5..00f755e
--- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
+++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/codegen/js/goog/JSGoogPublisher.java
@@@ -271,43 -252,91 +252,91 @@@ public class JSGoogPublisher extends JS
          fw.close();
      }
  
+     protected List<SourceFile> getClasspathResources(File jarFile) throws IOException
{
+         return getClasspathResources(jarFile, null);
+     }
+ 
+     protected List<SourceFile> getClasspathResources(File jarFile, Properties whiteList)
throws IOException {
+         List<SourceFile> sourceFiles = new LinkedList<SourceFile>();
+ 
+         JarFile jar = null;
+         try {
+             jar = new JarFile(jarFile);
+             for (Enumeration<JarEntry> jarEntries = jar.entries(); jarEntries.hasMoreElements();
) {
+                 JarEntry jarEntry = jarEntries.nextElement();
+                 String fileName = jarEntry.getName();
+                 // Add only JS files and if a white-list is specified, only files on that
white-list.
+                 if (fileName.endsWith(".js") && ((whiteList == null) || (whiteList.containsKey(fileName))))
{
+                     // Dump the file.
+                     InputStream is = jar.getInputStream(jarEntry);
+                     String code = IOUtils.toString(is, "UTF-8");
+                     SourceFile sourceFile = new JarSourceFile(jarEntry.getName(), code,
false);
+                     is.close();
+                     sourceFiles.add(sourceFile);
+                 }
+             }
+         } finally {
+             if(jar != null) {
+                 jar.close();
+             }
+         }
+ 
+         return sourceFiles;
+     }
+ 
+     protected List<SourceFile> getDirectoryResources(File directory) throws IOException
{
+         List<SourceFile> sourceFiles = new LinkedList<SourceFile>();
+ 
+         Collection<File> files = FileUtils.listFiles(directory,
+                 new RegexFileFilter("^.*(\\.js)"), DirectoryFileFilter.DIRECTORY);
+         for (File file : files)
+         {
+             String relative = directory.toURI().relativize(file.toURI()).getPath();
+             String code = FileUtils.readFileToString(file, "UTF-8");
+             SourceFile sourceFile = new JarSourceFile(relative, code, false);
+             sourceFiles.add(sourceFile);
+         }
+ 
+         return sourceFiles;
+     }
+ 
      protected void dumpJar(File jarFile, File outputDir) throws IOException
      {
 -        // TODO (mschmalle) for some reason ide thinks this has not been closed
 -        @SuppressWarnings("resource")
 -        JarFile jar = new JarFile(jarFile);
 +        try {
 +            // TODO (mschmalle) for some reason ide thinks this has not been closed
 +            @SuppressWarnings("resource")
 +            JarFile jar = new JarFile(jarFile);
  
 -        for (Enumeration<JarEntry> jarEntries = jar.entries(); jarEntries.hasMoreElements();)
 -        {
 -            JarEntry jarEntry = jarEntries.nextElement();
 -            if (!jarEntry.getName().endsWith("/"))
 -            {
 -                File file = new File(outputDir, jarEntry.getName());
 -
 -                // Check if the parent directory exists. If not -> create it.
 -                File dir = file.getParentFile();
 -                if (!dir.exists())
 -                {
 -                    if (!dir.mkdirs())
 -                    {
 -                        throw new IOException("Unable to create directory "
 -                                + dir.getAbsolutePath());
 +            for (Enumeration<JarEntry> jarEntries = jar.entries(); jarEntries.hasMoreElements();
) {
 +                JarEntry jarEntry = jarEntries.nextElement();
 +                if (!jarEntry.getName().endsWith("/")) {
 +                    File file = new File(outputDir, jarEntry.getName());
 +
 +                    // Check if the parent directory exists. If not -> create it.
 +                    File dir = file.getParentFile();
 +                    if (!dir.exists()) {
 +                        if (!dir.mkdirs()) {
 +                            throw new IOException("Unable to create directory "
 +                                    + dir.getAbsolutePath());
 +                        }
                      }
 -                }
  
 -                // Dump the file.
 -                InputStream is = jar.getInputStream(jarEntry);
 -                FileOutputStream fos = new FileOutputStream(file);
 -                while (is.available() > 0)
 -                {
 -                    fos.write(is.read());
 +                    // Dump the file.
 +                    InputStream is = jar.getInputStream(jarEntry);
 +                    FileOutputStream fos = new FileOutputStream(file);
 +                    while (is.available() > 0) {
 +                        fos.write(is.read());
 +                    }
 +                    fos.close();
 +                    is.close();
                  }
 -                fos.close();
 -                is.close();
              }
 -        }
  
 -        jar.close();
 +            jar.close();
 +        }catch(Throwable t) {
 +            t.printStackTrace();
 +            throw new RuntimeException(t);
 +        }
      }
  
      public class JSGoogErrorManager implements ErrorManager


Mime
View raw message