Add @defs to interfaces created by the CssResource InterfaceGenerator utility class.

Patch by: srinivasanb
Review by: bobv

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7402 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/resources/css/InterfaceGenerator.java b/user/src/com/google/gwt/resources/css/InterfaceGenerator.java
index ad0e63c..0775d8e 100644
--- a/user/src/com/google/gwt/resources/css/InterfaceGenerator.java
+++ b/user/src/com/google/gwt/resources/css/InterfaceGenerator.java
@@ -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)) {