Hello, i'm trying to create a custom ResourceGenerator as an extension
of AbstractResourceGenerator. What modules i have to inherit? With
<module>
<inherits name='com.google.gwt.user.User'/>
<inherits name='com.google.gwt.resources.Resources'/>
</module>
i got a long no-source-code-available list with
AbstractResourceGenerator, TreeLogger, ResourceContext ... or is there
a special location (folder) where to put the generator implementation,
other then client ?
@ResourceGeneratorType(MyResourceGenerator.class)
public interface MyResource extends ResourcePrototype {
String content();
}
public final class MyResourceGenerator extends
AbstractResourceGenerator {
public String createAssignment(TreeLogger logger, ResourceContext
context, JMethod method)
throws UnableToCompleteException {
SourceWriter sw = new StringSourceWriter();
sw.println("MyResource() {public String content() {return
\"empty\";}");
return sw.toString();
}
}
public interface My extends ClientBundle {
public static final My MY = GWT.create(My.class);
@Source("1.my")
MyResource first();
}
I'm using GWT 2.0 RC2. Thnx!
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.