hi Mark,
you don't need to create entry point in such GWTD project,
You can do following (that will be re-write of steps I usually do in GWTD):
#1
create new project:
#2
uncheck "Create Entry point and public resoruces".
#3
[#########]
now look into GWT tookit sources to see how they separate modules and what are namespace names used, I usually follow GWT rules: module in parent package, "ui" in client/ui, "bindings", "impl" packages, etc
[#########]
enter package name of your module
#3
notice that wizard will generate usual "gwt.xml","public", "client", "server" packages for you
#4
hit "finish"
Lets take real example based on open sourced project:
#1
say I want to create widgets (ui elements) for sharing
#2
module will be named YUIButton and will be fictional implementation of YUI library button
#3
give package name:
- Code: Select all
com.yahoo.developer.yui
module name:
- Code: Select all
YUIButton
hit finish
#4
switch to code with, open generated YUIButton.gwt.xml module,
add line:
- Code: Select all
<source path="ui"/>
close .gwt.xml module
#5
delete generated "server" and "client" packages
#6
click on source packages and create "ui" package under main package:
- Code: Select all
com.yahoo.developer.yui.ui
now GWTD will look for files into that directory when previewing and compiling
#7
click on "ui" package and choose New>Composite. it should work in code and design view using resources from "public" folder
Now I can resuse that libary easily without exporting .jar:
#1
create new project
#2
add "YUIButton" project in source path
#3
in design view of that project you should be able to get widgets from YUIButton without actually writing a line of import or inherit statements:
- from UI inspector choose "select widget"
- type a name of your widget, e.g.; YUIPushButton, hit quick fix to import package
When GWTD place your widget in design view it should render without issue, However when you switch to code mode you should get warnings about imports. Hit "Quick Fix", GWTDesigner is smart enough to offer you an option to "Include YUIButton module inheritance " in your current project .gwt.xml module by adding "inherit" tag. Then hit "QuickFix" again now to actually add imports to code itelf,
Such generate module can be exported then into .jar or can become part of larger structure consisting of many separate projects gathered by one super "YUILibrary" project which inherits every required submodule (again, see GWT Toolkit .gwt.xml namespaces and declaration on how they do that),
regards,
Peter