Glad that worked out for you, and thanks for posting an example. super-src
is definitely a strange concept, so it helps to have a clear example of how
to use it, and why it might be valuable :)

On Wed, Feb 24, 2010 at 11:16 AM, Tim K <timk...@gmail.com> wrote:

> Great answer Rajeev! I worked up a simple example that works in
> development
> mode and production mode. Here's the link again.
>
>
> http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml
>
> I had the mindset that the server side code always included all of
> the
> client side code. This is not the case. The fourth directory is not
> used by the server.
>
> DIRECTORY                         CLIENT PACKAGE     SERVER PACKAGE
> src\package1\client               package1.client    package1.client
> src\package1\server               -- none --         package1.server
> src\package2                      -- none --         package2
> src\package1\jscriptSrc\package2  package2           -- none --
>
> This shows that the client and server have two different definitions
> of 'package2'.
>
> Why does src\package1\jscriptSrc\package2 not create
> package1.jscriptSrc.package2?
>
>   "The <super-source> tag instructs the compiler
>   to 're-root' a source path."
>
> **** File: src\package1\Test001.gwt.xml ****
> ...
>  <source path='client' />
>  <super-source path='jscriptSrc'/>
> ...
> *********************************************
>
> Please note: This convention confuses Eclipse, so exclude
> jscriptSrc from the buildPath.
>
> This allows me to create one definition of a class for the server and
> another for the client. The server version may use any java class,
> such as java.io.File.
>
> ***** File: src\package2\WhoAmI.java *********
> package package2;
> import java.io.File;
> public class WhoAmI {
>   public static String name="Server";
> }
>
> ***** File: src\package1\jscriptSrc\package2\WhoAmI.java *********
> package package2;
> public class WhoAmI {
>   public static String name="Client";
> }
>
>
>
>
> On Feb 22, 12:14 pm, Rajeev Dayal <rda...@google.com> wrote:
> > I think you can achieve this by using GWT's <super-source> mechanism:
> >
> > http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjec...
> >
> >
> >
> > On Fri, Feb 19, 2010 at 2:48 PM, Tim K <timk...@gmail.com> wrote:
> > > I have a server version of a class in one jar, and a client version of
> > > the class in another.  The client version is restricted to JRE
> > > emulation, while the server version can use the entire JRE.  Can the
> > > google plug-in for eclipse be configured to use the server jar for the
> > > server code and the client jar for the client code?
> >
> > > *** Server jar ***
> > > class X {
> > >     X() { ... }
> > >     X( File directory ) { ..... }
> > > ...
> >
> > > *** Client jar ***
> > > class X {
> > >     X() { ... }
> > > // Can't access a file on client side, so disable this constructor
> > > //     X( File directory ) { ..... }
> > > ...
> >
> > > Regards,
> > > Tim 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<google-web-toolkit%2bunsubscr...@googlegroups.com><google-web-toolkit%2Bunsubs
> cr...@googlegroups.com>
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-web-toolkit?hl=en.
>
> --
> 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<google-web-toolkit%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
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