Returning an array of objects to javascript via JsInterop - how?

2018-01-02 Thread Power Droid
I have a class which is just a data storage object

public class Product{ 
int id;  
String name;
public Product()
{
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}  
 
}  

I have another class that will be used to process data and will have a 
method to return an array of Product objects based on the processing.

public class Processor {
public Product[] doStuff()
{
  ... 
}
}

My goal is to use JsInterop to make the doStuff() method available to other 
javascript on a site.

Is this as simple as putting the @JsType annotation at the top of both of 
these classes?  If so, does GWT handle the conversion of the array of Java 
Product objects into an array of javascript Product objects or is there 
something else that needs to be done?

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: Problem compiling GWT code with Java9

2018-01-02 Thread Dave Bradlee
FYI. Google released a GWT update in October 
(http://www.gwtproject.org/release-notes.html#Release_Notes_2_8_2) that 
supposed includes fixes to allow it to work with Java9. We'll be trying 
that soon.

On Thursday, September 21, 2017 at 12:21:19 AM UTC-7, Thomas Broyer wrote:
>
> Fwiw, I confirm that HEAD-SNAPSHOT works with Java 9: 
> https://travis-ci.org/tbroyer/gwt-maven-plugin/jobs/277854932
>
> On Wednesday, September 20, 2017 at 10:06:51 AM UTC+2, Thomas Broyer wrote:
>>
>> There have been some changes [1,2] to make it (at least partially) work 
>> with a Java 9 VM; you can try HEAD-SNAPSHOT (from 
>> https://oss.sonatype.org/content/repositories/google-snapshots/) until 
>> we release 2.8.2 with the changes.
>>
>> [1] 
>> https://github.com/gwtproject/gwt/commit/87f27659af55d7d549521405ef10889e8dfe3f3a
>> [2] 
>> https://github.com/gwtproject/gwt/commit/5b7560c4bb6376e997981387e4f2feee1816e1dc
>>
>> On Wednesday, September 20, 2017 at 9:49:20 AM UTC+2, Pratik Parikh wrote:
>>>
>>> does anyone have an update on this sissu?  I am running into the same 
>>> problem, so an update would help.
>>>
>>> On Tuesday, June 13, 2017 at 12:08:29 PM UTC-4, James Nelson wrote:

 Hi.

 I am currently very busy this week, but can try to schedule a push to 
 maven central this weekend (I have other people waiting on it to use 
 various other tools I dabble in as well).

 Please remind me if I don't post links back here by next Monday.

 Worst case scenario, I can just upload jars to github and push a gist 
 of the pom I used, with some instructions on how to set the system 
 properties to make it work.

 I used the IDE to handle vm args, as standard maven plugins are less 
 amenable to hacking / debugging (though I'm sure it must be possible, I 
 did 
 not have enough free time to get that far on it).

 I'll probably update to latest java 9 spec, since the module system has 
 undergone another iteration since I tried these hacks.

 Please keep in mind, however, that my fork has diverged from mainline 
 for quite a while, and does not undergo the same rigorous testing that you 
 might expect.
 In particular, if you start using any of the other features I've added 
 (reflection, arbitrary magic method injection), it can break incremental 
 recompilations.
 It's a known issue I'm avoiding looking at, since most of the 2.X stack 
 is going to go away, and I have to migrate all my magic into 
 apt-generators 
 to run as a pre-gwtc stage.

 While I might be able to help you get something that works as a proof 
 of concept, I would urge you to hold off on using it in production, as I 
 am 
 not (yet) ready to offer fulltime support.
 A couple colleagues and I are playing with the idea of offering 
 fulltime support and maintenance of 2.X around mid-September (barring a 
 funding miracle for our current money-source).

 So, please take this caveats to heart; I can probably get you up and 
 compiling, but this should all be viewed as experimental and 
 not-production 
 ready for a while yet.

>>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.8.2 upgrade errors with Guava-gwt

2018-01-02 Thread BM
Yeah.. It worked with version 21. 

Thanks.

Also the compilation passed but my build failed and suggested I need to add 
following in my gwt.xml






On Tuesday, January 2, 2018 at 12:26:29 PM UTC-6, Colin Alworth wrote:
>
> I can vouch for 21 at least, that's what I'm using.
>
> However, if you are seeing the exact same error as before, then you might 
> have more than one copy of guava on your classpath, double check the error 
> or share it here so we can take a closer look to see what else might be 
> awry. 
>
> On Tuesday, January 2, 2018 at 11:49:09 AM UTC-6, BM wrote:
>>
>> Ok.. I tried their 23.6-jre  
>> and 
>> got the same errors. But will trying switching to stable version like 21 
>> and update here.
>>
>> Thanks for the reply.
>>
>> On Tuesday, January 2, 2018 at 11:43:04 AM UTC-6, Colin Alworth wrote:
>>>
>>> You are using latest GWT, but ancient Guava. Upgrade your Guava version 
>>> to something more recent, and this will go away.
>>>
>>> On Tuesday, January 2, 2018 at 11:22:25 AM UTC-6, BM wrote:

 We recently upgraded our project from GWT 2.6.1 to GWT 2.8.2. 

 We running java version: 1.8.0_144
 Guava-gwt: 15

 Getting following errors during compilation.

 ERROR] Errors in 
 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/super/com/google/common/collect/GwtPlatform.java'
 [INFO]   [ERROR] Line 38: The method createFrom(T[], int) is 
 undefined for the type Array
 [INFO]Tracing compile failure path for type 
 'com.google.common.collect.GwtPlatform'
 [INFO]   [ERROR] Errors in 
 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/super/com/google/common/collect/GwtPlatform.java'
 [INFO]  [ERROR] Line 38: The method createFrom(T[], int) is 
 undefined for the type Array
 [INFO][ERROR] Hint: Your source appears not to live underneath a 
 subpackage called 'client'; no problem, but you'll need to use the 
  
 directive in your module to make it accessible
 [INFO][ERROR] Errors in 
 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/StandardTable.java'
 [INFO]   [ERROR] Line 467: The method removeIf(Predicate>>> Map.Entry>) in the type Collection> is not applicable 
 for the arguments (Predicate)
 [INFO]   [ERROR] Line 467: Type mismatch: cannot convert from 
 Predicate to Predicate>
 [INFO]   [ERROR] Line 487: The method removeIf(Predicate>>> Map.Entry>) in the type Collection> is not applicable 
 for the arguments (Predicate)
 [INFO]   [ERROR] Line 487: Type mismatch: cannot convert from 
 Predicate to Predicate>
 [INFO]   [ERROR] Line 533: The method removeIf(Predicate>>> R>) in the type Collection is not applicable for the arguments 
 (Predicate>)
 [INFO]   [ERROR] Line 548: The method removeIf(Predicate>>> V>) in the type Collection is not applicable for the arguments 
 (Predicate>)
 [INFO]   [ERROR] Line 552: The method removeIf(Predicate>>> V>) in the type Collection is not applicable for the arguments 
 (Predicate>)
 [INFO]   [ERROR] Line 556: The method removeIf(Predicate>>> V>) in the type Collection is not applicable for the arguments 
 (Predicate>)
 [INFO]Tracing compile failure path for type 
 'com.google.common.collect.StandardTable'
 [INFO]   [ERROR] Errors in 
 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/StandardTable.java'
 [INFO]  [ERROR] Line 556: The method removeIf(Predicate>>> V>) in the type Collection is not applicable for the arguments 
 (Predicate>)
 [INFO]  [ERROR] Line 487: The method removeIf(Predicate>>> Map.Entry>) in the type Collection> is not applicable 
 for the arguments (Predicate)
 [INFO]  [ERROR] Line 467: Type mismatch: cannot convert from 
 Predicate to Predicate>
 [INFO]  [ERROR] Line 467: The method removeIf(Predicate>>> Map.Entry>) in the type Collection> is not applicable 
 for the arguments (Predicate)
 [INFO]  [ERROR] Line 487: Type mismatch: cannot convert from 
 Predicate to Predicate>
 [INFO]  [ERROR] Line 533: The method removeIf(Predicate>>> R>) in the type Collection is not applicable for the arguments 
 (Predicate>)
 [INFO]  [ERROR] Line 548: The method removeIf(Predicate>>> V>) in the type Collection is not applicable for the arguments 
 (Predicate>)
 [INFO]  [ERROR] Line 552: The method removeIf(Predicate>>> V>) in the type Collection is not applicable for the arguments 
 (Predicate>)


 Any idea what's causing this? I haven't 

Tree and TreeItem in standards mode

2018-01-02 Thread Harry Wagner
I am converting an old GWT app to standards mode and have not found a good 
substitute for either Tree or TreeItem. Does anyone know of one? TIA!

Harry

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.8.2 upgrade errors with Guava-gwt

2018-01-02 Thread Colin Alworth
I can vouch for 21 at least, that's what I'm using.

However, if you are seeing the exact same error as before, then you might 
have more than one copy of guava on your classpath, double check the error 
or share it here so we can take a closer look to see what else might be 
awry. 

On Tuesday, January 2, 2018 at 11:49:09 AM UTC-6, BM wrote:
>
> Ok.. I tried their 23.6-jre  
> and 
> got the same errors. But will trying switching to stable version like 21 
> and update here.
>
> Thanks for the reply.
>
> On Tuesday, January 2, 2018 at 11:43:04 AM UTC-6, Colin Alworth wrote:
>>
>> You are using latest GWT, but ancient Guava. Upgrade your Guava version 
>> to something more recent, and this will go away.
>>
>> On Tuesday, January 2, 2018 at 11:22:25 AM UTC-6, BM wrote:
>>>
>>> We recently upgraded our project from GWT 2.6.1 to GWT 2.8.2. 
>>>
>>> We running java version: 1.8.0_144
>>> Guava-gwt: 15
>>>
>>> Getting following errors during compilation.
>>>
>>> ERROR] Errors in 
>>> 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/super/com/google/common/collect/GwtPlatform.java'
>>> [INFO]   [ERROR] Line 38: The method createFrom(T[], int) is 
>>> undefined for the type Array
>>> [INFO]Tracing compile failure path for type 
>>> 'com.google.common.collect.GwtPlatform'
>>> [INFO]   [ERROR] Errors in 
>>> 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/super/com/google/common/collect/GwtPlatform.java'
>>> [INFO]  [ERROR] Line 38: The method createFrom(T[], int) is 
>>> undefined for the type Array
>>> [INFO][ERROR] Hint: Your source appears not to live underneath a 
>>> subpackage called 'client'; no problem, but you'll need to use the  
>>> directive in your module to make it accessible
>>> [INFO][ERROR] Errors in 
>>> 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/StandardTable.java'
>>> [INFO]   [ERROR] Line 467: The method removeIf(Predicate>> Map.Entry>) in the type Collection> is not applicable 
>>> for the arguments (Predicate)
>>> [INFO]   [ERROR] Line 467: Type mismatch: cannot convert from 
>>> Predicate to Predicate>
>>> [INFO]   [ERROR] Line 487: The method removeIf(Predicate>> Map.Entry>) in the type Collection> is not applicable 
>>> for the arguments (Predicate)
>>> [INFO]   [ERROR] Line 487: Type mismatch: cannot convert from 
>>> Predicate to Predicate>
>>> [INFO]   [ERROR] Line 533: The method removeIf(Predicate) 
>>> in the type Collection is not applicable for the arguments 
>>> (Predicate>)
>>> [INFO]   [ERROR] Line 548: The method removeIf(Predicate) 
>>> in the type Collection is not applicable for the arguments 
>>> (Predicate>)
>>> [INFO]   [ERROR] Line 552: The method removeIf(Predicate) 
>>> in the type Collection is not applicable for the arguments 
>>> (Predicate>)
>>> [INFO]   [ERROR] Line 556: The method removeIf(Predicate) 
>>> in the type Collection is not applicable for the arguments 
>>> (Predicate>)
>>> [INFO]Tracing compile failure path for type 
>>> 'com.google.common.collect.StandardTable'
>>> [INFO]   [ERROR] Errors in 
>>> 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/StandardTable.java'
>>> [INFO]  [ERROR] Line 556: The method removeIf(Predicate>> V>) in the type Collection is not applicable for the arguments 
>>> (Predicate>)
>>> [INFO]  [ERROR] Line 487: The method removeIf(Predicate>> Map.Entry>) in the type Collection> is not applicable 
>>> for the arguments (Predicate)
>>> [INFO]  [ERROR] Line 467: Type mismatch: cannot convert from 
>>> Predicate to Predicate>
>>> [INFO]  [ERROR] Line 467: The method removeIf(Predicate>> Map.Entry>) in the type Collection> is not applicable 
>>> for the arguments (Predicate)
>>> [INFO]  [ERROR] Line 487: Type mismatch: cannot convert from 
>>> Predicate to Predicate>
>>> [INFO]  [ERROR] Line 533: The method removeIf(Predicate>> R>) in the type Collection is not applicable for the arguments 
>>> (Predicate>)
>>> [INFO]  [ERROR] Line 548: The method removeIf(Predicate>> V>) in the type Collection is not applicable for the arguments 
>>> (Predicate>)
>>> [INFO]  [ERROR] Line 552: The method removeIf(Predicate>> V>) in the type Collection is not applicable for the arguments 
>>> (Predicate>)
>>>
>>>
>>> Any idea what's causing this? I haven't found any much info on this. 
>>>
>>> Thank you in advance.
>>>
>>>
>>>
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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

Re: JsInterop Array

2018-01-02 Thread Colin Alworth
Beware using JsArray, instead use JsArray, see 
https://github.com/google/elemental2/issues/28.

A third option, with elemental2-core, rather than explicitly copying the 
array, ask the browser to do it for you with slice(). First cast the array 
to JsArray, then slice it to get a copy of its contents, without 
the expandos.

JsArray nodesJsArray = Js.cast(nodes);
JsNumber[] noExtraProperties = nodesJsArray.slice();

This can be handy when passing the int[] to something which refuses to 
handle extraneous properties, like window.postMessage. Yes, it is confusing 
that it appears you actually end up with a Java array, but it will not have 
those extra properties in this case.

On Tuesday, December 19, 2017 at 5:02:48 AM UTC-6, cesar paulo alves wrote:
>
> Ok guys, so I apologize, after a few tests I realized something, as Thomas 
> said about the js lib should't be reading the content, I went digger and 
> realized that the problem was not on the expando properties but the name of 
> the nodeSet array... The js looked for a "nodeSet" array and I was passing 
> it as "nodeSets" array. Very sad (I'm not good with javascript). Thanks for 
> all your help Vassills and Thomas.
> I switched my code as Vassils as suggested and could find the bug(me) 
> because of what Thomas said. Thanks a lot and sorry for taking your time.
>
> Merry Christmas to all of you.
>
> Cheers,
> César Alves
>
> terça-feira, 19 de Dezembro de 2017 às 07:18:00 UTC, cesar paulo alves 
> escreveu:
>>
>> Hello guys, so I'm getting crazy with this.
>>
>> I need to inject a java array inside a javascript library.
>>
>> The problem is that the Js library will iterate over an integer array, 
>> and if the element is not an integer it exits the function.
>> When I create the integer array and pass it to plain javascript array, 
>> for some reason it carries garbage inside, I already tried everything with 
>> no success.
>>
>> So this is my java nodeset (https://pastebin.com/AdJqj80p)
>>
>>
>> 
>>
>> I'm using the gwt-interop-utils 
>>  -> 
>> https://github.com/GWTReact/gwt-interop-utils/blob/master/src/gwt/interop/utils/client/plainobjects/JsPlainObj.java
>>
>>
>> And when I inspect the javascript object in the browser you can see it 
>> has lots of garbage, and I cant clean it. See the nodes array I have 
>> (_clazz_0_g$,__elementTypeCategory$,_elementTypeId$"..).
>>
>>
>> 
>>
>>
>> And when I do the same with Js I don't have this garbage (obvious).
>>
>>
>> 
>>
>>
>> I already used the JsArray and everything, but no luck =/.
>>
>>
>> Do you have any Idea how to have a plain javascript array with jsInterop?
>>
>>
>> Thanks a lot.
>>
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.8.2 upgrade errors with Guava-gwt

2018-01-02 Thread BM
Ok.. I tried their 23.6-jre  
and 
got the same errors. But will trying switching to stable version like 21 
and update here.

Thanks for the reply.

On Tuesday, January 2, 2018 at 11:43:04 AM UTC-6, Colin Alworth wrote:
>
> You are using latest GWT, but ancient Guava. Upgrade your Guava version to 
> something more recent, and this will go away.
>
> On Tuesday, January 2, 2018 at 11:22:25 AM UTC-6, BM wrote:
>>
>> We recently upgraded our project from GWT 2.6.1 to GWT 2.8.2. 
>>
>> We running java version: 1.8.0_144
>> Guava-gwt: 15
>>
>> Getting following errors during compilation.
>>
>> ERROR] Errors in 
>> 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/super/com/google/common/collect/GwtPlatform.java'
>> [INFO]   [ERROR] Line 38: The method createFrom(T[], int) is 
>> undefined for the type Array
>> [INFO]Tracing compile failure path for type 
>> 'com.google.common.collect.GwtPlatform'
>> [INFO]   [ERROR] Errors in 
>> 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/super/com/google/common/collect/GwtPlatform.java'
>> [INFO]  [ERROR] Line 38: The method createFrom(T[], int) is 
>> undefined for the type Array
>> [INFO][ERROR] Hint: Your source appears not to live underneath a 
>> subpackage called 'client'; no problem, but you'll need to use the  
>> directive in your module to make it accessible
>> [INFO][ERROR] Errors in 
>> 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/StandardTable.java'
>> [INFO]   [ERROR] Line 467: The method removeIf(Predicate> Map.Entry>) in the type Collection> is not applicable 
>> for the arguments (Predicate)
>> [INFO]   [ERROR] Line 467: Type mismatch: cannot convert from 
>> Predicate to Predicate>
>> [INFO]   [ERROR] Line 487: The method removeIf(Predicate> Map.Entry>) in the type Collection> is not applicable 
>> for the arguments (Predicate)
>> [INFO]   [ERROR] Line 487: Type mismatch: cannot convert from 
>> Predicate to Predicate>
>> [INFO]   [ERROR] Line 533: The method removeIf(Predicate) 
>> in the type Collection is not applicable for the arguments 
>> (Predicate>)
>> [INFO]   [ERROR] Line 548: The method removeIf(Predicate) 
>> in the type Collection is not applicable for the arguments 
>> (Predicate>)
>> [INFO]   [ERROR] Line 552: The method removeIf(Predicate) 
>> in the type Collection is not applicable for the arguments 
>> (Predicate>)
>> [INFO]   [ERROR] Line 556: The method removeIf(Predicate) 
>> in the type Collection is not applicable for the arguments 
>> (Predicate>)
>> [INFO]Tracing compile failure path for type 
>> 'com.google.common.collect.StandardTable'
>> [INFO]   [ERROR] Errors in 
>> 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/StandardTable.java'
>> [INFO]  [ERROR] Line 556: The method removeIf(Predicate> V>) in the type Collection is not applicable for the arguments 
>> (Predicate>)
>> [INFO]  [ERROR] Line 487: The method removeIf(Predicate> Map.Entry>) in the type Collection> is not applicable 
>> for the arguments (Predicate)
>> [INFO]  [ERROR] Line 467: Type mismatch: cannot convert from 
>> Predicate to Predicate>
>> [INFO]  [ERROR] Line 467: The method removeIf(Predicate> Map.Entry>) in the type Collection> is not applicable 
>> for the arguments (Predicate)
>> [INFO]  [ERROR] Line 487: Type mismatch: cannot convert from 
>> Predicate to Predicate>
>> [INFO]  [ERROR] Line 533: The method removeIf(Predicate> R>) in the type Collection is not applicable for the arguments 
>> (Predicate>)
>> [INFO]  [ERROR] Line 548: The method removeIf(Predicate> V>) in the type Collection is not applicable for the arguments 
>> (Predicate>)
>> [INFO]  [ERROR] Line 552: The method removeIf(Predicate> V>) in the type Collection is not applicable for the arguments 
>> (Predicate>)
>>
>>
>> Any idea what's causing this? I haven't found any much info on this. 
>>
>> Thank you in advance.
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: GWT 2.8.2 upgrade errors with Guava-gwt

2018-01-02 Thread Colin Alworth
You are using latest GWT, but ancient Guava. Upgrade your Guava version to 
something more recent, and this will go away.

On Tuesday, January 2, 2018 at 11:22:25 AM UTC-6, BM wrote:
>
> We recently upgraded our project from GWT 2.6.1 to GWT 2.8.2. 
>
> We running java version: 1.8.0_144
> Guava-gwt: 15
>
> Getting following errors during compilation.
>
> ERROR] Errors in 
> 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/super/com/google/common/collect/GwtPlatform.java'
> [INFO]   [ERROR] Line 38: The method createFrom(T[], int) is undefined 
> for the type Array
> [INFO]Tracing compile failure path for type 
> 'com.google.common.collect.GwtPlatform'
> [INFO]   [ERROR] Errors in 
> 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/super/com/google/common/collect/GwtPlatform.java'
> [INFO]  [ERROR] Line 38: The method createFrom(T[], int) is 
> undefined for the type Array
> [INFO][ERROR] Hint: Your source appears not to live underneath a 
> subpackage called 'client'; no problem, but you'll need to use the  
> directive in your module to make it accessible
> [INFO][ERROR] Errors in 
> 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/StandardTable.java'
> [INFO]   [ERROR] Line 467: The method removeIf(Predicate Map.Entry>) in the type Collection> is not applicable 
> for the arguments (Predicate)
> [INFO]   [ERROR] Line 467: Type mismatch: cannot convert from 
> Predicate to Predicate>
> [INFO]   [ERROR] Line 487: The method removeIf(Predicate Map.Entry>) in the type Collection> is not applicable 
> for the arguments (Predicate)
> [INFO]   [ERROR] Line 487: Type mismatch: cannot convert from 
> Predicate to Predicate>
> [INFO]   [ERROR] Line 533: The method removeIf(Predicate) 
> in the type Collection is not applicable for the arguments 
> (Predicate>)
> [INFO]   [ERROR] Line 548: The method removeIf(Predicate) 
> in the type Collection is not applicable for the arguments 
> (Predicate>)
> [INFO]   [ERROR] Line 552: The method removeIf(Predicate) 
> in the type Collection is not applicable for the arguments 
> (Predicate>)
> [INFO]   [ERROR] Line 556: The method removeIf(Predicate) 
> in the type Collection is not applicable for the arguments 
> (Predicate>)
> [INFO]Tracing compile failure path for type 
> 'com.google.common.collect.StandardTable'
> [INFO]   [ERROR] Errors in 
> 'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/StandardTable.java'
> [INFO]  [ERROR] Line 556: The method removeIf(Predicate V>) in the type Collection is not applicable for the arguments 
> (Predicate>)
> [INFO]  [ERROR] Line 487: The method removeIf(Predicate Map.Entry>) in the type Collection> is not applicable 
> for the arguments (Predicate)
> [INFO]  [ERROR] Line 467: Type mismatch: cannot convert from 
> Predicate to Predicate>
> [INFO]  [ERROR] Line 467: The method removeIf(Predicate Map.Entry>) in the type Collection> is not applicable 
> for the arguments (Predicate)
> [INFO]  [ERROR] Line 487: Type mismatch: cannot convert from 
> Predicate to Predicate>
> [INFO]  [ERROR] Line 533: The method removeIf(Predicate R>) in the type Collection is not applicable for the arguments 
> (Predicate>)
> [INFO]  [ERROR] Line 548: The method removeIf(Predicate V>) in the type Collection is not applicable for the arguments 
> (Predicate>)
> [INFO]  [ERROR] Line 552: The method removeIf(Predicate V>) in the type Collection is not applicable for the arguments 
> (Predicate>)
>
>
> Any idea what's causing this? I haven't found any much info on this. 
>
> Thank you in advance.
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


Re: SuperDevMode OutOfMemoryError

2018-01-02 Thread Colin Alworth
How much memory does your app need to do a full compile on your machine 
(for just one permutation)?

Super dev mode works very differently than legacy dev mode - I almost 
prefer to call it "super draft mode" but it has more improvements than 
simply running a draft compile. Legacy dev mode doesn't actually compile 
your code at all, but instead spends its startup time figuring out how to 
call the browser from the JVM when actual JS needs to be run, etc. In this 
way, it is sort of anti-GWT, since instead of compiling anything to JS, it 
is making JS callable by Java. In contrast, super dev mode actually has to 
transpile everything, but actually works in modern browsers. It typically 
does the basic compile on startup, then each subsequent refresh should be 
much faster.

On Saturday, December 23, 2017 at 2:33:31 AM UTC-6, Ali Jalal wrote:
>
> Hi,
>
> We have a large project with about 250 KLoC client-side code (without 
> comment and blank lines). This project compiles in DevMode with Xmx2500m in 
> 3mins. But in SuperDevMode it throws OutOfMemoryError.
>
> *GWT Libraries:* GWT 2.8.2, gwittir, gwtchosen, gwtquery
>
> *DevMode:*
> *Compiler Arguments:* org.example.base.Base -startupUrl base -war 
> /usr/jboss/standalone/deployments/base.war -noserver -logLevel ERROR -port 
> 80 -nosuperDevMode -XmethodNameDisplayMode FULL -strict
>
> *VM Arguments:* -Xms2000m -Xmx2500m -XX:+UseCompressedOops 
> -Djava.io.tmpdir=${TMP}/base -Dgwt.persistentunitcachedir=${TMP}/base 
> -Dgwt.usearchives=true -Dgwt.disableGeneratorResultCaching
>
>
> *SuperDevMode:*
> Just change -nosuperDevMode to -superDevMode in compiler arguments.
>
> In DevMode with Xmx2500m, first compile takes about 3min, but in 
> SuperDevMode with even Xmx4000m it throws OutOfMemoryError. By increasing 
> Xmx to 20GB, it starts compile but never stops (it seems it needs more 
> memory). So we can not use SuperDevMode in large projects. (Removing 
> gwt.usearchives or gwt.disableGeneratorResultCaching has no effect.)
>
>
> My questions:
>
> 1. Why SuperDevMode should takes more memory than DevMode? 
>
> 2. In small projects, SuperDevMode compile time is equal or greater than 
> DevMode compile time. Is it normal?
>
> 3. How can I reduce SuperDevMode compile time?
>
> Regards,
> Ali.
>
>

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT 2.8.2 upgrade errors with Guava-gwt

2018-01-02 Thread BM
We recently upgraded our project from GWT 2.6.1 to GWT 2.8.2. 

We running java version: 1.8.0_144
Guava-gwt: 15

Getting following errors during compilation.

ERROR] Errors in 
'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/super/com/google/common/collect/GwtPlatform.java'
[INFO]   [ERROR] Line 38: The method createFrom(T[], int) is undefined 
for the type Array
[INFO]Tracing compile failure path for type 
'com.google.common.collect.GwtPlatform'
[INFO]   [ERROR] Errors in 
'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/super/com/google/common/collect/GwtPlatform.java'
[INFO]  [ERROR] Line 38: The method createFrom(T[], int) is 
undefined for the type Array
[INFO][ERROR] Hint: Your source appears not to live underneath a 
subpackage called 'client'; no problem, but you'll need to use the  
directive in your module to make it accessible
[INFO][ERROR] Errors in 
'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/StandardTable.java'
[INFO]   [ERROR] Line 467: The method removeIf(Predicate>) in the type Collection> is not applicable 
for the arguments (Predicate)
[INFO]   [ERROR] Line 467: Type mismatch: cannot convert from 
Predicate to Predicate>
[INFO]   [ERROR] Line 487: The method removeIf(Predicate>) in the type Collection> is not applicable 
for the arguments (Predicate)
[INFO]   [ERROR] Line 487: Type mismatch: cannot convert from 
Predicate to Predicate>
[INFO]   [ERROR] Line 533: The method removeIf(Predicate) in 
the type Collection is not applicable for the arguments 
(Predicate>)
[INFO]   [ERROR] Line 548: The method removeIf(Predicate) in 
the type Collection is not applicable for the arguments 
(Predicate>)
[INFO]   [ERROR] Line 552: The method removeIf(Predicate) in 
the type Collection is not applicable for the arguments 
(Predicate>)
[INFO]   [ERROR] Line 556: The method removeIf(Predicate) in 
the type Collection is not applicable for the arguments 
(Predicate>)
[INFO]Tracing compile failure path for type 
'com.google.common.collect.StandardTable'
[INFO]   [ERROR] Errors in 
'jar:file:/Users//.m2/repository/com/google/guava/guava-gwt/15.0/guava-gwt-15.0.jar!/com/google/common/collect/StandardTable.java'
[INFO]  [ERROR] Line 556: The method removeIf(Predicate) 
in the type Collection is not applicable for the arguments 
(Predicate>)
[INFO]  [ERROR] Line 487: The method removeIf(Predicate>) in the type Collection> is not applicable 
for the arguments (Predicate)
[INFO]  [ERROR] Line 467: Type mismatch: cannot convert from 
Predicate to Predicate>
[INFO]  [ERROR] Line 467: The method removeIf(Predicate>) in the type Collection> is not applicable 
for the arguments (Predicate)
[INFO]  [ERROR] Line 487: Type mismatch: cannot convert from 
Predicate to Predicate>
[INFO]  [ERROR] Line 533: The method removeIf(Predicate) 
in the type Collection is not applicable for the arguments 
(Predicate>)
[INFO]  [ERROR] Line 548: The method removeIf(Predicate) 
in the type Collection is not applicable for the arguments 
(Predicate>)
[INFO]  [ERROR] Line 552: The method removeIf(Predicate) 
in the type Collection is not applicable for the arguments 
(Predicate>)


Any idea what's causing this? I haven't found any much info on this. 

Thank you in advance.




-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.


GWT dependent drop down

2018-01-02 Thread bharti . yadav
can anyone please refer me a demo program  in  which i can i need to create 
dependent drop down list for country state and cities.
i need to create a GWT application for it

-- 
You received this message because you are subscribed to the Google Groups "GWT 
Users" 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 https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.