This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git
The following commit(s) were added to refs/heads/develop by this push:
new 8efcd55 Get JS compiler to report error or warning
8efcd55 is described below
commit 8efcd5518e9355fcbbefc40c174f2f7b1b7d8630
Author: Alex Harui <[email protected]>
AuthorDate: Tue Feb 6 23:29:21 2018 -0800
Get JS compiler to report error or warning
---
.../apache/royale/compiler/clients/MXMLJSC.java | 23 +++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git
a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
index c09d37b..d527469 100644
--- a/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
+++ b/compiler-jx/src/main/java/org/apache/royale/compiler/clients/MXMLJSC.java
@@ -34,6 +34,7 @@ import java.util.Set;
import java.util.TreeSet;
import org.apache.commons.io.FilenameUtils;
+import org.apache.royale.compiler.clients.problems.CompilerProblemCategorizer;
import org.apache.royale.compiler.clients.problems.ProblemPrinter;
import org.apache.royale.compiler.clients.problems.ProblemQuery;
import org.apache.royale.compiler.clients.problems.ProblemQueryProvider;
@@ -44,6 +45,7 @@ import org.apache.royale.compiler.common.VersionInfo;
import org.apache.royale.compiler.config.Configuration;
import org.apache.royale.compiler.config.ConfigurationBuffer;
import org.apache.royale.compiler.config.Configurator;
+import org.apache.royale.compiler.config.ICompilerProblemSettings;
import org.apache.royale.compiler.config.ICompilerSettingsConstants;
import org.apache.royale.compiler.driver.js.IJSApplication;
import org.apache.royale.compiler.exceptions.ConfigurationException;
@@ -289,7 +291,7 @@ public class MXMLJSC implements JSCompilerEntryPoint,
ProblemQueryProvider,
if (printProblems)
{
final WorkspaceProblemFormatter formatter = new
WorkspaceProblemFormatter(
- workspace);
+ workspace, createProblemCategorizer());
final ProblemPrinter printer = new
ProblemPrinter(formatter);
printer.printProblems(problems);
}
@@ -984,4 +986,23 @@ public class MXMLJSC implements JSCompilerEntryPoint,
ProblemQueryProvider,
code == ExitCode.FAILED_WITH_CONFIG_PROBLEMS.getCode();
}
+ /**
+ * Set up any user defines customization of the problem severities.
+ *
+ */
+ private CompilerProblemCategorizer createProblemCategorizer()
+ {
+ ICompilerProblemSettings problemSettings = null;
+ try
+ {
+ problemSettings = projectConfigurator.getCompilerProblemSettings();
+ }
+ catch (Exception e)
+ {
+ // Create a categorizer that will only use default settings.
+ }
+
+ return new CompilerProblemCategorizer(problemSettings);
+ }
+
}
--
To stop receiving notification emails like this one, please contact
[email protected].