Tuesday, February 10, 2015

Re: I need java.util.Collections synchronized classes.

probably something like

<inherits name='java.util' />

and having src/java/util/Collections.java

The com.google.gwt.user.User was an example for my case - not yours. You have to adapt it accordingly.

     Vassilis


On Tue, Feb 10, 2015 at 5:40 PM, <ehodges@usdataworks.com> wrote:
I have a couple of GWT module files.  One of them inherits com.google.gwt.user.User.  In that one I've tried to override Google's implementation of java.util.Collections.  I've placed their Collections.java file under the paths src/emul/java/util and src/java/util, but when I compile my GWT code my version of Collections.java isn't being used.

Is there something I need to do in my gwt.xml file to include the source path containing my version of Collections.java?  My gwt.xml is located at src/com/mycompany.  It includes a lot of <source> tags to pick and choose which of our Java files are compiled for GWT.  Is my use of <source> tags excluding my version of Collections.java?  If so, how do I include it, since it isn't under the src/com/mycompany path?

On Tuesday, February 10, 2015 at 2:55:22 AM UTC-6, Vassilis Virvilis wrote:
You need to create a a GWT module file gwt.xml file. Please see http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.html

Basically from your master .gwt.xml you inherit the module with the files to super source.

In my case I wanted to override google's PopupPanel so

in my master.gwt.xml I have
    ...
    <inherits name='com.google.gwt.user.User' />
    ...

and in my src/

    src/
      com.mycompany.xxx
                 Xxx.java
      com.google.gwt.user.User
                 PopupPanel.java


Hope that helps

     Vassilis




On Mon, Feb 9, 2015 at 5:36 PM, <eho...@usdataworks.com> wrote:
I'm able to exclude these classes from my IDE and build scripts, but I can't get the GWT compiler to see them.  I put them at what I think is the same location they had in the gwt-user module, but they aren't included when I compile my module.  I don't understand the syntax of the super-source tag enough to make it include them based on my gwt.xml file.

On Saturday, February 7, 2015 at 1:57:08 AM UTC-6, Vassilis Virvilis wrote:
No it won't collide during GWT compilation. It will super source and override the original. However it will collide during normal java compilation. To that end in your IDE / build environment you need to make sure that the specific package (java.util) is excluded from compilation by the java compiler but it is included for the GWT compiler.

Hope that helps.

     Vassilis

On Sat, Feb 7, 2015 at 12:20 AM, <eho...@usdataworks.com> wrote:
 
I found an "emu" directory with a Collections implementation.  Problem is that Collections.java file has a "java.util" package.  I can't put that in my source tree.  It will collide with the real implementation.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Vassilis Virvilis

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-we...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Vassilis Virvilis

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.



--
Vassilis Virvilis

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment