Revision: 7429
Author: [email protected]
Date: Tue Jan 19 07:30:50 2010
Log: Merge tr...@7402 to add @defs to interfaces created by the CssResource InterfaceGenerator utility class.

$ svn merge -c 7402 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk

http://code.google.com/p/google-web-toolkit/source/detail?r=7429

Modified:
 /releases/2.0/branch-info.txt
 /releases/2.0/user/src/com/google/gwt/resources/css/InterfaceGenerator.java

=======================================
--- /releases/2.0/branch-info.txt       Tue Jan 19 07:13:03 2010
+++ /releases/2.0/branch-info.txt       Tue Jan 19 07:30:50 2010
@@ -1267,3 +1267,7 @@
   Disables composition of lossy source images.
svn merge -c 7424 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk

+tr...@7402 was merged into this branch
+ Add @defs to interfaces created by the CssResource InterfaceGenerator utility class. + svn merge -c 7402 --ignore-ancestry https://google-web-toolkit.googlecode.com/svn/trunk
+
=======================================
--- /releases/2.0/user/src/com/google/gwt/resources/css/InterfaceGenerator.java Mon Nov 2 12:44:54 2009 +++ /releases/2.0/user/src/com/google/gwt/resources/css/InterfaceGenerator.java Tue Jan 19 07:30:50 2010
@@ -43,7 +43,7 @@
  */
 public class InterfaceGenerator extends ToolBase {

- private static final Comparator<String> CSS_CLASS_COMPARATOR = new Comparator<String>() { + private static final Comparator<String> NAME_COMPARATOR = new Comparator<String>() {
     public int compare(String o1, String o2) {
       return o1.compareToIgnoreCase(o2);
     }
@@ -217,9 +217,12 @@
     // Create AST
CssStylesheet sheet = GenerateCssAst.exec(logger, inputFile.toURI().toURL());

-    // Sort all class names
-    Set<String> classNames = new TreeSet<String>(CSS_CLASS_COMPARATOR);
-    classNames.addAll(ExtractClassNamesVisitor.exec(sheet));
+    // Sort all names
+    Set<String> names = new TreeSet<String>(NAME_COMPARATOR);
+    names.addAll(ExtractClassNamesVisitor.exec(sheet));
+    DefsCollector defs = new DefsCollector();
+    defs.accept(sheet);
+    names.addAll(defs.getDefs());

     // Deduplicate method names
     Set<String> methodNames = new HashSet<String>();
@@ -240,7 +243,7 @@
     sw.println("interface " + interfaceName.substring(lastDot + 1)
         + " extends CssResource {");
     sw.indent();
-    for (String className : classNames) {
+    for (String className : names) {
       String methodName = methodName(className);

       while (!methodNames.add(methodName)) {
-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to