You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by jo...@apache.org on 2019/08/19 16:30:23 UTC
[royale-compiler] 02/02: compiler-jx: some more verbose messages
This is an automated email from the ASF dual-hosted git repository.
joshtynjala pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
commit b5eba6583982965a1c0d4df0b836e6269df623f8
Author: Josh Tynjala <jo...@apache.org>
AuthorDate: Mon Aug 19 09:25:25 2019 -0700
compiler-jx: some more verbose messages
---
.../compiler/internal/codegen/js/jx/ClassEmitter.java | 17 +++++++++++++++--
.../internal/codegen/js/utils/DocEmitterUtils.java | 5 +++--
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ClassEmitter.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ClassEmitter.java
index df85044..4c1877d 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ClassEmitter.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/jx/ClassEmitter.java
@@ -19,6 +19,8 @@
package org.apache.royale.compiler.internal.codegen.js.jx;
+import java.util.List;
+
import org.apache.royale.compiler.asdoc.royale.ASDocComment;
import org.apache.royale.compiler.codegen.ISubEmitter;
import org.apache.royale.compiler.codegen.js.IJSEmitter;
@@ -55,9 +57,11 @@ public class ClassEmitter extends JSSubEmitter implements
@Override
public void emit(IClassNode node)
{
- boolean keepASDoc = false;
+ boolean keepASDoc = false;
+ boolean verbose = false;
RoyaleJSProject project = (RoyaleJSProject)getEmitter().getWalker().getProject();
keepASDoc = project.config != null && project.config.getKeepASDoc();
+ verbose = project.config != null && project.config.isVerbose();
getModel().pushClass(node.getDefinition());
@@ -66,7 +70,16 @@ public class ClassEmitter extends JSSubEmitter implements
ASDocComment asDoc = (ASDocComment) node.getASDocComment();
if (asDoc != null && keepASDoc)
- DocEmitterUtils.loadImportIgnores(fjs, asDoc.commentNoEnd());
+ {
+ List<String> ignoreList = DocEmitterUtils.loadImportIgnores(fjs, asDoc.commentNoEnd());
+ if(verbose)
+ {
+ for(String ignorable : ignoreList)
+ {
+ System.out.println("Found ignorable: " + ignorable);
+ }
+ }
+ }
boolean suppressExport = (asDoc != null && DocEmitterUtils.hasSuppressExport(fjs, asDoc.commentNoEnd()));
diff --git a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/utils/DocEmitterUtils.java b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/utils/DocEmitterUtils.java
index 2e03bb0..a188e76 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/utils/DocEmitterUtils.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/internal/codegen/js/utils/DocEmitterUtils.java
@@ -20,6 +20,7 @@
package org.apache.royale.compiler.internal.codegen.js.utils;
import java.util.ArrayList;
+import java.util.List;
import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleDocEmitter;
import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitter;
@@ -27,7 +28,7 @@ import org.apache.royale.compiler.internal.codegen.js.royale.JSRoyaleEmitterToke
public class DocEmitterUtils
{
- public static void loadImportIgnores(JSRoyaleEmitter emitter, String doc)
+ public static List<String> loadImportIgnores(JSRoyaleEmitter emitter, String doc)
{
ArrayList<String> ignoreList = new ArrayList<String>();
String ignoreToken = JSRoyaleEmitterTokens.IGNORE_IMPORT.getToken();
@@ -39,12 +40,12 @@ public class DocEmitterUtils
ignorable = ignorable.substring(0, endIndex);
ignorable = ignorable.trim();
ignoreList.add(ignorable);
- System.out.println("Found ignorable: " + ignorable);
index = doc.indexOf(ignoreToken, index + endIndex);
}
// TODO (mschmalle)
((JSRoyaleDocEmitter)emitter.getDocEmitter()).setClassIgnoreList(ignoreList);
+ return ignoreList;
}