Multiple source folders in Eclipse

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Multiple source folders in Eclipse

Postby ftr » Mon Sep 20, 2010 6:53 am

Hey there,

The free release of GWT Designer has prompted me to try it out on a GXT project that is currently in development.

We're using Maven for our build, and the Maven Eclipse Plugin (mvn eclipse:eclipse) to turn our Maven modules into Eclipse projects. We're sticking to the Maven convention of putting our Java sources into the source folder "src/main/java" and our other resources (e.g. XML-Files) into "src/main/resources". This means that our GWT-Module definition files (*.gwt.xml) are located in another source folder than the Java sources that belong to that module.

When I try to add a new GXT-Dialog to the Java source folder, I get the error message "GWT widgets can be used only in client package of some GWT module". It certainly is a client package of some GWT-Module, just not in the same source folder. This happens as well if I add a simple Web Application Project via the Google Plugin for Eclipse, create a new source folder "resources" and move the GWT module definition file there.

Is there currently a way for GWT Designer to check all source folders of a product? Am I doing something wrong conceptually by putting the Module definition file in a "resources" folder in the first place?

Thanks in advance,
Florian
ftr
 
Posts: 5
Joined: Mon Sep 20, 2010 6:35 am

Re: Multiple source folders in Eclipse

Postby Eric Clayberg » Tue Sep 21, 2010 7:50 pm

This has been fixed for the next build which will be available in the near future.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Multiple source folders in Eclipse

Postby shanloid » Thu Jan 27, 2011 6:52 pm

Just following up on this one, as we are having a similar problem with a GWT 2.0.4 project which we have just inherited, and which has all of the java/uibinder stuff in src/main/java, but all of the referenced css files in src/main/otherfolder (same project, but different source folder). Everything builds fine from the command line, but none of the css resources can be resolved in Eclipse. If I move one of the css files into src/main/java, then the css is resolved by Eclipse. So I suspect that this is the GPE failing to resolve resources on the classpath in source folders other than src/main/java. Yes? No?

FYI, we are using GPE 1.4.2.v201012211742, which was released 3 months after Eric's post, so I'm a bit puzzled as to why we would still be seeing this behaviour.

Cheers,
Shannon
shanloid
 
Posts: 2
Joined: Thu Jan 27, 2011 6:44 pm

Re: Multiple source folders in Eclipse

Postby Eric Clayberg » Thu Jan 27, 2011 7:47 pm

Are you asking a question about GWT Designer or GPE?

If it is a GWT Designer question, what version are you using?

In general, we need to see a complete test case project that illustrates the problem you are having.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Multiple source folders in Eclipse

Postby shanloid » Thu Jan 27, 2011 8:03 pm

Our problem is not related to GWT Designer, but relates to what I believe was the OP's problem, i.e. that resources in source folders other than src/main/java were not being resolved inside Eclipse.

I will see if I can put together a test case that illustrates the problem.

In the meantime, can you just confirm that classpath resources in all source folders in Eclipse (not just src/main/java and src/main/resources) should be picked up by the GPE version that we are using?

Thanks,
Shannon
shanloid
 
Posts: 2
Joined: Thu Jan 27, 2011 6:44 pm

Re: Multiple source folders in Eclipse

Postby Eric Clayberg » Thu Jan 27, 2011 8:11 pm

I am not aware of any problems with the GPE resolving resources in projects like that (typically formatted for use with Maven). You should always make sure that you are using the latest release of GWT (2.1.1).

I would recommend asking general GWT/GPE questions like this in Google's GWT forum.

We would like to keep this forum focussed specifically on GWT Designer related issues.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest

cron