[gwt-contrib] Re: Make the following method public in StackTraceDeobfuscator, for reuse by user server side code: (issue1040801)

2010-10-20 Thread fredsa

http://gwt-code-reviews.appspot.com/1040801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Make the following method public in StackTraceDeobfuscator, for reuse by user server side code: (issue1040801)

2010-10-20 Thread fredsa

http://gwt-code-reviews.appspot.com/1040801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Make the following method public in StackTraceDeobfuscator, for reuse by user server side code: (issue1040801)

2010-10-20 Thread fredsa

Reviewers: unnur_google.com,

Description:
Make the following method public in StackTraceDeobfuscator, for reuse by
user server side code:
StackTraceElement resymbolize(StackTraceElement ste, String strongName)

Review by: un...@google.com

Please review this at http://gwt-code-reviews.appspot.com/1040801/show

Affected files:
  M user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java


Index: user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java
===
--- user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java	 
(revision 9129)
+++ user/src/com/google/gwt/logging/server/StackTraceDeobfuscator.java	 
(working copy)

@@ -60,6 +60,25 @@
   lr.setThrown(deobfuscateThrowable(lr.getThrown(), strongName));
 }
 return lr;
+  }
+
+  public StackTraceElement resymbolize(StackTraceElement ste,
+  String strongName) {
+SymbolMap map = loadSymbolMap(strongName);
+String symbolData = map == null ? null : map.get(ste.getMethodName());
+
+if (symbolData != null) {
+  // jsniIdent, className, memberName, sourceUri, sourceLine
+  String[] parts = symbolData.split(",");
+  if (parts.length == 5) {
+String[] ref = parse(
+parts[0].substring(0, parts[0].lastIndexOf(')') + 1));
+return new StackTraceElement(
+ref[0], ref[1], ste.getFileName(), ste.getLineNumber());
+  }
+}
+// If anything goes wrong, just return the unobfuscated element
+return ste;
   }

   public void setSymbolMapsDirectory(String dir) {
@@ -132,23 +151,4 @@
 String[] toReturn = new String[] {className, memberName};
 return toReturn;
   }
-
-  private StackTraceElement resymbolize(StackTraceElement ste,
-  String strongName) {
-SymbolMap map = loadSymbolMap(strongName);
-String symbolData = map == null ? null : map.get(ste.getMethodName());
-
-if (symbolData != null) {
-  // jsniIdent, className, memberName, sourceUri, sourceLine
-  String[] parts = symbolData.split(",");
-  if (parts.length == 5) {
-String[] ref = parse(
-parts[0].substring(0, parts[0].lastIndexOf(')') + 1));
-return new StackTraceElement(
-ref[0], ref[1], ste.getFileName(), ste.getLineNumber());
-  }
-}
-// If anything goes wrong, just return the unobfuscated element
-return ste;
-  }
 }


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9129 committed - Exposes the built-in year-month-weekday-day format in PredefinedFormat...

2010-10-20 Thread codesite-noreply

Revision: 9129
Author: gry...@google.com
Date: Wed Oct 20 12:39:18 2010
Log: Exposes the built-in year-month-weekday-day format in PredefinedFormat.

Review at http://gwt-code-reviews.appspot.com/1039801

Patch by: guillaume.ryder
Review by: jat

http://code.google.com/p/google-web-toolkit/source/detail?r=9129

Modified:
 /trunk/user/src/com/google/gwt/i18n/client/DateTimeFormat.java

===
--- /trunk/user/src/com/google/gwt/i18n/client/DateTimeFormat.java	Wed Sep   
1 11:41:22 2010
+++ /trunk/user/src/com/google/gwt/i18n/client/DateTimeFormat.java	Wed Oct  
20 12:39:18 2010

@@ -446,6 +446,7 @@
 YEAR_MONTH_DAY,
 YEAR_MONTH_NUM,
 YEAR_MONTH_NUM_DAY,
+YEAR_MONTH_WEEKDAY_DAY,
 YEAR_QUARTER,
 YEAR_QUARTER_ABBR,
   }
@@ -615,6 +616,9 @@
   case YEAR_MONTH_NUM_DAY:
 pattern = dtfi.formatYearMonthNumDay();
 break;
+  case YEAR_MONTH_WEEKDAY_DAY:
+pattern = dtfi.formatYearMonthWeekdayDay();
+break;
   case YEAR_QUARTER:
 pattern = dtfi.formatYearQuarterFull();
 break;

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] GWT 2.1 MVP with Code Splitting

2010-10-20 Thread Tolga Tarhan
All,

Somewhat similar to my previous email about GIN with MVP, I also have a
concern regarding using Code Splitting with the MVP framework as it sits
today. Specifically, it would appear that ActivityMapper can't use runAsync
because it has to return the matching activity synchronously. ActivityMapper
is an obvious place to want Code Splitting so that some of your Activities
(and all the associated views, etc) can be loaded as fragments.

Should this be solved with a subclass of ActivityManager which is designed
to be used with a callback? If this is an area where you'd welcome a
community contribution, I'd be willing to take a stab at this.

I still have to consider how this would (or wouldn't) mix well with David
Chandler's suggestion on how to integrate GIN into MVP. I'm going to
experiment with this a bit today.

--
Tolga

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] [google-web-toolkit] r9128 committed - Update the npapi plugin to support OSX. Also, adds a proper make crx s...

2010-10-20 Thread codesite-noreply

Revision: 9128
Author: con...@google.com
Date: Wed Oct 20 10:40:04 2010
Log: Update the npapi plugin to support OSX. Also, adds a proper make crx  
step.


Review at http://gwt-code-reviews.appspot.com/1036801

http://code.google.com/p/google-web-toolkit/source/detail?r=9128

Added:
 /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3
 /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin
  
/trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents
  
/trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/Info.plist
  
/trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/MacOS
  
/trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/MacOS/libGwtDevPlugin.dylib
  
/trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/libGwtDevPlugin.dylib

Deleted:
 /trunk/plugins/npapi/Makefile.mac
 /trunk/plugins/npapi/Makefile.sun
 /trunk/plugins/npapi/build.xml
 /trunk/plugins/npapi/computeversion
 /trunk/plugins/npapi/install-template.rdf
 /trunk/plugins/npapi/prebuilt/gwtdmp.crx
Modified:
 /trunk/plugins/npapi/Makefile
 /trunk/plugins/npapi/manifest-template.json
  
/trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86-gcc3/libGwtDevPlugin.so
  
/trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Linux_x86_64-gcc3/libGwtDevPlugin.so

 /trunk/plugins/npapi/prebuilt/gwt-dev-plugin/manifest.json
 /trunk/plugins/npapi/prebuilt/gwt-dev-plugin.crx

===
--- /dev/null
+++  
/trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/Info.plist	 
Wed Oct 20 10:40:04 2010

@@ -0,0 +1,43 @@
+
+1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd";>

+
+  
+CFBundleDevelopmentRegion
+English
+CFBundleExecutable
+libGwtDevPlugin.dylib
+CFBundleGetInfoString
+Copyright 2010 Google, Inc.
+CFBundleIdentifier
+com.google.gwt.devmode-npapi-plugin
+CFBundleInfoDictionaryVersion
+6.0
+CFBundleName
+GWT Devmode NPAPI Plugin
+CFBundlePackageType
+BRPL
+CFBundleShortVersionString
+1.0
+CFBundleSignature
+
+CFBundleVersion
+1.0
+CFPlugInDynamicRegisterFunction
+
+CFPlugInDynamicRegistration
+NO
+WebPluginDescription
+Plugin to allow debugging of GWT applications in  
DevMode

+WebPluginMIMETypes
+
+  application/x-gwt-hosted-mode
+  
+WebPluginTypeDescription
+GWT DevMode
+  
+
+WebPluginName
+GWT DevMode Plugin
+  
+
+
===
--- /dev/null   
+++  
/trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/MacOS/libGwtDevPlugin.dylib	 
Wed Oct 20 10:40:04 2010

Binary file, no diff available.
===
--- /dev/null   
+++  
/trunk/plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/libGwtDevPlugin.dylib	 
Wed Oct 20 10:40:04 2010

Binary file, no diff available.
===
--- /trunk/plugins/npapi/Makefile.mac   Mon Aug  3 08:30:11 2009
+++ /dev/null
@@ -1,130 +0,0 @@
-INC=-I. -I../common
-FLAG32BIT=$(shell ./get32bitflag arch)
-CFLAGS=-g -O2 -fPIC $(INC) -m$(FLAG32BIT) -D__mac -DXP_MACOSX -DXP_UNIX  
-DBROWSER_NPAPI

-CXXFLAGS=$(CFLAGS)
-
-INSTDIR := extension/platform/$(shell ./getarch  
arch)/plugins/oophm.plugin/Contents/MacOS
-RESDIR := extension/platform/$(shell ./getarch  
arch)/plugins/oophm.plugin/Contents/Resources

-
-HDRS= LocalObjectTable.h NPVariantWrapper.h Plugin.h mozincludes.h \
-   JavaObject.h ScriptableInstance.h
-
-COMMON= ../common/libcommon$(FLAG32BIT).a
-OBJS=  main.o Plugin.o LocalObjectTable.o JavaObject.o npn_bindings.o \
-   ScriptableInstance.o
-
-SRCS=  main.cpp Plugin.cpp LocalObjectTable.cpp JavaObject.cpp \
-   npn_bindings.cc ScriptableInstance.cpp
-
-oophm.xpi: arch extension $(INSTDIR)/liboophm $(RESDIR)/liboophm.rsrc \
-  liboophm extension/install.rdf
-   -rm -f oophm.xpi
-   cd extension; zip -r -D -9 -o ../$@ * -x '*/.svn/*' -x 'META-INF/*'
-
-oophm-signed.xpi: arch $(INSTDIR)/liboophm $(RESDIR)/liboophm.rsrc \
-  extension/install.rdf extension/META-INF/zigbert.sf
-   -rm -f $@
-	cd extension; zip -9 ../$@ META-INF/zigbert.rsa; zip -r -D -9 -o ../$@ *  
-x '*/.svn/*' -x META-INF/zigbert.rsa

-
-extension: prebuilt/extension
-   -rm -rf extension
-   cp -r $< $@
-
-$(INSTDIR):
-   -mkdir -p $@
-
-extension/META-INF/zigbert.sf: $(INSTDIR)/liboophm
-   signtool -d certdb -k 'GWT Plugin' -x .svn extension/
-
-extension/install.rdf: install-template.rdf version
-   sed s/GWT_OOPHM_VERSION/`cat version`/ install-template.rdf >$@
-
-version: computeversion $(HDRS) $(SRCS) $(COMMON)
-   ./computeversion >$@
-
-arch: computearch
-   ./computearch arch
-   @echo "Restart make"
-   @exit 1
-
-$(INSTDIR)/liboophm: liboophm
-   cp $< $@
-
-$(RESDIR)/liboophm.rsrc: liboophm.rsrc
-   cp $< $@
-
-liboophm.rsr

[gwt-contrib] Re: Exposes the built-in year-month-weekday-day format in PredefinedFormat. (issue1039801)

2010-10-20 Thread jat

LGTM, thanks.


http://gwt-code-reviews.appspot.com/1039801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread fabiomfv

On 2010/10/20 20:06:42, conroy wrote:

I'm glad you mention this: In the latest version of the patch I'm

nuking

Makefile.mac (amongst other cruft) since unused bits like this laying

around

just cause confusion.



XP_MACOSX is set higher up in the Makefile on the OS==mac check. I set
XP_UNIX there so that linux and mac can share it.



On Wed, Oct 20, 2010 at 4:00 PM,  wrote:



> On 2010/10/20 19:44:12, conroy wrote:
>
>> http://gwt-code-reviews.appspot.com/1036801/diff/6001/7001
>> File plugins/npapi/Makefile (right):
>>
>
>

http://gwt-code-reviews.appspot.com/1036801/diff/6001/7001#newcode47

>> plugins/npapi/Makefile:47: CFLAGS += -DBROWSER_NPAPI -DXP_UNIX
>>
> -fshort-wchar
>
>> On 2010/10/20 19:31:06, fabiomfv wrote:
>> > out of curiosity, why are we defining XP_UNIX for a presumably

mac

>>
> build?
>
>  Mac is a variant of Unix. The other npapi plugin code I looked at

all

>>
> defined
>
>> XP_UNIX for both linux and mac builds.
>>
>
> I guess want I really meant was why we don't need XP_MACOSX

explicitly

> and only XP_UNIX? for instance, looking at makefile.mac it seems

they

> refer to both.
>
>
>
> http://gwt-code-reviews.appspot.com/1036801/show
>


Sorry, somehow I did not see the XP_MACOSX def up above the script (I
guess I am still getting used to the rietveld review ui).

LGTM2



http://gwt-code-reviews.appspot.com/1036801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread Chris Conroy
I'm glad you mention this: In the latest version of the patch I'm nuking
Makefile.mac (amongst other cruft) since unused bits like this laying around
just cause confusion.

XP_MACOSX is set higher up in the Makefile on the OS==mac check. I set
XP_UNIX there so that linux and mac can share it.

On Wed, Oct 20, 2010 at 4:00 PM,  wrote:

> On 2010/10/20 19:44:12, conroy wrote:
>
>> http://gwt-code-reviews.appspot.com/1036801/diff/6001/7001
>> File plugins/npapi/Makefile (right):
>>
>
>  http://gwt-code-reviews.appspot.com/1036801/diff/6001/7001#newcode47
>> plugins/npapi/Makefile:47: CFLAGS += -DBROWSER_NPAPI -DXP_UNIX
>>
> -fshort-wchar
>
>> On 2010/10/20 19:31:06, fabiomfv wrote:
>> > out of curiosity, why are we defining XP_UNIX for a presumably mac
>>
> build?
>
>  Mac is a variant of Unix. The other npapi plugin code I looked at all
>>
> defined
>
>> XP_UNIX for both linux and mac builds.
>>
>
> I guess want I really meant was why we don't need XP_MACOSX explicitly
> and only XP_UNIX? for instance, looking at makefile.mac it seems they
> refer to both.
>
>
>
> http://gwt-code-reviews.appspot.com/1036801/show
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread fabiomfv

On 2010/10/20 19:44:12, conroy wrote:

http://gwt-code-reviews.appspot.com/1036801/diff/6001/7001
File plugins/npapi/Makefile (right):



http://gwt-code-reviews.appspot.com/1036801/diff/6001/7001#newcode47
plugins/npapi/Makefile:47: CFLAGS += -DBROWSER_NPAPI -DXP_UNIX

-fshort-wchar

On 2010/10/20 19:31:06, fabiomfv wrote:
> out of curiosity, why are we defining XP_UNIX for a presumably mac

build?


Mac is a variant of Unix. The other npapi plugin code I looked at all

defined

XP_UNIX for both linux and mac builds.


I guess want I really meant was why we don't need XP_MACOSX explicitly
and only XP_UNIX? for instance, looking at makefile.mac it seems they
refer to both.


http://gwt-code-reviews.appspot.com/1036801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread conroy

http://gwt-code-reviews.appspot.com/1036801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Reformulate RPC generated TypeHandlers to create fewer classes. (issue1037801)

2010-10-20 Thread scottb

Reviewers: zundel, bobv,

Description:
This is a reformulation of the TypeHandler change, which causes the
generated serializer class to serve as the TypeHandler interface
implementor.  The current implementation uses an inner class, which
causes twice as many types to get generated.

Please review this at http://gwt-code-reviews.appspot.com/1037801/show

Affected files:
  M user/src/com/google/gwt/user/client/rpc/impl/SerializerBase.java
  M user/src/com/google/gwt/user/client/rpc/impl/TypeHandler.java
  M user/src/com/google/gwt/user/rebind/rpc/FieldSerializerCreator.java
  M user/src/com/google/gwt/user/rebind/rpc/TypeSerializerCreator.java


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread conroy


http://gwt-code-reviews.appspot.com/1036801/diff/6001/7001
File plugins/npapi/Makefile (right):

http://gwt-code-reviews.appspot.com/1036801/diff/6001/7001#newcode47
plugins/npapi/Makefile:47: CFLAGS += -DBROWSER_NPAPI -DXP_UNIX
-fshort-wchar
On 2010/10/20 19:31:06, fabiomfv wrote:

out of curiosity, why are we defining XP_UNIX for a presumably mac

build?

Mac is a variant of Unix. The other npapi plugin code I looked at all
defined XP_UNIX for both linux and mac builds.

http://gwt-code-reviews.appspot.com/1036801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread John Tamplin
On Wed, Oct 20, 2010 at 3:25 PM, Arthur Kalmenson wrote:

> Is this coming with GWT 2.1? I'm guessing this is a Chrome Extension
> for Mac OS X
>

The plugins are updated independently of GWT itself, and this can be used
with GWT 2.0 as well.

Note that Chrome on both Mac and Linux have the same restriction that they
don't allow non-localhost access, which is why it isn't being pushed as an
official update until that is fixed (the issue is a way to put up the dialog
from the NPAPI plugin -- on Windows we "cheated" with a modal event loop).

-- 
John A. Tamplin
Software Engineer (GWT), Google

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread fabiomfv


http://gwt-code-reviews.appspot.com/1036801/diff/6001/7001
File plugins/npapi/Makefile (right):

http://gwt-code-reviews.appspot.com/1036801/diff/6001/7001#newcode47
plugins/npapi/Makefile:47: CFLAGS += -DBROWSER_NPAPI -DXP_UNIX
-fshort-wchar
out of curiosity, why are we defining XP_UNIX for a presumably mac
build?

http://gwt-code-reviews.appspot.com/1036801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread Arthur Kalmenson
Is this coming with GWT 2.1? I'm guessing this is a Chrome Extension
for Mac OS X

--
Arthur Kalmenson



On Wed, Oct 20, 2010 at 3:10 PM,   wrote:
> LGTM2
>
> On 2010/10/20 18:54:20, jat wrote:
>>
>> Ok.
>
>> Be sure and check in the compiled libraries in prebuilt and an updated
>
> CRX at
>>
>> the same time.
>
>
>
> http://gwt-code-reviews.appspot.com/1036801/show
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread knorton

LGTM2

On 2010/10/20 18:54:20, jat wrote:

Ok.



Be sure and check in the compiled libraries in prebuilt and an updated

CRX at

the same time.




http://gwt-code-reviews.appspot.com/1036801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread jat

Ok.

Be sure and check in the compiled libraries in prebuilt and an updated
CRX at the same time.

http://gwt-code-reviews.appspot.com/1036801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: GWT 2.1 MVP with GIN

2010-10-20 Thread David
Why not include Gin in GWT 2.1 ? It could maybe be useful inside the
GWT codebase as well ?

On Wed, Oct 20, 2010 at 5:32 PM, David Chandler  wrote:
> Hmmm, I see my comments about GIN in the ActivityMapper have caught up
> with me. I haven't worked this out fully yet, but was thinking of
> something along the lines of gwt-presenter's  href="http://code.google.com/p/gwt-presenter/source/browse/src/main/java/net/customware/gwt/presenter/client/place/PresenterPlace.java";>PresenterPlace.
> My thought is to use GIN in place of the ClientFactory, and to write
> ActivityMapper.getActivity() like this:
>
>        public Activity getActivity(Place place) {
>                if (place instanceof ActivityPlace)
>                {
>                        return ((ActivityPlace) place).getActivity();
>                }
>        }
>
> where an ActivityPlace would be obtained from a GIN-aware
> PlaceHistoryMapperWithFactory implementation so it can be injected
> with the EventBus, etc.
>
>
> On Wed, Oct 20, 2010 at 8:54 AM, Aigeec  wrote:
>> Hey Guys,
>>
>> I am also interested in an implementation of GWT 2.1 MVP using GIN.
>>
>> I have made some head way with it.
>>
>> This has been done mostly by extending the ActivityManager,
>> PlaceController and PlaceHistoryHandler classes and overriding their
>> constructors to use GIN injection. I don't know if this is the correct
>> implementation and if anyone has comments please let me know. But I
>> have been able to remove the need for the ClientFactory and use GIN
>> injection to instantiate everything but the Activity classes.
>>
>> However, I do not know how to tackle the ActivityMapper class.
>>
>> As Tolga says how do we replace the nested if statement with a GIN
>> module?
>>
>> I would much prefer to be able to instantiate the Activity Class this
>> way as I am using the SecureDispatchAsync as would like to use DI to
>> pass it to the Activity.
>>
>> Regards,
>>
>> Aigeec
>>
>> On Oct 20, 1:31 am, Tolga Tarhan  wrote:
>>> Folks,
>>>
>>> I'm trying to make GWT 2.1 MVP work nicely with GIN. It looks like this use
>>> case was specifically considered when
>>> creating PlaceHistoryMapperWithFactory, but no such thing seems to exist for
>>> ActivityMapper. There is a passing reference to using Gin in
>>> DevGuideMvpActivitiesAndPlaces.html , where it says "... ClientFactory is
>>> used by HelloActivity to obtain a reference to the HelloView as well as the
>>> EventBus and PlaceController. Any of these could alternatively be injected
>>> via GIN." and also when it says "A better way to implement the chain of
>>> nested ifs would be with a GIN module", in reference to ActivityMapper.
>>>
>>> The problem, however, is that we cannot both inject application-level
>>> objects (EventBus, PlaceController, etc) and also pass the Place as
>>> constructor arguments to the Activity. We could have all of the dependencies
>>> for every Activity (like all the views) injected into our ActivityMapper and
>>> pass them thru, but this leaks a lot of details into what should be a very
>>> simple mapper class. If done incorrectly, it would also cause code-splitting
>>> issues.
>>>
>>> One way around this is to inject a Provider or
>>> AsyncProvider in the ActivityMapper and then do something like
>>> myActivityProvider.get().initPlace(place) - which is like the assisted
>>> injection that's discussed in the Guice docs. I'm wondering if there's a
>>> more elegant way that was considered?
>>>
>>> Additionally, I'm not sure I understand how to "implement the chain of
>>> nested ifs" in a GIN module. This sounds like a great idea, but what did you
>>> have in mind to make GIN do this for us? We can have GIN differentiate on a
>>> bunch of things (annotations, generics, interfaces, etc), but I don't know
>>> how you could replace the if-block with GIN. Could someone point me in the
>>> right direction here?
>>>
>>> Thanks,
>>> Tolga
>>
>> --
>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>
>
> --
> David Chandler
> Developer Programs Engineer, Google Web Toolkit
> http://googlewebtoolkit.blogspot.com/
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread conroy


http://gwt-code-reviews.appspot.com/1036801/diff/1/3
File plugins/npapi/manifest-template.json (right):

http://gwt-code-reviews.appspot.com/1036801/diff/1/3#newcode24
plugins/npapi/manifest-template.json:24: { "path":
"Darwin-gcc3/gwtDev.plugin", "public": true }
On 2010/10/20 17:24:20, jat wrote:

Are you sure this works when the Linux .so is included?



When I tried before, on the Mac it would try and load the Linux .so

and fail,

and never try to load the Darwin version.



Is it simply having the directory with the plist file that fixes that?


The .so makes no difference in my testing. Indeed, the plugin directory
structure and plist was key to making it load successfully. See
chrome›trunk›src›webkit›glue›plugins›plugin_lib_mac.mm for some of the
details on how Chrome loads a mac plugin.

http://gwt-code-reviews.appspot.com/1036801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread conroy

http://gwt-code-reviews.appspot.com/1036801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread jat

LGTM if you have verified it works with the Linux .so's in the CRX and a
couple of nits.


http://gwt-code-reviews.appspot.com/1036801/diff/1/3
File plugins/npapi/manifest-template.json (right):

http://gwt-code-reviews.appspot.com/1036801/diff/1/3#newcode24
plugins/npapi/manifest-template.json:24: { "path":
"Darwin-gcc3/gwtDev.plugin", "public": true }
Are you sure this works when the Linux .so is included?

When I tried before, on the Mac it would try and load the Linux .so and
fail, and never try to load the Darwin version.

Is it simply having the directory with the plist file that fixes that?

http://gwt-code-reviews.appspot.com/1036801/diff/1/4
File
plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/Info.plist
(right):

http://gwt-code-reviews.appspot.com/1036801/diff/1/4#newcode30
plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/Info.plist:30:
Plugin to allow debugging of GWT applications in Out of Process
Hosted Mode (OOPHM)
Should probably change this to DevMode

http://gwt-code-reviews.appspot.com/1036801/diff/1/5
File plugins/npapi/prebuilt/gwt-dev-plugin/manifest.json (right):

http://gwt-code-reviews.appspot.com/1036801/diff/1/5#newcode3
plugins/npapi/prebuilt/gwt-dev-plugin/manifest.json:3: "version":
"9119",
Shouldn't this be 1.0.9119?

http://gwt-code-reviews.appspot.com/1036801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Update the npapi plugin to support OSX. (issue1036801)

2010-10-20 Thread conroy

Reviewers: jat, fabiomfv,

Description:
Update the npapi plugin to support OSX.


Please review this at http://gwt-code-reviews.appspot.com/1036801/show

Affected files:
  M plugins/npapi/Makefile
  M plugins/npapi/manifest-template.json
  A  
plugins/npapi/prebuilt/gwt-dev-plugin/Darwin-gcc3/gwtDev.plugin/Contents/Info.plist

  M plugins/npapi/prebuilt/gwt-dev-plugin/manifest.json


--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: Not using dvsDataMap on child entities

2010-10-20 Thread Tim Murison
On Wed, Oct 20, 2010 at 12:02 PM, BobV  wrote:
> On Wed, Oct 20, 2010 at 11:34 AM, Tim Murison  wrote:
>> Any updates on this issue?
>
> I am burning down the server code this week.

Will it be replaced with some shiny new server code?

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: Not using dvsDataMap on child entities

2010-10-20 Thread BobV
On Wed, Oct 20, 2010 at 11:34 AM, Tim Murison  wrote:
> Any updates on this issue?

I am burning down the server code this week.

-- 
Bob Vawter
Google Web Toolkit Team

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: Not using dvsDataMap on child entities

2010-10-20 Thread Tim Murison
More notes on this:

Say I have the following relationship, a User has a list of
OfficeHours. Using the editor framework, I can create OfficeHours
proxies, add them to User and persist() and get the whole graph,
including new OfficeHours, on the server.

If I add a new OfficeHours proxy and update an existing one and
persist(), I get the whole graph (with the update) on the server.

However, if all I do is update an OfficeHours proxy, then the
JsonRequestProcessor sends me the copy it got from
OfficeHours::findOfficeHours() instead of the updated version.

On Wed, Oct 20, 2010 at 11:34 AM, Tim Murison  wrote:
> Any updates on this issue?
>
> It seems very much like a bug as opposed to a purposeful design
> choice. All the editors work with object graphs and it makes sense to
> persist changes by sending object graph.
>
> On Fri, Oct 15, 2010 at 11:05 AM, Patrick Julien  wrote:
>> Not to mention that it's right there, it's in dvsDataMap, the only
>> problem is that it's sending the copy from the wrong map, that's it.
>>
>>
>>
>> On Fri, Oct 15, 2010 at 11:01 AM, Patrick Julien  wrote:
>>> Do you have any idea on how I could get to the modified sub-entity? I
>>> have no way of reaching it right now.
>>>
>>> Even if this is outside your design for request factory it kind of
>>> conflicts with the design of editors.  Editors want to get an object
>>> graph and that's what we would want to send back since this is what we
>>> got.
>>>
>>> Also, I don't understand if you're using manual or javax validations
>>> on how you're suppose to make an informed decision if something passes
>>> a validation or not in the service handler if pieces of the object
>>> graph come in one at a time.
>>>
>>>
>>>
>>> On Fri, Oct 15, 2010 at 10:48 AM, BobV  wrote:
 On Thu, Oct 14, 2010 at 8:17 PM, Patrick Julien  wrote:
> As a follow up this, the internal persist() method isn't called on
> these modified entities either.

 Chained persistence is explicitly outside the RequestFactory design
 because RequestFactory doesn't know anything about persistence.
 Introducing a proper service layer into the server code should make
 this easier to implement.

 --
 Bob Vawter
 Google Web Toolkit Team

 --
 http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>>
>>
>> --
>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: Not using dvsDataMap on child entities

2010-10-20 Thread Tim Murison
Any updates on this issue?

It seems very much like a bug as opposed to a purposeful design
choice. All the editors work with object graphs and it makes sense to
persist changes by sending object graph.

On Fri, Oct 15, 2010 at 11:05 AM, Patrick Julien  wrote:
> Not to mention that it's right there, it's in dvsDataMap, the only
> problem is that it's sending the copy from the wrong map, that's it.
>
>
>
> On Fri, Oct 15, 2010 at 11:01 AM, Patrick Julien  wrote:
>> Do you have any idea on how I could get to the modified sub-entity? I
>> have no way of reaching it right now.
>>
>> Even if this is outside your design for request factory it kind of
>> conflicts with the design of editors.  Editors want to get an object
>> graph and that's what we would want to send back since this is what we
>> got.
>>
>> Also, I don't understand if you're using manual or javax validations
>> on how you're suppose to make an informed decision if something passes
>> a validation or not in the service handler if pieces of the object
>> graph come in one at a time.
>>
>>
>>
>> On Fri, Oct 15, 2010 at 10:48 AM, BobV  wrote:
>>> On Thu, Oct 14, 2010 at 8:17 PM, Patrick Julien  wrote:
 As a follow up this, the internal persist() method isn't called on
 these modified entities either.
>>>
>>> Chained persistence is explicitly outside the RequestFactory design
>>> because RequestFactory doesn't know anything about persistence.
>>> Introducing a proper service layer into the server code should make
>>> this easier to implement.
>>>
>>> --
>>> Bob Vawter
>>> Google Web Toolkit Team
>>>
>>> --
>>> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>>
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: GWT 2.1 MVP with GIN

2010-10-20 Thread David Chandler
Hmmm, I see my comments about GIN in the ActivityMapper have caught up
with me. I haven't worked this out fully yet, but was thinking of
something along the lines of gwt-presenter's http://code.google.com/p/gwt-presenter/source/browse/src/main/java/net/customware/gwt/presenter/client/place/PresenterPlace.java";>PresenterPlace.
My thought is to use GIN in place of the ClientFactory, and to write
ActivityMapper.getActivity() like this:

public Activity getActivity(Place place) {
if (place instanceof ActivityPlace)
{
return ((ActivityPlace) place).getActivity();
}
}

where an ActivityPlace would be obtained from a GIN-aware
PlaceHistoryMapperWithFactory implementation so it can be injected
with the EventBus, etc.


On Wed, Oct 20, 2010 at 8:54 AM, Aigeec  wrote:
> Hey Guys,
>
> I am also interested in an implementation of GWT 2.1 MVP using GIN.
>
> I have made some head way with it.
>
> This has been done mostly by extending the ActivityManager,
> PlaceController and PlaceHistoryHandler classes and overriding their
> constructors to use GIN injection. I don't know if this is the correct
> implementation and if anyone has comments please let me know. But I
> have been able to remove the need for the ClientFactory and use GIN
> injection to instantiate everything but the Activity classes.
>
> However, I do not know how to tackle the ActivityMapper class.
>
> As Tolga says how do we replace the nested if statement with a GIN
> module?
>
> I would much prefer to be able to instantiate the Activity Class this
> way as I am using the SecureDispatchAsync as would like to use DI to
> pass it to the Activity.
>
> Regards,
>
> Aigeec
>
> On Oct 20, 1:31 am, Tolga Tarhan  wrote:
>> Folks,
>>
>> I'm trying to make GWT 2.1 MVP work nicely with GIN. It looks like this use
>> case was specifically considered when
>> creating PlaceHistoryMapperWithFactory, but no such thing seems to exist for
>> ActivityMapper. There is a passing reference to using Gin in
>> DevGuideMvpActivitiesAndPlaces.html , where it says "... ClientFactory is
>> used by HelloActivity to obtain a reference to the HelloView as well as the
>> EventBus and PlaceController. Any of these could alternatively be injected
>> via GIN." and also when it says "A better way to implement the chain of
>> nested ifs would be with a GIN module", in reference to ActivityMapper.
>>
>> The problem, however, is that we cannot both inject application-level
>> objects (EventBus, PlaceController, etc) and also pass the Place as
>> constructor arguments to the Activity. We could have all of the dependencies
>> for every Activity (like all the views) injected into our ActivityMapper and
>> pass them thru, but this leaks a lot of details into what should be a very
>> simple mapper class. If done incorrectly, it would also cause code-splitting
>> issues.
>>
>> One way around this is to inject a Provider or
>> AsyncProvider in the ActivityMapper and then do something like
>> myActivityProvider.get().initPlace(place) - which is like the assisted
>> injection that's discussed in the Guice docs. I'm wondering if there's a
>> more elegant way that was considered?
>>
>> Additionally, I'm not sure I understand how to "implement the chain of
>> nested ifs" in a GIN module. This sounds like a great idea, but what did you
>> have in mind to make GIN do this for us? We can have GIN differentiate on a
>> bunch of things (annotations, generics, interfaces, etc), but I don't know
>> how you could replace the if-block with GIN. Could someone point me in the
>> right direction here?
>>
>> Thanks,
>> Tolga
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

-- 
David Chandler
Developer Programs Engineer, Google Web Toolkit
http://googlewebtoolkit.blogspot.com/

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: Add a "ControllerBinder" in UiBinder so that UiHandlers can be bound on both the (issue923801)

2010-10-20 Thread Stephen Haberman

> How do you test these things?

This "gwt-hack" example project is horribly unmaintained, but the idea is:

http://github.com/stephenh/gwt-hack/blob/master/src/test/java/com/bizo/gwthack/client/presenters/ClientPresenterTest.java

When GwtFooView is generated, so is StubFooView, which has fields like:

StubTextBox name;
public IsTextBox name() { return name; }

So the test can grab the StubTextBox and call methods on it, like
"click" or "type" or "focus", which fire dummy versions of ClickEvent,
ChangeEvent, etc. The presenter handles these just as it would native
events (well, as long as you're not using native event features), and
then the test can observe the side effects in the stub widgets. E.g.
that the textbox's getText changed, or had style=display:none set, or
what not.

Here is StubTextBoxBase, for example:

http://github.com/stephenh/gwt-mpv/blob/master/user/src/main/java/org/gwtmpv/widgets/StubTextBoxBase.java

I have admittedly added stub functionality in an ad hoc manner, so I
can't promise that it acts exactly like the browser does, but the idea is to
get close enough that it's good enough for unit testing.

> How does the next guy know whether his event handler belongs in the
> view or the controller?

Well, the view is generated, so any code he puts there will be
overwritten. :-)

> [snip] but clicking on the header of a disclosure panel does change
> the view state, so it belongs in the view.

Personally, I like putting everything in the presenter so it stays
testable.

> Don't forget, that by mapping each widget to an interface would allow
> you to bind those up with GIN and create providers for those inside
> the presenter, so if for some reasons you wanted to be able to alter
> the view, you could easily do it and still keep the presenter/activity
> JUnit clean.

Yep. :-) I don't use GIN, but I have a WidgetsProvider interface that
allows the presenter to create dynamically create "newTextBox" widgets
and have it be a stub/gwt version as appropriate.

http://github.com/stephenh/gwt-mpv/blob/master/user/src/main/java/org/gwtmpv/widgets/GwtWidgetsProvider.java

> A first awesome step to this would be to make every widget implement
> an interface exposing all their public methods. I really hated
> extending every control and it will become more and more of a
> nightmare to maintain as the gwt codebase changes.

Agreed. I've been doing this lazily, as my apps need things:

http://github.com/stephenh/gwt-mpv/tree/master/user/src/main/java/org/gwtmpv/widgets

> I'd like to look more at the ui:binder changes. My idea was to add an
> annotation/annoatation processor to automatically codegen a new
> interface of every public method. For example

:-)

I started out doing this:

http://github.com/stephenh/interfacegen

But then I wanted stubs too:

http://github.com/stephenh/stubgen

And finally I gave up on APT (for this problem), because I don't want to
have to code the SomeView class at all. All of the XxxView artifacts are
derivable from the `ui.xml` file, so why maintain any of it by hand?
Given that the APT API only supports Java classes, I had to fail over to
a standard Java program that parses all of the `ui.xml` files in a
project.

However, given custom builders in Eclipse (which I need to do a write up
of), I've found this approach to be just as nice (it runs automatically
on save) as APT.

> I would LOVE LOVE LOVE for every gwt object that extends UIObject to
> implement a specific interface and would be more than happy to
> implement this.

Me too. :-)

I'd love to have help maintaining what I've got started. Andrew from
gwt-pectin has expressed interest in them as well--either from within
gwtmpv or extracting them into a gwt-widget-interfaces project.

Obviously it would be best if they were in GWT proper, but I haven't
seen any indication that it is likely to happen.

- Stephen

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9127 committed - Adding 2.1.0 tag

2010-10-20 Thread codesite-noreply

Revision: 9127
Author: p...@google.com
Date: Wed Oct 20 07:54:16 2010
Log: Adding 2.1.0 tag

http://code.google.com/p/google-web-toolkit/source/detail?r=9127

Added:
 /tags/2.1.0

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9126 committed - Removing 2.1.0 tag (will re-add)

2010-10-20 Thread codesite-noreply

Revision: 9126
Author: p...@google.com
Date: Wed Oct 20 07:53:40 2010
Log: Removing 2.1.0 tag (will re-add)

http://code.google.com/p/google-web-toolkit/source/detail?r=9126

Deleted:
 /tags/2.1.0

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] [google-web-toolkit] r9125 committed - Cherry picking bugs from trunk into release branch: 1032801, 1035801, ...

2010-10-20 Thread codesite-noreply

Revision: 9125
Author: gwt.mirror...@gmail.com
Date: Wed Oct 20 04:18:31 2010
Log: Cherry picking bugs from trunk into release branch: 1032801, 1035801,  
1031801


http://code.google.com/p/google-web-toolkit/source/detail?r=9125

Modified:
 /releases/2.1/samples/expenses/README-MAVEN.txt
 /releases/2.1/samples/expenses/pom.xml
 /releases/2.1/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java

===
--- /releases/2.1/samples/expenses/README-MAVEN.txt Sun Oct 17 04:15:32 2010
+++ /releases/2.1/samples/expenses/README-MAVEN.txt Wed Oct 20 04:18:31 2010
@@ -4,9 +4,12 @@
 Eclipse. We've tested against Eclipse 3.5. Later versions will likely
 also work, earlier versions may not.

-Eclipse users will need to have the m2eclipse, or equivalent, pluigin
-installed. Instructions for how to install the m2eclipse plugin can
-be found here: http://m2eclipse.sonatype.org/installing-m2eclipse.html
+Eclipse users will need to install the following plugin components:
+- Google Plugin for Eclipse (instructions at  
http://code.google.com/eclipse/)

+- m2eclipse Core
+- Maven Integration for WTP (in m2eclipse extras)
+  Instructions for installing the maven plugins can be found here:
+  http://m2eclipse.sonatype.org/installing-m2eclipse.html

 Ensure Eclipse is configured to use Java 1.6 as this sample uses
 AppEngine.
===
--- /releases/2.1/samples/expenses/pom.xml  Sun Oct 17 04:15:32 2010
+++ /releases/2.1/samples/expenses/pom.xml  Wed Oct 20 04:18:31 2010
@@ -25,11 +25,6 @@
true


-   
-maven-gae-plugin-repo
- 
http://maven-gae-plugin.googlecode.com/svn/repository

-maven-gae-plugin repository
-
 
 spring-maven-release
 Spring Maven Release Repository
@@ -155,7 +150,7 @@

 com.google.appengine.orm
 datanucleus-appengine
-1.0.7.final
+1.0.7
 
 

 
@@ -416,6 +411,9 @@
 json
 20090211
 
+
+

+
 
net.sf.jsr107cache
jsr107cache
===
--- /releases/2.1/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java	Fri  
Jun 18 06:44:18 2010
+++ /releases/2.1/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java	Wed  
Oct 20 04:18:31 2010

@@ -32,6 +32,9 @@

 import net.sourceforge.htmlunit.corejs.javascript.ScriptableObject;

+import org.w3c.css.sac.CSSParseException;
+import org.w3c.css.sac.ErrorHandler;
+
 import java.io.IOException;
 import java.net.MalformedURLException;
 import java.util.ArrayList;
@@ -91,6 +94,25 @@
 public void run() {
   WebClient webClient = new WebClient(browser);
   webClient.setAlertHandler(this);
+  // Adding a handler that ignores errors to work-around
+  //  
https://sourceforge.net/tracker/?func=detail&aid=3090806&group_id=47038&atid=448266

+  webClient.setCssErrorHandler(new ErrorHandler() {
+
+public void error(CSSParseException exception) {
+  // ignore
+}
+
+public void fatalError(CSSParseException exception) {
+  treeLogger.log(TreeLogger.WARN,
+  "CSS fatal error: " + exception.getURI() + " ["
+  + exception.getLineNumber() + ":"
+  + exception.getColumnNumber() + "] " +  
exception.getMessage());

+}
+
+public void warning(CSSParseException exception) {
+  // ignore
+}
+  });
   webClient.setIncorrectnessListener(this);
   webClient.setThrowExceptionOnFailingStatusCode(false);
   webClient.setThrowExceptionOnScriptError(true);

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Enum Ordinalization Optimization (issue1015801)

2010-10-20 Thread zundel

Some comments on style


http://gwt-code-reviews.appspot.com/1015801/diff/6001/7001
File dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
(right):

http://gwt-code-reviews.appspot.com/1015801/diff/6001/7001#newcode771
dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java:771:
// enum ordinalization (try to replace enum references with integer
ordinal)
Since this is a new optimizer, maybe we should move invocation to inside
of the isAggresivelyOptimize test so it could be easily disabled if we
suspect a problem?

http://gwt-code-reviews.appspot.com/1015801/diff/6001/7003
File dev/core/src/com/google/gwt/dev/jjs/impl/AstDumper.java (right):

http://gwt-code-reviews.appspot.com/1015801/diff/6001/7003#newcode46
dev/core/src/com/google/gwt/dev/jjs/impl/AstDumper.java:46:
maybeDumpAST(jprogram,null,true);
style nit: space following comma in parameter list (same throughout)

http://gwt-code-reviews.appspot.com/1015801/diff/6001/7003#newcode98
dev/core/src/com/google/gwt/dev/jjs/impl/AstDumper.java:98: pw.close();
Isn't the pw.flush() redudnant with pw.close()?

http://gwt-code-reviews.appspot.com/1015801/diff/6001/7005
File
dev/core/src/com/google/gwt/dev/jjs/impl/ImplicitUpcastAnalyzer.java
(right):

http://gwt-code-reviews.appspot.com/1015801/diff/6001/7005#newcode42
dev/core/src/com/google/gwt/dev/jjs/impl/ImplicitUpcastAnalyzer.java:42:
* TODO: Consider extending to handle implicit upcasts between primitive
types.
TODOs need a name after them - e.g. TODO(zundel):

http://gwt-code-reviews.appspot.com/1015801/show

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: Add a "ControllerBinder" in UiBinder so that UiHandlers can be bound on both the (issue923801)

2010-10-20 Thread Jeff Larsen
This is something I'm really interested in as well Stephen.

-
How do you test these things? How does the next guy know
whether his event handler belongs in the view or the controller?
-

If the event doesn't change the view state, it doesn't belong in the
view. I would argue that clicking a save button doesn't change the
view, so it shouldn't be added to the view, but clicking on the header
of a disclosure panel does change the view state, so it belongs in the
view.

As far as how you test them, by coding in the presenter specifically
against interfaces, you can use stubs to run your tests, still getting
all the JUnit testable goodness,

Don't forget, that by mapping each widget to an interface would allow
you to bind those up with GIN and create providers for those inside
the presenter, so if for some reasons you wanted to be able to alter
the view, you could easily do it and still keep the presenter/activity
JUnit clean.

A first awesome step to this would be to make every widget implement
an interface exposing all their public methods. I really hated
extending every control and it will become more and more of a
nightmare to maintain as the gwt codebase changes.

I'd like to look more at the ui:binder changes. My idea was to add an
annotation/annoatation processor to automatically codegen a new
interface of every public method. For example

@GenerateDisplayInterface
class SomeView implements SomeViewDisplay{


@UiField
TextBox box;

@UiField
Label label;

public SomeView(){.}


public IsTextBox getBox(){
  return box;
}

@DoNotGenerate
public IsLabel getLabel(){
  return label
}

}


would generate

public interface SomeViewDisplay {

IsTextBox getBox();
}

This would then avoid the problems inhernate with having the view be
completely code genned and would allow me to put view state change
handlers inside the view.

I would LOVE LOVE LOVE for every gwt object that extends UIObject to
implement a specific interface and would be more than happy to
implement this.



On Oct 19, 1:35 pm, Stephen Haberman 
wrote:
> > I agree that we need a more general low-labor way to bind events in a
> > GWT app, but this doesn't seem to be it. Am I missing something?
>
> It's not necessarily related to events, but I've been pleased with the
> low-labor aspect of generating views:
>
> http://gwtmpv.org/viewgeneration.html
>
> My workflow:
>
> * In Foo.ui.xml, add a "ui:field=name" line
> * Eclipse project builder sees the change, automatically runs codegen
>   * IsFooView is updated with "IsTextBox name()"
>   * GwtFooView is updating with @UiField name/etc.
>   * StubFooView is updated with "StubTextBox name()"
> * In FooPresenter, which extends Presenter, add:
>   * view.name().addClickHandler(...)
>
> Given GwtFooView is entirely generated, I cannot use @UiHandler events,
> hence FooPresenter calling "addClickHandler".
>
> However, I don't find this to be a big deal, as I'm trending towards a
> gwt-pectin-style binding DSL:
>
>     // in FooPresenter onBind
>     binder.bind(model.nameProperty).to(view.nameTextBox)
>
> So still no inner-classes, and the model/view keep each other up to date
> when one or the other changes. Note that the model part is entirely
> optional, it's only required if you want the handy "binder.bind" syntax.
>
> - Stephen

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


[gwt-contrib] Re: GWT 2.1 MVP with GIN

2010-10-20 Thread Aigeec
Hey Guys,

I am also interested in an implementation of GWT 2.1 MVP using GIN.

I have made some head way with it.

This has been done mostly by extending the ActivityManager,
PlaceController and PlaceHistoryHandler classes and overriding their
constructors to use GIN injection. I don't know if this is the correct
implementation and if anyone has comments please let me know. But I
have been able to remove the need for the ClientFactory and use GIN
injection to instantiate everything but the Activity classes.

However, I do not know how to tackle the ActivityMapper class.

As Tolga says how do we replace the nested if statement with a GIN
module?

I would much prefer to be able to instantiate the Activity Class this
way as I am using the SecureDispatchAsync as would like to use DI to
pass it to the Activity.

Regards,

Aigeec

On Oct 20, 1:31 am, Tolga Tarhan  wrote:
> Folks,
>
> I'm trying to make GWT 2.1 MVP work nicely with GIN. It looks like this use
> case was specifically considered when
> creating PlaceHistoryMapperWithFactory, but no such thing seems to exist for
> ActivityMapper. There is a passing reference to using Gin in
> DevGuideMvpActivitiesAndPlaces.html , where it says "... ClientFactory is
> used by HelloActivity to obtain a reference to the HelloView as well as the
> EventBus and PlaceController. Any of these could alternatively be injected
> via GIN." and also when it says "A better way to implement the chain of
> nested ifs would be with a GIN module", in reference to ActivityMapper.
>
> The problem, however, is that we cannot both inject application-level
> objects (EventBus, PlaceController, etc) and also pass the Place as
> constructor arguments to the Activity. We could have all of the dependencies
> for every Activity (like all the views) injected into our ActivityMapper and
> pass them thru, but this leaks a lot of details into what should be a very
> simple mapper class. If done incorrectly, it would also cause code-splitting
> issues.
>
> One way around this is to inject a Provider or
> AsyncProvider in the ActivityMapper and then do something like
> myActivityProvider.get().initPlace(place) - which is like the assisted
> injection that's discussed in the Guice docs. I'm wondering if there's a
> more elegant way that was considered?
>
> Additionally, I'm not sure I understand how to "implement the chain of
> nested ifs" in a GIN module. This sounds like a great idea, but what did you
> have in mind to make GIN do this for us? We can have GIN differentiate on a
> bunch of things (annotations, generics, interfaces, etc), but I don't know
> how you could replace the if-block with GIN. Could someone point me in the
> right direction here?
>
> Thanks,
> Tolga

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors


Re: [gwt-contrib] Re: Test timeout in JUnitShell ? (GWT 2.0.0)

2010-10-20 Thread John Tamplin
On Wed, Oct 20, 2010 at 9:22 AM, Ed  wrote:

> I couldn't hold back investigating a bit more.
> Like described in my last post, the timeout" always" occurred/started
> in a GWTTestCase class that contained two test cases that involve RPC
> calls.
>
> I did split up these test cases such that they have their own
> GWTTestCase class, and the timeout appearantly disappeared as I have
> seen it now for a week. All tests run fine now.
>
> Any idea how/why this is ?
> After all the debugging/work I get the feeling that there exists some
> "deep hidden bug" causing this timeout. ..
>

It's hard to say what the problem is without seeing your code, but take a
look at GWT's ValueTypeTest for an example that does very many RPCs in one
test class.

The important things are:

   - call delayTestFinish before making the async call
   - in all cases of the result, make sure to fail the test in some way or
   call finishTest

-- 
John A. Tamplin
Software Engineer (GWT), Google

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors

[gwt-contrib] Re: Test timeout in JUnitShell ? (GWT 2.0.0)

2010-10-20 Thread Ed
I couldn't hold back investigating a bit more.
Like described in my last post, the timeout" always" occurred/started
in a GWTTestCase class that contained two test cases that involve RPC
calls.

I did split up these test cases such that they have their own
GWTTestCase class, and the timeout appearantly disappeared as I have
seen it now for a week. All tests run fine now.

Any idea how/why this is ?
After all the debugging/work I get the feeling that there exists some
"deep hidden bug" causing this timeout. ..

Ed


On Oct 13, 2:40 pm, Ed  wrote:
> I give up for now :(...
> This issue is getting me against the roof... :(
> Even with remote debugging it all go well
> But let's not forget that the error only occurs sometimes: about 50%
> of the time and mostly during the day when I run the build manually
> when the server is more busy. During the night when the build server
> isn't doing much, most of the time thetimeoutexception doesn't
> occur.
>
> Almost always the exception occurs in atestclass (extending
> GWTTestCase) that contains  more then onetest. As far as I can see,
> it "never" happens intestclasses with only onetestmethod... So it
> seems that more tests in one GWTTestCase class take more time and in
> someway triggers thetimeoutexception...
>
> Also, in case thetimeoutexception occurs, the logging indicates that
> the GWT servlet GWTShellServlet is correctly informed, but still the
> exception occurs...
>
> For now, I disabled these GWTtestcase that need the backend (through
> RPC) as I can't work with this unpredictable behavior.
>
> On Oct 5, 4:56 pm, Ed  wrote:
>
>
>
> > > running thetestin your continuous build environment with remote debugging
> > > enabled and attaching to it with a debugger to see what is going on.
>
> > Thanks again. John
> > I did that already but will do it again now that I have a better
> > understanding of the GWT Junit code.
> > (I only have to use some tricks to attach the remote debugger
> > correctly ...)
>
> > On Oct 5, 4:24 pm, John Tamplin  wrote:
>
> > > On Tue, Oct 5, 2010 at 10:12 AM, Ed  wrote:
> > > > I found the servlet you meant: JUnitHostImpl
> > > > I see that the url that touches this servlet is correctly forwarded by
> > > > the proxy and received by this servlet when debugging in Eclipse:
> > > > The url that touches it: /
> > > > com.bv.gwt.profile.intern.ProfileGwtTest.JUnit/junithost (also appears
> > > > in the logging below)
>
> > > > However, when it's running during the nightly build and fails, I's
> > > > hard to find out what went wrong as the this servlet doesn't contain
> > > > debug/trace logging. It would be nice to see the path of execution in
> > > > the logging such that I can see why the servlet isn't touched.
>
> > > > Any idea's how to solve this?
> > > > Or any idea about what would be going wrong ?
>
> > > If it works when you run it directly, yet fails in the continuous build,
> > > then something is different between the two that matters.  I would suggest
> > > running thetestin your continuous build environment with remote debugging
> > > enabled and attaching to it with a debugger to see what is going on.
>
> > > --
> > > John A. Tamplin
> > > Software Engineer (GWT), Google

-- 
http://groups.google.com/group/Google-Web-Toolkit-Contributors