I've got BlueprintGwtCss.css:
...

/* The last column in a row needs this class. */
.last {
    margin-right: 0;
}

...

, which I generate the interface using InterfaceGenerator:


// DO NOT EDIT
// Automatically generated by
com.google.gwt.resources.css.InterfaceGenerator
package my.pkg.client.ui;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.resources.client.CssResource.ClassName;
interface BlueprintGwtCss extends CssResource {
...

  String last();
...
}


Separately, I have MyappGwtCss.css:

...
.motto span.BlueprintGwtCss-last {
    position: relative;
    left: 280px;
    color: red;
}
...

, which I also generate the interface using InterfaceGenerator:


// DO NOT EDIT
// Automatically generated by
com.google.gwt.resources.css.InterfaceGenerator
package my.pkg.client.ui;
import com.google.gwt.resources.client.CssResource;
import com.google.gwt.resources.client.CssResource.ClassName;
interface MyappGwtCss extends CssResource {
...
  @ClassName("BlueprintGwtCss-last")
  String blueprintGwtCssLast();

  String motto();
...
}


And, I have them both added to my ClientBundle:


package my.pkg.client.ui;

import com.google.gwt.core.client.GWT;
import com.google.gwt.resources.client.CssResource;

public interface ClientBundle extends
com.google.gwt.resources.client.ClientBundle {
    public static final ClientBundle INSTANCE =
GWT.create(ClientBundle.class);

 
@com.google.gwt.resources.client.ClientBundle.Source("BlueprintGwtCss.css")
    BlueprintGwtCss blueprintCss();

 
@com.google.gwt.resources.client.ClientBundle.Source("MyappGwtCss.css")
    @CssResource.Import({BlueprintGwtCss.class})
    MyappGwtCss myappCss();
...
}


Notice that in MyappGwtCss.css, I attempt to refer to a prefixed class
defined in BlueprintGwtCss.css. However, something's wrong:

[INFO] [gwt:generateAsync {execution: default}]
[INFO] [gwt:css {execution: generate-css}]
[INFO] Generating [...]/target/generated-sources/gwt/my/pkg/client/ui/
BlueprintGwtCss.java with typeName my.pkg.client.ui.BlueprintGwtCss
[INFO] Generating [...]/target/generated-sources/gwt/my/pkg/client/ui/
MyappGwtCss.java with typeName my.pkg.client.ui.MyappGwtCss
...
[INFO] [gwt:compile {execution: default}]
[INFO] auto discovered modules [my.pkg.MyModule]
[INFO] Compiling module my.pkg.MyModule
[INFO]    Scanning for additional dependencies: file:[...]/myapp/src/
main/java/my/pkg/client/ui/ClientBundle.java
[INFO]       Computing all possible rebind results for
'my.pkg.client.ui.ClientBundle'
[INFO]          Rebinding my.pkg.client.ui.ClientBundle
[INFO]             Invoking generator
com.google.gwt.resources.rebind.context.InlineClientBundleGenerator
[INFO]                Creating assignment for myappCss()
[INFO]                   Replacing CSS class names
[INFO]                      The following obfuscated style classes
were missing from the source CSS file:
[INFO]                         [ERROR] BlueprintGwtCss-last: Fix by
adding .BlueprintGwtCss-last{}
[INFO]                   [ERROR] Unable to process CSS
...

In other words, I think that I have failed to understand how to
correctly reference a style name defined in an imported scope, but
(since I'm using InterfaceGenerator and regenerating the interfaces at
build time) I am pretty sure that @ImportedWithPrefix will not help.

Can anyone see what I've done wrong? Any CssResource gurus out there?

Thanks,
Tommy K

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-tool...@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to