Currently I don't have my IDE so I am not 100% sure but I believe it is
this one:

In gwt-user-2.7.0.jar
com/google/gwt/emul/java/util/Collections.java

You have to copy it in ~/myproject/src/java/util/Collections.java in
package java.util

and make your modifications there.

The obvious disadvantage of this neat trick that you will have to port
forward in every GWT upgrade your local modifications - or you can submit a
patch :-)

     Vassilis







On Fri, Feb 6, 2015 at 11:14 PM, <ehod...@usdataworks.com> wrote:

> As I said in my first post, I see why GWT doesn't need a synchronized
> sorted set.  I don't need one either, I just need my Java code (that will
> be compiled to GWT) to reference other Java code that references a
> synchronized sorted set.
>
>
> On Friday, February 6, 2015 at 3:07:28 PM UTC-6, Vassilis Virvilis wrote:
>>
>> You can copy paste the existing Collections.java from the GWT tree to
>> your source tree in the same package path and add your own method there.
>> The GWT compiler will super source your file meaning that it will have
>> precedence over the GWT supplied file.
>>
>> However I am not actually suggesting this for your case. The reason is
>> the following. In normal circumstances GWT code is plain javascript and it
>> executed in a single thread therefore the synchronized variant of a
>> collection makes non sense. Recent advances in WWW standards include
>> something called web workers which is basically javascript threads. I
>> haven't used them or study them in detail to commend but my gut feeling and
>> past experience says that their semantics will not map to java thread
>> semantics.
>>
>>
>>    Vassilis
>>
>> On Fri, Feb 6, 2015 at 10:35 PM, <eho...@usdataworks.com> wrote:
>>
>>> Yes, I saw that documentation.  It seems to assume a lot of GWT
>>> knowledge.  I doubt we can provide our own Collections implementation just
>>> to fill in one static method.  Does anyone know a more reasonable
>>> workaround?
>>>
>>>
>>> On Thursday, February 5, 2015 at 5:34:33 PM UTC-6, iza wrote:
>>>>
>>>> I believe super-source is what you need. Have you seen the
>>>> documentation "Overriding one package implementation with another" at
>>>> http://www.gwtproject.org/doc/latest/DevGuideOrganizingProjects.
>>>> html#DevGuideModuleXml
>>>>
>>>  --
>>>
>>
>>
>> --
>> 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+unsubscr...@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+unsubscr...@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.

Reply via email to