This is an automated email from the ASF dual-hosted git repository.

aharui pushed a commit to branch feature/rename
in repository https://gitbox.apache.org/repos/asf/royale-compiler.git

commit 6d7b9e4479b7734c0fc9e422447f4d93157b9190
Author: Alex Harui <aha...@apache.org>
AuthorDate: Tue Nov 14 22:22:03 2017 -0800

    no errors in compiler-common
---
 .../compiler/internal/mxml/MXMLDialect2006.java    |  5 ++--
 .../projects/ICompilerProjectWithNamedColor.java   | 33 ++++++++++++++++++++++
 .../compiler/internal/projects/RoyaleProject.java  |  3 +-
 3 files changed, 38 insertions(+), 3 deletions(-)

diff --git 
a/compiler-common/src/main/java/org/apache/royale/compiler/internal/mxml/MXMLDialect2006.java
 
b/compiler-common/src/main/java/org/apache/royale/compiler/internal/mxml/MXMLDialect2006.java
index 53406a0..d33c30c 100644
--- 
a/compiler-common/src/main/java/org/apache/royale/compiler/internal/mxml/MXMLDialect2006.java
+++ 
b/compiler-common/src/main/java/org/apache/royale/compiler/internal/mxml/MXMLDialect2006.java
@@ -26,6 +26,7 @@ import java.util.List;
 import org.apache.royale.compiler.common.XMLName;
 import org.apache.royale.compiler.constants.IASLanguageConstants;
 import org.apache.royale.compiler.projects.ICompilerProject;
+import org.apache.royale.compiler.projects.ICompilerProjectWithNamedColor;
 import org.apache.royale.compiler.mxml.IMXMLLanguageConstants;
 
 /**
@@ -188,7 +189,7 @@ public class MXMLDialect2006 extends MXMLDialect
         
         if (flags != null && flags.contains(TextParsingFlags.ALLOW_COLOR_NAME))
         {
-            value = project.getNamedColor(s);
+            value = ((ICompilerProjectWithNamedColor)project).getNamedColor(s);
             if (value != null)
                 return value;
         }
@@ -223,7 +224,7 @@ public class MXMLDialect2006 extends MXMLDialect
         
         if (flags != null && flags.contains(TextParsingFlags.ALLOW_COLOR_NAME))
         {
-            Integer colorValue = project.getNamedColor(s);
+            Integer colorValue = 
((ICompilerProjectWithNamedColor)project).getNamedColor(s);
             if (colorValue != null)
                 return colorValue.longValue();
         }
diff --git 
a/compiler-common/src/main/java/org/apache/royale/compiler/projects/ICompilerProjectWithNamedColor.java
 
b/compiler-common/src/main/java/org/apache/royale/compiler/projects/ICompilerProjectWithNamedColor.java
new file mode 100644
index 0000000..5455232
--- /dev/null
+++ 
b/compiler-common/src/main/java/org/apache/royale/compiler/projects/ICompilerProjectWithNamedColor.java
@@ -0,0 +1,33 @@
+/*
+ *
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+package org.apache.royale.compiler.projects;
+
+/**
+ * All IProject implementations aggregate a project scope containing global
+ * definitions, a set of CompilationUnits, and a graph of dependencies between
+ * the CompilationUnits.
+ */
+public interface ICompilerProjectWithNamedColor extends ICompilerProject
+{
+    /**
+     * @return an Integer with RRGGBB for an HTML Color name such as "red".
+     */
+    Integer getNamedColor(String s);
+}
diff --git 
a/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java
 
b/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java
index 8057b2a..ef2b92d 100644
--- 
a/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java
+++ 
b/compiler/src/main/java/org/apache/royale/compiler/internal/projects/RoyaleProject.java
@@ -85,6 +85,7 @@ import 
org.apache.royale.compiler.internal.workspaces.Workspace;
 import org.apache.royale.compiler.mxml.IMXMLLanguageConstants;
 import org.apache.royale.compiler.mxml.IMXMLManifestManager;
 import org.apache.royale.compiler.mxml.IMXMLNamespaceMapping;
+import org.apache.royale.compiler.projects.ICompilerProjectWithNamedColor;
 import org.apache.royale.compiler.projects.IRoyaleProject;
 import org.apache.royale.compiler.scopes.IDefinitionSet;
 import org.apache.royale.compiler.targets.ISWCTarget;
@@ -105,7 +106,7 @@ import com.google.common.collect.ImmutableList;
  * {@code RoyaleProject} extends {@code ASProject} to add support for compiling
  * .mxml, .css, and .properties files.
  */
-public class RoyaleProject extends ASProject implements IRoyaleProject
+public class RoyaleProject extends ASProject implements IRoyaleProject, 
ICompilerProjectWithNamedColor
 {
     // TODO Remove the redundant fooClass (a qname String) field
     // when we have a fooClassName (an AET Name) field. We can always

-- 
To stop receiving notification emails like this one, please contact
"commits@royale.apache.org" <commits@royale.apache.org>.

Reply via email to