[gwt-contrib] Re: Fix dangling clinit issue; check if clinit method calls have been replaced or removed, during ja... (issue1448807)

2011-05-24 Thread scottb

LGTM

http://gwt-code-reviews.appspot.com/1448807/

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


[gwt-contrib] [google-web-toolkit] r10222 committed - Autoformats user/super and user/test-super...

2011-05-24 Thread codesite-noreply

Revision: 10222
Author:   zun...@google.com
Date: Tue May 24 14:39:31 2011
Log:  Autoformats user/super and user/test-super

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

Review by: fabb...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=10222

Added:
 /trunk/eclipse/settings/code-style/README.txt
 /trunk/eclipse/settings/code-style/org.eclipse.wst.jsdt.core.prefs
Modified:
  
/trunk/dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Array.java
  
/trunk/dev/core/super/com/google/gwt/dev/jjs/intrinsic/com/google/gwt/lang/Cast.java

 /trunk/user/super/com/google/gwt/emul/java/lang/Math.java
 /trunk/user/super/com/google/gwt/emul/java/lang/String.java
 /trunk/user/super/com/google/gwt/emul/java/math/BigDecimal.java
 /trunk/user/super/com/google/gwt/emul/java/util/AbstractHashMap.java
 /trunk/user/super/com/google/gwt/emul/java/util/Arrays.java

===
--- /dev/null
+++ /trunk/eclipse/settings/code-style/README.txt   Tue May 24 14:39:31 2011
@@ -0,0 +1,6 @@
+gwt_format.xml
+  Exported the Java Formatting settings using the "Export" button.
+
+org.eclipse.wst.jsdt.core.prefs:
+  Copied from the .setting directory of a JavaScript project configured
+  with Project specific settings for the JavaScript formatter.
===
--- /dev/null
+++ /trunk/eclipse/settings/code-style/org.eclipse.wst.jsdt.core.prefs	Tue  
May 24 14:39:31 2011

@@ -0,0 +1,260 @@
+#Mon May 23 16:47:32 EDT 2011
+eclipse.preferences.version=1
+org.eclipse.wst.jsdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_allocation_expression=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_enum_constant=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_method_invocation=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_assignment=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_binary_expression=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_compact_if=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_conditional_expression=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.wst.jsdt.core.formatter.alignment_for_expressions_in_array_initializer=48
+org.eclipse.wst.jsdt.core.formatter.alignment_for_multiple_fields=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_constructor_declaration=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_parameters_in_method_declaration=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_selector_in_method_invocation=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_superclass_in_type_declaration=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=4
+org.eclipse.wst.jsdt.core.formatter.alignment_for_throws_clause_in_method_declaration=4
+org.eclipse.wst.jsdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_after_package=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_field=0
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_method=2
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_before_package=0
+org.eclipse.wst.jsdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.wst.jsdt.core.formatter.blank_lines_between_type_declarations=0
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_objlit_initializer=end_of_line
+org.eclipse.wst.jsdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.wst.js

[gwt-contrib] [google-web-toolkit] r10220 committed - AppEngine uploads were choking on massive cache files written into war...

2011-05-24 Thread codesite-noreply

Revision: 10220
Author:   zun...@google.com
Date: Tue May 24 10:43:59 2011
Log:  AppEngine uploads were choking on massive cache files written  
into war/WEB-INF
This change moves the persistent unit cache default dir to war/.. for   
DevMode and

Compiler entry points (GWTShell already wrote to .gwt-tmp instead)

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

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

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/Compiler.java
 /trunk/dev/core/src/com/google/gwt/dev/DevMode.java

===
--- /trunk/dev/core/src/com/google/gwt/dev/Compiler.java	Thu Apr 28  
09:54:26 2011
+++ /trunk/dev/core/src/com/google/gwt/dev/Compiler.java	Tue May 24  
10:43:59 2011

@@ -202,7 +202,7 @@

   File persistentUnitCacheDir = null;
   if (options.getWarDir() != null  
&& !options.getWarDir().getName().endsWith(".jar")) {

-persistentUnitCacheDir = new File(options.getWarDir(), "WEB-INF");
+persistentUnitCacheDir = new File(options.getWarDir(), "../");
   }
   CompilationStateBuilder.init(logger, persistentUnitCacheDir);

===
--- /trunk/dev/core/src/com/google/gwt/dev/DevMode.java	Thu Apr 28 09:54:26  
2011
+++ /trunk/dev/core/src/com/google/gwt/dev/DevMode.java	Tue May 24 10:43:59  
2011

@@ -418,7 +418,7 @@

 File persistentCacheDir = null;
 if (options.getWarDir() != null  
&& !options.getWarDir().getName().endsWith(".jar")) {

-  persistentCacheDir = new File(options.getWarDir(), "WEB-INF");
+  persistentCacheDir = new File(options.getWarDir(), "../");
 }

 if (!super.doStartup(persistentCacheDir)) {

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


[gwt-contrib] [google-web-toolkit] r10219 committed - Attachable -> IsRenderable step 3: Renaming AttachableHTMLPanel to Ren...

2011-05-24 Thread codesite-noreply

Revision: 10219
Author:   rdcas...@google.com
Date: Tue May 24 10:37:15 2011
Log:  Attachable -> IsRenderable step 3: Renaming AttachableHTMLPanel  
to RenderablePanel. This guys has its days counted, as it will eventually  
be merged into HTMLPanel.


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

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

Added:
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/RenderablePanelParser.java

 /trunk/user/src/com/google/gwt/user/client/ui/RenderablePanel.java
Deleted:
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java

 /trunk/user/src/com/google/gwt/user/client/ui/AttachableHTMLPanel.java
Modified:
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/IsRenderableInterpreter.java

 /trunk/user/src/com/google/gwt/uibinder/rebind/AbstractFieldWriter.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
 /trunk/user/src/com/google/gwt/user/client/ui/RenderableComposite.java

===
--- /dev/null
+++  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/RenderablePanelParser.java	 
Tue May 24 10:37:15 2011

@@ -0,0 +1,105 @@
+/*
+ * Copyright 2011 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of

+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
WITHOUT

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under

+ * the License.
+ */
+package com.google.gwt.uibinder.elementparsers;
+
+import com.google.gwt.core.ext.UnableToCompleteException;
+import com.google.gwt.core.ext.typeinfo.JClassType;
+import  
com.google.gwt.uibinder.elementparsers.HtmlMessageInterpreter.PlaceholderInterpreterProvider;

+import com.google.gwt.uibinder.rebind.UiBinderWriter;
+import com.google.gwt.uibinder.rebind.XMLElement;
+import com.google.gwt.uibinder.rebind.messages.MessageWriter;
+import com.google.gwt.uibinder.rebind.messages.PlaceholderInterpreter;
+
+/**
+ * Parses {@link com.google.gwt.user.client.ui.RenderablePanel} widgets.
+ */
+public class RenderablePanelParser implements ElementParser {
+
+  public void parse(XMLElement elem, String fieldName, JClassType type,
+  final UiBinderWriter writer) throws UnableToCompleteException {
+
+assert writer.useLazyWidgetBuilders();
+
+/*
+ * Gathers up elements that indicate nested IsRenderable objects.
+ */
+IsRenderableInterpreter isRenderableInterpreter = null;
+isRenderableInterpreter = new IsRenderableInterpreter(
+fieldName, writer);
+
+/*
+ * Gathers up elements that indicate nested widgets (but only those  
that are

+ * not inside msg elements).
+ */
+WidgetInterpreter widgetInterpreter = new WidgetInterpreter(fieldName,
+writer);
+
+/*
+ * Handles non-widget elements like msg, and dom elements with ui:field
+ * attributes. There may be widgets inside a msg, which is why the
+ * construction in makeHtmlInterpreter is so complicated.
+ */
+HtmlInterpreter htmlInterpreter = makeHtmlInterpreter(fieldName,  
writer);

+
+writer.beginAttachedSection(fieldName);
+
+final InterpreterPipe interpreters;
+interpreters = InterpreterPipe.newPipe(
+isRenderableInterpreter, widgetInterpreter, htmlInterpreter);
+String html = elem.consumeInnerHtml(interpreters);
+
+writer.endAttachedSection();
+
+/*
+ * RenderablePanel has no no-arg ctor, so we have to generate our own,  
using the
+ * element's innerHTML and perhaps its tag attribute. Do this in a way  
that
+ * will not break subclasses if they happen to have the same  
constructor

+ * signature (by passing in type).
+ */
+String customTag = elem.consumeStringAttribute("tag", null);
+
+// TODO(rdcastro): Add support for custom tags in RenderablePanel.
+if (customTag != null) {
+  writer.getLogger().die(
+  "RenderablePanel does not support custom root elements yet.");
+}
+
+writer.setFieldInitializerAsConstructor(fieldName, type,  
writer.declareTemplateCall(html));

+  }
+
+  /**
+   * Creates an HtmlInterpreter with our specialized placeholder  
interpreter,
+   * which will allow widget instances to be declared inside of ui:msg  
elements.

+   */
+  private HtmlInterpreter makeHtmlInterpreter(final String fieldName,
+  final UiBinderWriter uiWriter) {
+final String ancestorExpression = fieldName;
+
+PlaceholderInterpreterProvider placeholderInterpreterProvider =
+new PlaceholderInterpreterProvider() {
+  public PlaceholderInterpreter get(MessageWriter message) {
+

[gwt-contrib] Fix dangling clinit issue; check if clinit method calls have been replaced or removed, during ja... (issue1448807)

2011-05-24 Thread jbrosenberg

Reviewers: cromwellian, scottb,

Description:
Fix dangling clinit issue; check if clinit method calls have been
replaced or removed, during javascript generation phase.


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

Affected files:
  M dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java


Index: dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
===
--- dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java	 
(revision 10198)
+++ dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java	 
(working copy)

@@ -127,6 +127,7 @@
 import com.google.gwt.dev.js.ast.JsNew;
 import com.google.gwt.dev.js.ast.JsNode;
 import com.google.gwt.dev.js.ast.JsNormalScope;
+import com.google.gwt.dev.js.ast.JsNullLiteral;
 import com.google.gwt.dev.js.ast.JsNumberLiteral;
 import com.google.gwt.dev.js.ast.JsObjectLiteral;
 import com.google.gwt.dev.js.ast.JsParameter;
@@ -1117,6 +1118,31 @@
   JsInvocation jsInvocation = new JsInvocation(x.getSourceInfo());

   popList(jsInvocation.getArguments(), x.getArgs().size()); // args
+
+  if (JProgram.isClinit(method)) {
+/*
+ * It is possible for clinits to be referenced here that have  
actually

+ * been retargeted (see {@link
+ * JTypeOracle.recomputeAfterOptimizations}). Most of the time,  
these
+ * will get cleaned up by other optimization passes prior to this  
point,
+ * but it's not guaranteed. In this case we need to replace the  
method
+ * call with the replaced clinit, unless the replacement is null,  
in
+ * which case we generate a JsNullLiteral as a place-holder  
expression.

+ */
+JDeclaredType type = method.getEnclosingType();
+JDeclaredType clinitTarget = type.getClinitTarget();
+if (clinitTarget == null) {
+  if (x.getInstance() != null) {
+pop(); // instance
+  }
+  // generate a null expression, which will get optimized out
+  push(JsNullLiteral.INSTANCE);
+  return;
+} else if (type != clinitTarget) {
+  // replace the method with its retargeted clinit
+  method = clinitTarget.getMethods().get(0);
+}
+  }

   JsNameRef qualifier;
   JsExpression unnecessaryQualifier = null;


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


[gwt-contrib] Add RequestContext.find() to support chained requests. (issue1448806)

2011-05-24 Thread bobv

Reviewers: rjrjr,

Message:
I don't think RequestFactory.find() should be deprecated.  It's a
convenient starting point.  If you want to convert existing calls to
find() to operate in a chained manner, the Request.to() method returns
the underlying RequestContext, which will now have its own find()
method.


http://gwt-code-reviews.appspot.com/1448806/diff/1/user/src/com/google/web/bindery/requestfactory/shared/impl/FindRequest.java
File
user/src/com/google/web/bindery/requestfactory/shared/impl/FindRequest.java
(left):

http://gwt-code-reviews.appspot.com/1448806/diff/1/user/src/com/google/web/bindery/requestfactory/shared/impl/FindRequest.java#oldcode30
user/src/com/google/web/bindery/requestfactory/shared/impl/FindRequest.java:30:
public interface FindRequest extends RequestContext {
This type hasn't been used for a while.

http://gwt-code-reviews.appspot.com/1448806/diff/1/user/test/com/google/web/bindery/requestfactory/gwt/client/FindServiceTest.java
File
user/test/com/google/web/bindery/requestfactory/gwt/client/FindServiceTest.java
(right):

http://gwt-code-reviews.appspot.com/1448806/diff/1/user/test/com/google/web/bindery/requestfactory/gwt/client/FindServiceTest.java#newcode55
user/test/com/google/web/bindery/requestfactory/gwt/client/FindServiceTest.java:55:
public void testChainedFind() {
The addition of this method is the only real change, the rest is
reformatting.

Description:
Add RequestContext.find() to support chained requests.
Delete unused FindRequest type.
Patch by: bobv
Review by: rjrjr


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

Affected files:
  M  
user/src/com/google/web/bindery/requestfactory/shared/RequestContext.java
  M  
user/src/com/google/web/bindery/requestfactory/shared/RequestFactory.java
  M  
user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestContext.java
  M  
user/src/com/google/web/bindery/requestfactory/shared/impl/AbstractRequestFactory.java
  D  
user/src/com/google/web/bindery/requestfactory/shared/impl/FindRequest.java
  M  
user/test/com/google/web/bindery/requestfactory/gwt/client/FindServiceTest.java
  M  
user/test/com/google/web/bindery/requestfactory/server/RequestFactoryInterfaceValidatorTest.java



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


[gwt-contrib] Editor framework and submitting object graphs

2011-05-24 Thread Tim Murison
Hi,

I've recently transitioned my web application from GWT 2.2 to 2.3 and I've 
started to encounter some problems. I have a few editors with multiple 
sub-editors that can be used to both create and edit resources. For example:

Person
[List Offices]
[List Phones]
[List Office Hours]

This is constructed as a PersonEditor with a @UiField CompositeEditor for the 
offices and the CompositeEditor uses CellTable HasDataEditors for the phones 
and office hours.

In GWT 2.2, this all worked perfectly, I can create a Person resource by 
submitting the object graph of sub-resources to the server and I can fetch a 
Person resource as well as all the sub-resources and the editor framework takes 
care of all the magic for me.

In GWT 2.3, fetching works perfectly, but submitting does not. From what I can 
tell, the properties of any type controlled by a CompositeEditor are not filled 
in. This triggers javax.validation errors from my server which I can see on the 
wire. By putting breakpoints in the server, I am certain that the complete 
object graph is not sent.

Since I'm unaware of any changes to the editor framework in GWT 2.3, other than 
renaming the request factory packages, I'm surprised that my editors are 
broken. Do you have any pointers?

Thanks,

-Tim

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


[gwt-contrib] Re: Add BatchedRequestScope utility class to aggregate all requests made within a single tick of the... (issue1449804)

2011-05-24 Thread bobv

http://gwt-code-reviews.appspot.com/1449804/

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


[gwt-contrib] Re: Fix expression ranges in detailed SOYC output (issue1451801)

2011-05-24 Thread dconnelly

On 2011/05/24 22:23:08, dconnelly wrote:

I named this patch set poorly... there were several things in
JavaToJavaScriptCompiler that I had to merge in.

http://gwt-code-reviews.appspot.com/1451801/

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


[gwt-contrib] Re: Fix expression ranges in detailed SOYC output (issue1451801)

2011-05-24 Thread dconnelly

http://gwt-code-reviews.appspot.com/1451801/

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


[gwt-contrib] Re: Autoformats user/super and user/test-super (issue1442805)

2011-05-24 Thread zundel

http://gwt-code-reviews.appspot.com/1442805/

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


Re: [gwt-contrib] Re: Fix expression ranges in detailed SOYC output (issue1451801)

2011-05-24 Thread Eric Ayers
LGTM

On Tue, May 24, 2011 at 4:55 PM,   wrote:
> LGTM
>
>
> http://gwt-code-reviews.appspot.com/1451801/
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>



-- 
Eric Z. Ayers
Google Web Toolkit, Atlanta, GA USA

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


[gwt-contrib] Re: Fix expression ranges in detailed SOYC output (issue1451801)

2011-05-24 Thread cromwellian

LGTM


http://gwt-code-reviews.appspot.com/1451801/

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


Re: [gwt-contrib] Re: Detaching the table section in CellTable before setting the innerHTML to replace the rows. This ... (issue1443805)

2011-05-24 Thread Ray Ryan
You're working too hard in IE. You don't need to create the entire table,
you can create fragments so long as you're doing it inside a 

On Tue, May 24, 2011 at 1:21 PM,  wrote:

> committed as r10218 before I read Ray's comment.
>
>
> On 2011/05/24 20:06:24, rjrjr wrote:
>
>> Rather than detaching, could you render the new contents in a hidden
>>
> div and
>
>> then replace the tbody?
>>
> I suppose that would work too, but the bug is only in Firefox 3.6 and
> earlier.  I'm not sure it would make much of a difference because we
> still end up with a detach, and attach, and an innerHTML call.


I don't follow your logic here. Couldn't you say the same about the entire
optimization? And FF 3.6 is (unfortunately) still a pretty big browser
base.

>
>
>  IE is a little tricky about doing this kind of thing with table
>>
> elements,
>
>> but HTMLPanel.HTMLPanel(String, String) shows the workaround for that
>>
> (just
>
>> render inside a div and all is forgiven).
>>
> That's an understatement.  You cannot remove a tbody in IE, nor can you
> set its innerHTML.  Instead, we create a new table in a detached div, as
> you suggest, then move every row from the new tbody into the existing
> tbody.


Wow, that's horrible.

>
>
>  On Tue, May 24, 2011 at 12:50 PM,  wrote:
>>
>
>  > In Firefox 3.6 and older, detaching a tbody from a table causes
>>
> Firefox
>
>> > to convert all of the TD elements to divs.  Firefox 4.0 doesn't have
>> > this problem and works as expected.
>> >
>> > I updated the patch to skip the detach in Firefox 3.6-.
>> >
>> >
>> > http://gwt-code-reviews.appspot.com/1443805/
>> >
>> > --
>> > http://groups.google.com/group/Google-Web-Toolkit-Contributors
>> >
>>
>
>
>
> http://gwt-code-reviews.appspot.com/1443805/
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

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

[gwt-contrib] Adding new DataGrid widget. DataGrid is a variation of CellTable that supports a fixed header a... (issue1450805)

2011-05-24 Thread jlabanca

Reviewers: rchandia,

Description:
Adding new DataGrid widget.  DataGrid is a variation of CellTable that
supportsa fixed header and footer with a scrollable data area. Most of
the CellTable implementation has been hoisted up to a shared abstract
class AbstractCellTable, so switching from CellTable to DataGrid is
easy.  Data Grid uses HeaderPanel to position the header and footer
tables above and below the data portion.  By default, the tables take
100% width, so there is no horizontal scrollbar.  However, DataGrid
provides setTableWidth/setMinimumTableWidth so users can use horizontal
scrollbars if needed.

I added a DataGrid example to Showcase.  I'll update the DynaTableRf
sample to use it as well at a later time, which will improve the UI.
Demo: http://showcase.jlabanca-testing.appspot.com/#!CwCellTable
Demo with horizontal scrollbar (on narrow monitors):
http://showcase.jlabanca-testing.appspot.com/#!CwCellSampler

Issue: 188


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

Affected files:
  M  
samples/showcase/src/com/google/gwt/i18n/client/LocalizableResource.properties
  M  
samples/showcase/src/com/google/gwt/i18n/client/LocalizableResource_ar.properties
  M  
samples/showcase/src/com/google/gwt/i18n/client/LocalizableResource_fr.properties
  M  
samples/showcase/src/com/google/gwt/i18n/client/LocalizableResource_zh.properties
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/MainMenuTreeViewModel.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/ShowcaseConstants.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellSampler.java
  M  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwCellSampler.ui.xml
  A  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwDataGrid.java
  A  
samples/showcase/src/com/google/gwt/sample/showcase/client/content/cell/CwDataGrid.ui.xml

  M tools/api-checker/config/gwt23_24userApi.conf
  M user/src/com/google/gwt/user/cellview/CellView.gwt.xml
  A user/src/com/google/gwt/user/cellview/client/AbstractCellTable.java
  M user/src/com/google/gwt/user/cellview/client/AbstractHasData.java
  M  
user/src/com/google/gwt/user/cellview/client/CellBasedWidgetImplStandard.java
  M  
user/src/com/google/gwt/user/cellview/client/CellBasedWidgetImplTrident.java

  M user/src/com/google/gwt/user/cellview/client/CellTable.java
  A user/src/com/google/gwt/user/cellview/client/DataGrid.css
  A user/src/com/google/gwt/user/cellview/client/DataGrid.java
  M user/src/com/google/gwt/user/client/ui/CustomScrollPanel.java
  M user/test/com/google/gwt/user/cellview/CellViewSuite.java
  A  
user/test/com/google/gwt/user/cellview/client/AbstractCellTableTestBase.java

  M user/test/com/google/gwt/user/cellview/client/CellTableTest.java
  A user/test/com/google/gwt/user/cellview/client/DataGridTest.java


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


[gwt-contrib] Re: Fix expression ranges in detailed SOYC output (issue1451801)

2011-05-24 Thread dconnelly

http://gwt-code-reviews.appspot.com/1451801/

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


[gwt-contrib] Re: Detaching the table section in CellTable before setting the innerHTML to replace the rows. This ... (issue1443805)

2011-05-24 Thread jlabanca

committed as r10218 before I read Ray's comment.

On 2011/05/24 20:06:24, rjrjr wrote:

Rather than detaching, could you render the new contents in a hidden

div and

then replace the tbody?

I suppose that would work too, but the bug is only in Firefox 3.6 and
earlier.  I'm not sure it would make much of a difference because we
still end up with a detach, and attach, and an innerHTML call.


IE is a little tricky about doing this kind of thing with table

elements,

but HTMLPanel.HTMLPanel(String, String) shows the workaround for that

(just

render inside a div and all is forgiven).

That's an understatement.  You cannot remove a tbody in IE, nor can you
set its innerHTML.  Instead, we create a new table in a detached div, as
you suggest, then move every row from the new tbody into the existing
tbody.


On Tue, May 24, 2011 at 12:50 PM,  wrote:



> In Firefox 3.6 and older, detaching a tbody from a table causes

Firefox

> to convert all of the TD elements to divs.  Firefox 4.0 doesn't have
> this problem and works as expected.
>
> I updated the patch to skip the detach in Firefox 3.6-.
>
>
> http://gwt-code-reviews.appspot.com/1443805/
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>




http://gwt-code-reviews.appspot.com/1443805/

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


[gwt-contrib] [google-web-toolkit] r10218 committed - Detaching the table section in CellTable before setting the innerHTML ...

2011-05-24 Thread codesite-noreply

Revision: 10218
Author:   gwt.mirror...@gmail.com
Date: Tue May 24 13:14:09 2011
Log:  Detaching the table section in CellTable before setting the  
innerHTML to replace the rows. This is a well known performance enhancement  
that CellTable isn't taking advantage of.


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

Review by: rchan...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=10218

Modified:
 /trunk/user/src/com/google/gwt/dom/client/DOMImplMozilla.java
 /trunk/user/src/com/google/gwt/user/cellview/CellView.gwt.xml
 /trunk/user/src/com/google/gwt/user/cellview/client/CellTable.java

===
--- /trunk/user/src/com/google/gwt/dom/client/DOMImplMozilla.java	Fri Apr  
15 06:58:00 2011
+++ /trunk/user/src/com/google/gwt/dom/client/DOMImplMozilla.java	Tue May  
24 13:14:09 2011

@@ -49,6 +49,16 @@
 int geckoVersion = getGeckoVersion();
 return (geckoVersion != -1) && (geckoVersion <= 1009001);
   }
+
+  /**
+   * Return true if using Gecko 1.9.2 (Firefox 3.6) or earlier.
+   *
+   * @return true if using Gecko 1.9.2 (Firefox 3.6) or earlier
+   */
+  private static boolean isGecko192OrBefore() {
+int geckoVersion = getGeckoVersion();
+return (geckoVersion != -1) && (geckoVersion <= 1009002);
+  }

   /**
* Return true if using Gecko 2.0.0 (Firefox 4.0) or earlier.
===
--- /trunk/user/src/com/google/gwt/user/cellview/CellView.gwt.xml	Thu Apr   
7 10:52:25 2011
+++ /trunk/user/src/com/google/gwt/user/cellview/CellView.gwt.xml	Tue May  
24 13:14:09 2011

@@ -48,6 +48,14 @@
 
   

+  
+  class="com.google.gwt.user.cellview.client.CellTable.ImplMozilla">
+class="com.google.gwt.user.cellview.client.CellTable.Impl"/>

+
+  
+
+  
+
   
   class="com.google.gwt.user.cellview.client.CellTable.ImplTrident">
 class="com.google.gwt.user.cellview.client.CellTable.Impl"/>

===
--- /trunk/user/src/com/google/gwt/user/cellview/client/CellTable.java	Thu  
May 19 09:54:26 2011
+++ /trunk/user/src/com/google/gwt/user/cellview/client/CellTable.java	Tue  
May 24 13:14:09 2011

@@ -116,6 +116,7 @@
 /**
  * The styles used in this widget.
  */
+@Override
 @Source(BasicStyle.DEFAULT_CSS)
 BasicStyle cellTableStyle();
   }
@@ -409,6 +410,27 @@
 + sectionTag);
   }
 }
+
+/**
+ * Detach a table section element from its parent.
+ *
+ * @param section the element to detach
+ */
+protected void detachSectionElement(TableSectionElement section) {
+  section.removeFromParent();
+}
+
+/**
+ * Reattach a table section element from its parent.
+ *
+ * @param parent the parent element
+ * @param section the element to reattach
+ * @param nextSection the next section
+ */
+protected void reattachSectionElement(Element parent,  
TableSectionElement section,

+Element nextSection) {
+  parent.insertBefore(section, nextSection);
+}

 /**
  * Render a table section in the table.
@@ -424,16 +446,61 @@
   if (!table.isAttached()) {
 DOM.setEventListener(table.getElement(), table);
   }
+
+  // Remove the section from the tbody.
+  Element parent = section.getParentElement();
+  Element nextSection = section.getNextSiblingElement();
+  detachSectionElement(section);

   // Render the html.
   section.setInnerHTML(html.asString());

+  /*
+   * Reattach the section. If next section is null, the section will be
+   * appended instead.
+   */
+  reattachSectionElement(parent, section, nextSection);
+
   // Detach the event listener.
   if (!table.isAttached()) {
 DOM.setEventListener(table.getElement(), null);
   }
 }
   }
+
+  /**
+   * Implementation of {@link CellTable} used by Firefox.
+   */
+  @SuppressWarnings("unused")
+  private static class ImplMozilla extends Impl {
+/**
+ * Firefox 3.6 and earlier convert td elements to divs if the tbody is
+ * removed from the table element.
+ */
+@Override
+protected void detachSectionElement(TableSectionElement section) {
+  if (isGecko192OrBefore()) {
+return;
+  }
+  super.detachSectionElement(section);
+}
+
+@Override
+protected void reattachSectionElement(Element parent,  
TableSectionElement section,

+Element nextSection) {
+  if (isGecko192OrBefore()) {
+return;
+  }
+  super.reattachSectionElement(parent, section, nextSection);
+}
+
+/**
+ * Return true if using Gecko 1.9.2 (Firefox 3.6) or earlier.
+ */
+private native boolean isGecko192OrBefore() /*-{
+  return  
@com.google.gwt.dom.client.DOMImplMozilla::isGecko192OrBefore()();

+}-*/;
+  }

   /**
* Implementation of {@link CellTable} used by IE.
@@ -644,6 +711,7 @@

 // Create the ColumnSortList and delegate.
 sortList =

[gwt-contrib] [google-web-toolkit] r10217 committed - Adds a ui:safehtml tag to UiBinder...

2011-05-24 Thread codesite-noreply

Revision: 10217
Author:   gwt.mirror...@gmail.com
Date: Tue May 24 13:12:43 2011
Log:  Adds a ui:safehtml tag to UiBinder

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

Review by: rj...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=10217

Added:
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/UiSafeHtmlInterpreter.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/UiSafeHtmlInterpreterTest.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/UiTextInterpreterTest.java

Modified:
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java

 /trunk/user/src/com/google/gwt/uibinder/elementparsers/HtmlInterpreter.java
 /trunk/user/src/com/google/gwt/uibinder/elementparsers/TextInterpreter.java
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/UiTextInterpreter.java

 /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderParser.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/XMLAttribute.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/XMLElement.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/MockUiBinderWriter.java

 /trunk/user/test/com/google/gwt/uibinder/test/UiJavaResources.java
 /trunk/user/test/com/google/gwt/uibinder/test/client/Constants.java
 /trunk/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
 /trunk/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.java
 /trunk/user/test/com/google/gwt/uibinder/test/client/WidgetBasedUi.ui.xml

===
--- /dev/null
+++  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/UiSafeHtmlInterpreter.java	 
Tue May 24 13:12:43 2011

@@ -0,0 +1,49 @@
+/*
+ * Copyright 2011 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of

+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
WITHOUT

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under

+ * the License.
+ */
+package com.google.gwt.uibinder.elementparsers;
+
+import com.google.gwt.core.ext.UnableToCompleteException;
+import com.google.gwt.uibinder.rebind.UiBinderWriter;
+import com.google.gwt.uibinder.rebind.XMLAttribute;
+
+/**
+ * Interprets generic message tags like:
+ * . It's called in  
HTML contexts.

+ */
+public class UiSafeHtmlInterpreter extends UiTextInterpreter {
+  /**
+   * Used in {@link #interpretElement} to invoke the {@link  
ComputedAttributeInterpreter}.

+   */
+  private class Delegate extends UiTextInterpreter.Delegate {
+public String getAttributeToken(XMLAttribute attribute)
+  throws UnableToCompleteException {
+return  
writer.tokenForSafeHtmlExpression(attribute.consumeSafeHtmlValue());

+}
+  }
+
+  public UiSafeHtmlInterpreter(UiBinderWriter writer) {
+super(writer);
+  }
+
+  protected ComputedAttributeInterpreter  
createComputedAttributeInterpreter() {

+return new ComputedAttributeInterpreter(writer, new Delegate());
+  }
+
+  @Override
+  protected String getLocalName() {
+return "safehtml";
+  }
+}
===
--- /dev/null
+++  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/UiSafeHtmlInterpreterTest.java	 
Tue May 24 13:12:43 2011

@@ -0,0 +1,89 @@
+/*
+ * Copyright 2010 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of

+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
WITHOUT

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under

+ * the License.
+ */
+package com.google.gwt.uibinder.elementparsers;
+
+import com.google.gwt.core.ext.UnableToCompleteException;
+
+import junit.framework.TestCase;
+
+import org.xml.sax.SAXException;
+
+/**
+ * Test for {@link UiSafeHtmlInterpreter}.
+ */
+public class UiSafeHtmlInterpreterTest extends TestCase {
+
+  private static final String PARSED_TYPE  
= "com.google.gwt.user.client.ui.HTMLPanel";

+
+  private ElementParserTester tester;
+
+  @Override
+  public void setUp() throws Exception {
+super.setUp();
+tes

Re: [gwt-contrib] Re: Detaching the table section in CellTable before setting the innerHTML to replace the rows. This ... (issue1443805)

2011-05-24 Thread Ray Ryan
Rather than detaching, could you render the new contents in a hidden div and
then replace the tbody?

IE is a little tricky about doing this kind of thing with table elements,
but HTMLPanel.HTMLPanel(String, String) shows the workaround for that (just
render inside a div and all is forgiven).

On Tue, May 24, 2011 at 12:50 PM,  wrote:

> In Firefox 3.6 and older, detaching a tbody from a table causes Firefox
> to convert all of the TD elements to divs.  Firefox 4.0 doesn't have
> this problem and works as expected.
>
> I updated the patch to skip the detach in Firefox 3.6-.
>
>
> http://gwt-code-reviews.appspot.com/1443805/
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

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

[gwt-contrib] Re: Detaching the table section in CellTable before setting the innerHTML to replace the rows. This ... (issue1443805)

2011-05-24 Thread jlabanca

In Firefox 3.6 and older, detaching a tbody from a table causes Firefox
to convert all of the TD elements to divs.  Firefox 4.0 doesn't have
this problem and works as expected.

I updated the patch to skip the detach in Firefox 3.6-.

http://gwt-code-reviews.appspot.com/1443805/

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


[gwt-contrib] Re: Detaching the table section in CellTable before setting the innerHTML to replace the rows. This ... (issue1443805)

2011-05-24 Thread jlabanca

http://gwt-code-reviews.appspot.com/1443805/

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


[gwt-contrib] Re: Attachable -> IsRenderable step 3: Renaming AttachableHTMLPanel to RenderablePanel. This guys ha... (issue1446810)

2011-05-24 Thread rjrjr

LGTM

http://gwt-code-reviews.appspot.com/1446810/

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


Re: [gwt-contrib] gwtc classpath

2011-05-24 Thread Grzegorz Kossakowski
2011/5/24 John Tamplin :
> For user code (that which will be compiled by GWT), it only looks for class
> files from the classpath for annotations that it doesn't have the source to.
>  In DevMode, it will also load user classes from the classpath if the
> visible source file is annotated with @GwtScriptOnly.

John,

There's one thing worrisome:

mac-grek:google grek$ pwd
/Users/grek/tmp/gwt-trunk/dev/core/src/com/google
mac-grek:google grek$ find . -name *.java | xargs grep
'get[a-zA-Z]*ClassLoader' | wc -l
  63

I'm not sure if this means anything but I wanted let you know that
there are quite a few places in the code that are asking for a
classloader.

-- 
Grzegorz Kossakowski

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


[gwt-contrib] Re: Partial fix for buganizer issue 4466425. Created a method to shift the expression range indices ... (issue1451801)

2011-05-24 Thread zundel


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

http://gwt-code-reviews.appspot.com/1451801/diff/1005/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java#newcode1050
dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java:1050:
(sourceInfoMaps != null) ?
((JsReportGenerationVisitor)v).getSourceInfoMap() : null;
See what you can do to get rid of this cast.  It works, but is not so
elegant.

You could add a method getSourceInfoMap on
JsSourceGenerationWithSizeBreakdown() that returns null and let
JsReportGenerationVisitor override it.

http://gwt-code-reviews.appspot.com/1451801/diff/1005/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java#newcode1062
dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java:1062:
code = clusterer.getJs();
I am still tending toward adding a general 'runXfomrer' method on
JsSourceGenerationVisitorWithSizeBreakdown()

or what about this:

JsAbstractTextTransformer transformer = new JsAbstractTextTransfomer
(code, statementRanges, infoMap) {
   public void exec() {}
};

if (should_cluster) {
  lastTransfomer = new JsJsFunctionClusterer();
  transformer.exec()
}

if (splitBlocks) {
  transfomer = new JsIeBlockTextTransformer(...);
  transformer.exec()
}


js[i] = transfomer.getJs()
ranges[i] =transfoemr.getStatementRanges()
...

http://gwt-code-reviews.appspot.com/1451801/diff/1005/dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java#newcode1324
dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java:1324:
remove w/s

http://gwt-code-reviews.appspot.com/1451801/diff/1005/dev/core/src/com/google/gwt/dev/jjs/impl/JsAbstractTextTransformer.java
File
dev/core/src/com/google/gwt/dev/jjs/impl/JsAbstractTextTransformer.java
(right):

http://gwt-code-reviews.appspot.com/1451801/diff/1005/dev/core/src/com/google/gwt/dev/jjs/impl/JsAbstractTextTransformer.java#newcode94
dev/core/src/com/google/gwt/dev/jjs/impl/JsAbstractTextTransformer.java:94:
* @param index TODO
no time like the present...

http://gwt-code-reviews.appspot.com/1451801/diff/1005/dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java
File dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java
(right):

http://gwt-code-reviews.appspot.com/1451801/diff/1005/dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java#newcode175
dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java:175:
@Override
can you provide a 1-3 sentence overview of what this method is for.

http://gwt-code-reviews.appspot.com/1451801/

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


[gwt-contrib] Attachable -> IsRenderable step 3: Renaming AttachableHTMLPanel to RenderablePanel. This guys ha... (issue1446810)

2011-05-24 Thread rdcastro

Reviewers: rjrjr, juliog,

Description:
Attachable -> IsRenderable step 3: Renaming AttachableHTMLPanel to
RenderablePanel. This guys has its days counted, as it will eventually
be merged into HTMLPanel.


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

Affected files:
  D  
user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java
  M  
user/src/com/google/gwt/uibinder/elementparsers/IsRenderableInterpreter.java
  A  
user/src/com/google/gwt/uibinder/elementparsers/RenderablePanelParser.java

  M user/src/com/google/gwt/uibinder/rebind/AbstractFieldWriter.java
  M user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
  D user/src/com/google/gwt/user/client/ui/AttachableHTMLPanel.java
  M user/src/com/google/gwt/user/client/ui/RenderableComposite.java
  A user/src/com/google/gwt/user/client/ui/RenderablePanel.java


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


[gwt-contrib] [google-web-toolkit] r10215 committed - Attachable->IsRenderable step 2: Renaming AttachableComposite to Rende...

2011-05-24 Thread codesite-noreply

Revision: 10215
Author:   rdcas...@google.com
Date: Tue May 24 09:02:46 2011
Log:  Attachable->IsRenderable step 2: Renaming AttachableComposite to  
RenderableComposite.


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

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

Added:
 /trunk/user/src/com/google/gwt/user/client/ui/RenderableComposite.java
Deleted:
 /trunk/user/src/com/google/gwt/user/client/ui/AttachableComposite.java

===
--- /dev/null
+++ /trunk/user/src/com/google/gwt/user/client/ui/RenderableComposite.java	 
Tue May 24 09:02:46 2011

@@ -0,0 +1,226 @@
+/*
+ * Copyright 2011 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of

+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
WITHOUT

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under

+ * the License.
+ */
+package com.google.gwt.user.client.ui;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.dom.client.Element;
+import com.google.gwt.event.logical.shared.AttachEvent;
+import com.google.gwt.safehtml.client.SafeHtmlTemplates;
+import com.google.gwt.safehtml.shared.SafeHtml;
+import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
+import com.google.gwt.user.client.DOM;
+import com.google.gwt.user.client.Event;
+
+/**
+ * EXPERIMENTAL and subject to change. Do not use this in production code.
+ * 
+ * A version of {@link Composite} that supports wrapping {@link Renderable}
+ * widgets. This functionality will eventually be merged into {@link  
Composite}

+ * itself, but is still under active development.
+ * The only reason why this isn't a subclass of {@link Composite} is to  
avoid

+ * messing up it's API, since {@link Composite} is very often subclassed.
+ *
+ * TODO(rdcastro): Rename this RenderableComposite.
+ */
+public abstract class RenderableComposite extends Widget implements  
IsRenderable {

+
+  interface HTMLTemplates extends SafeHtmlTemplates {
+@Template("")
+ SafeHtml renderWithId(String id);
+  }
+  private static final HTMLTemplates TEMPLATE =
+  GWT.create(HTMLTemplates.class);
+
+  private Widget widget;
+
+  private IsRenderable attachable;
+
+  private Element elementToWrap;
+
+  private boolean initFinished = false;
+
+  @Override
+  public com.google.gwt.user.client.Element getElement() {
+if (!initFinished) {
+  // if we're trying to get the element but we haven't finished the
+  // initialization, do it now.
+  initWidgetInternal();
+}
+return super.getElement();
+  }
+
+  @Override
+  public boolean isAttached() {
+if (widget != null) {
+  return widget.isAttached();
+}
+return false;
+  }
+
+  @Override
+  public void onBrowserEvent(Event event) {
+// Fire any handler added to the composite itself.
+super.onBrowserEvent(event);
+
+// Delegate events to the widget.
+widget.onBrowserEvent(event);
+  }
+
+  @Override
+  public void performDetachedInitialization() {
+if (attachable != null) {
+  assert (initFinished == false);
+  attachable.performDetachedInitialization();
+  initWidgetInternal();
+} else {
+  elementToWrap.getParentNode().replaceChild(widget.getElement(),  
elementToWrap);

+}
+  }
+
+  @Override
+  public SafeHtml render(String id) {
+if (attachable != null) {
+  return attachable.render(id);
+} else {
+  SafeHtmlBuilder builder = new SafeHtmlBuilder();
+  render(id, builder);
+  return builder.toSafeHtml();
+}
+  }
+
+  @Override
+  public void render(String id, SafeHtmlBuilder builder) {
+if (attachable != null) {
+  attachable.render(id, builder);
+} else {
+  builder.append(TEMPLATE.renderWithId(id));
+}
+  }
+
+  @Override
+  public void setStyleName(String styleName) {
+if (this.widget == null) {
+  throw new IllegalStateException("setStyleName called before  
initWidget.");

+}
+widget.setStyleName(styleName);
+  }
+
+  @Override
+  public void wrapElement(Element element) {
+if (attachable != null) {
+  assert (initFinished == false);
+  attachable.wrapElement(element);
+} else {
+  this.elementToWrap = element;
+}
+  }
+
+  /**
+   * Provides subclasses access to the topmost widget that defines this
+   * composite.
+   *
+   * @return the widget
+   */
+  protected Widget getWidget() {
+return widget;
+  }
+
+  /**
+   * Sets the widget to be wrapped by the composite. The wrapped widget  
must be
+   * set before calling any {@link Widget} methods on this object, or  
adding it

+   * to a panel. This method may only be ca

[gwt-contrib] Re: Partial fix for buganizer issue 4466425. Created a method to shift the expression range indices ... (issue1451801)

2011-05-24 Thread dconnelly

http://gwt-code-reviews.appspot.com/1451801/

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


[gwt-contrib] Re: Adds a ui:safehtml tag to UiBinder (issue1422812)

2011-05-24 Thread sbrubaker

Also fixed merge after SafeHtmlRenderer rollback.  Submitting...


http://gwt-code-reviews.appspot.com/1422812/diff/11009/user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java
File
user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java
(right):

http://gwt-code-reviews.appspot.com/1422812/diff/11009/user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java#newcode48
user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java:48:
private Delegate delegate;
On 2011/05/24 16:14:34, rjrjr wrote:

final


Done.

http://gwt-code-reviews.appspot.com/1422812/diff/11009/user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java
File
user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java
(right):

http://gwt-code-reviews.appspot.com/1422812/diff/11009/user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java#newcode72
user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java:72:
static final String BINDER_URI = "binderUi";
On 2011/05/24 16:14:34, rjrjr wrote:

Uri


Done.

http://gwt-code-reviews.appspot.com/1422812/

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


[gwt-contrib] Re: Adds a ui:safehtml tag to UiBinder (issue1422812)

2011-05-24 Thread sbrubaker

http://gwt-code-reviews.appspot.com/1422812/

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


[gwt-contrib] Re: Partial fix for buganizer issue 4466425. Created a method to shift the expression range indices ... (issue1451801)

2011-05-24 Thread dconnelly

http://gwt-code-reviews.appspot.com/1451801/

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


[gwt-contrib] Re: 1. Assert, at runtime, that GWT is running in Standards Mode (i.e. with an appropriate DOCTYPE d... (issue1422816)

2011-05-24 Thread dmenounos

Thanks!

http://gwt-code-reviews.appspot.com/1422816/

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


[gwt-contrib] Implemented expression range shifting for IE block size transformation. Moved expression range s... (issue1446809)

2011-05-24 Thread dconnelly

Reviewers: zundel,

Description:
Implemented expression range shifting for IE block size transformation.
Moved expression range shifting for both transformations inside the
transformation classes. Modified constructors/instance variables for the
JsAbstractTextTransformer to support updating the expression ranges in
the SourceInfo map. Review at
\http://gwt-code-reviews.appspot.com/1451801


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

Affected files:
  M dev/core/src/com/google/gwt/dev/jjs/JavaToJavaScriptCompiler.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/JsAbstractTextTransformer.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/JsFunctionClusterer.java
  M dev/core/src/com/google/gwt/dev/jjs/impl/JsIEBlockTextTransformer.java


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


[gwt-contrib] Re: Public (steph...@gmail.com): (issue1450802)

2011-05-24 Thread Ray Ryan
r10214

On Tue, May 24, 2011 at 6:04 AM,  wrote:

> LGTM
>
>
> http://gwt-code-reviews.appspot.com/1450802/
>

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

[gwt-contrib] Re: Detaching the table section in CellTable before setting the innerHTML to replace the rows. This ... (issue1443805)

2011-05-24 Thread jlabanca


http://gwt-code-reviews.appspot.com/1443805/diff/1/user/src/com/google/gwt/user/cellview/client/CellTable.java
File user/src/com/google/gwt/user/cellview/client/CellTable.java
(right):

http://gwt-code-reviews.appspot.com/1443805/diff/1/user/src/com/google/gwt/user/cellview/client/CellTable.java#newcode431
user/src/com/google/gwt/user/cellview/client/CellTable.java:431: Element
nextSection = section.getNextSiblingElement();
Yes, but if the next sibling is null, then insertBefore will append.
I'll add a comment to explain that.

http://gwt-code-reviews.appspot.com/1443805/

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


[gwt-contrib] Re: Detaching the table section in CellTable before setting the innerHTML to replace the rows. This ... (issue1443805)

2011-05-24 Thread rchandia

LGTM. With a question.


http://gwt-code-reviews.appspot.com/1443805/diff/1/user/src/com/google/gwt/user/cellview/client/CellTable.java
File user/src/com/google/gwt/user/cellview/client/CellTable.java
(right):

http://gwt-code-reviews.appspot.com/1443805/diff/1/user/src/com/google/gwt/user/cellview/client/CellTable.java#newcode431
user/src/com/google/gwt/user/cellview/client/CellTable.java:431: Element
nextSection = section.getNextSiblingElement();
Is a situation where there is not next sibiling possible?

http://gwt-code-reviews.appspot.com/1443805/

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


[gwt-contrib] [google-web-toolkit] r10214 committed - Public (steph...@gmail.com):...

2011-05-24 Thread codesite-noreply

Revision: 10214
Author:   rj...@google.com
Date: Tue May 24 11:10:36 2011
Log:  Public (steph...@gmail.com):

Adds two protected static methods to EventBus that expose otherwise
inaccessible methods on Event (setSource and dispatch) to subclasses
of EventBus. Allows alternative EventBus implementations without
muddying the public API events show to handlers.

Tweaks the original patch (1443804) by making SimpleEventBus use the
new methods, and updating javadoc and a method name.

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

Review by: jlaba...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=10214

Modified:
 /trunk/user/src/com/google/web/bindery/event/shared/Event.java
 /trunk/user/src/com/google/web/bindery/event/shared/EventBus.java
 /trunk/user/src/com/google/web/bindery/event/shared/SimpleEventBus.java

===
--- /trunk/user/src/com/google/web/bindery/event/shared/Event.java	Mon Apr  
18 16:25:25 2011
+++ /trunk/user/src/com/google/web/bindery/event/shared/Event.java	Tue May  
24 11:10:36 2011

@@ -106,9 +106,10 @@
   /**
* Implemented by subclasses to to invoke their handlers in a type safe
* manner. Intended to be called by {@link EventBus#fireEvent(Event)} or
-   * {@link EventBus#fireEventFromSource(Event, Object)}.
+   * {@link EventBus#fireEventFromSource(Event, Object)}.
*
* @param handler handler
+   * @see EventBus#dispatchEvent(Event, Object)
*/
   protected abstract void dispatch(H handler);

@@ -118,6 +119,7 @@
*
* @param source the source of this event.
* @see EventBus#fireEventFromSource(Event, Object)
+   * @see EventBus#setSourceOfEvent(Event, Object)
*/
   protected void setSource(Object source) {
 this.source = source;
===
--- /trunk/user/src/com/google/web/bindery/event/shared/EventBus.java	Mon  
Apr 18 16:25:25 2011
+++ /trunk/user/src/com/google/web/bindery/event/shared/EventBus.java	Tue  
May 24 11:10:36 2011

@@ -29,6 +29,26 @@
  * @see com.google.web.bindery.event.shared.testing.CountingEventBus
  */
 public abstract class EventBus {
+
+  /**
+   * Invokes {@code event.dispatch} with {@code handler}.
+   * 
+   * Protected to allow EventBus implementations in different packages to
+   * dispatch events even though the {@code event.dispatch} method is  
protected.

+   */
+  protected static  void dispatchEvent(Event event, H handler) {
+event.dispatch(handler);
+  }
+
+  /**
+   * Sets {@code source} as the source of {@code event}.
+   * 
+   * Protected to allow EventBus implementations in different packages to  
set an
+   * event source even though the {@code event.setSource} method is  
protected.

+   */
+  protected static void setSourceOfEvent(Event event, Object source) {
+event.setSource(source);
+  }

   /**
* Adds an unfiltered handler to receive events of this type from all  
sources.

@@ -70,7 +90,7 @@
* from executing.
*
* @throws UmbrellaException wrapping exceptions thrown by handlers
-   *
+   *
* @param event the event to fire
*/
   public abstract void fireEvent(Event event);
===
--- /trunk/user/src/com/google/web/bindery/event/shared/SimpleEventBus.java	 
Mon Apr 18 16:25:25 2011
+++ /trunk/user/src/com/google/web/bindery/event/shared/SimpleEventBus.java	 
Tue May 24 11:10:36 2011

@@ -178,7 +178,7 @@
   firingDepth++;

   if (source != null) {
-event.setSource(source);
+setSourceOfEvent(event, source);
   }

   List handlers = getDispatchList(event.getAssociatedType(),  
source);

@@ -190,7 +190,7 @@
 H handler = isReverseOrder ? it.previous() : it.next();

 try {
-  event.dispatch(handler);
+  dispatchEvent(event, handler);
 } catch (Throwable e) {
   if (causes == null) {
 causes = new HashSet();

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


[gwt-contrib] Re: Rollback Issue 1442804. Causes build breakage. (issue1447808)

2011-05-24 Thread rchandia

Submitted as r10213

On 2011/05/24 16:09:55, rdcastro wrote:

LGTM



On May 24, 2011 12:46 PM,


wrote:

> Reviewers: rjrjr, rdcastro,
>
> Description:
> Rollback Issue 1442804. Causes build breakage.
>
>
> Please review this at http://gwt-code-reviews.appspot.com/1447808/
>
> Affected files:
> M user/src/com/google/gwt/uibinder/UiBinder.gwt.xml
> M
>


user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java

> M

user/src/com/google/gwt/uibinder/elementparsers/CustomButtonParser.java

> M

user/src/com/google/gwt/uibinder/elementparsers/DialogBoxParser.java

> M

user/src/com/google/gwt/uibinder/elementparsers/DomElementParser.java

> M user/src/com/google/gwt/uibinder/elementparsers/GridParser.java
> M

user/src/com/google/gwt/uibinder/elementparsers/HTMLPanelParser.java

> M user/src/com/google/gwt/uibinder/elementparsers/HasHTMLParser.java
> M
>


user/src/com/google/gwt/uibinder/elementparsers/StackLayoutPanelParser.java

> M
>

user/src/com/google/gwt/uibinder/elementparsers/TabLayoutPanelParser.java

> M

user/src/com/google/gwt/uibinder/elementparsers/TabPanelParser.java

> M user/src/com/google/gwt/uibinder/rebind/AbstractFieldWriter.java
> M user/src/com/google/gwt/uibinder/rebind/FieldWriter.java
> M user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
> M user/src/com/google/gwt/uibinder/rebind/model/HtmlTemplate.java
> M
>

user/test/com/google/gwt/uibinder/elementparsers/DialogBoxParserTest.java

> M

user/test/com/google/gwt/uibinder/elementparsers/GridParserTest.java

> M

user/test/com/google/gwt/uibinder/elementparsers/MockUiBinderWriter.java

> M
>


user/test/com/google/gwt/uibinder/elementparsers/StackLayoutPanelParserTest.java

> M
>


user/test/com/google/gwt/uibinder/elementparsers/TabLayoutPanelParserTest.java

> M

user/test/com/google/gwt/uibinder/elementparsers/TabPanelParserTest.java

> M user/test/com/google/gwt/uibinder/test/client/Constants.java
> D

user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.css

> D

user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.java

> D

user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.ui.xml

> M user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
> M user/test/com/google/gwt/uibinder/test/client/UiBinderTestApp.java
>
>




http://gwt-code-reviews.appspot.com/1447808/

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


[gwt-contrib] Re: SafeHtmlRenderer code gen for UiBinder. Picking up issue 1426803 (issue1442804)

2011-05-24 Thread rchandia

Rolled back at r10213

On 2011/05/24 15:31:52, rchandia wrote:

Submitted as of r10210



On 2011/05/23 20:00:39, rjrjr wrote:
> LGTM
>
> Woot!
>
>


http://gwt-code-reviews.appspot.com/1442804/diff/10001/user/test/com/google/gwt/uibinder/elementparsers/DialogBoxParserTest.java

> File

user/test/com/google/gwt/uibinder/elementparsers/DialogBoxParserTest.java

> (right):
>
>


http://gwt-code-reviews.appspot.com/1442804/diff/10001/user/test/com/google/gwt/uibinder/elementparsers/DialogBoxParserTest.java#newcode80

>

user/test/com/google/gwt/uibinder/elementparsers/DialogBoxParserTest.java:80:

> "fieldName.setHTML(\"@mockToken-fieldName-Hello, I

captionyou.\");",

> Absolutely, and sorry for the mess.
>
> On 2011/05/23 19:52:21, rchandia wrote:
> > On 2011/05/23 18:25:23, rjrjr wrote:
> > > is the "fieldName" string coming from a constant in

ElementParserTester or

> > > something? If so, can you open up its visibility and use it in

these

tests,
> > > rather having it inlined all over the place?
> >
> > Done for the lines changed in this Issue.
> >
> > The string comes from ElementParserTester#FIELD_NAME. It is

hard-coded all

> over
> > the place, though (at least 45/278 tests in UiBinderJreSuite).
> >
> > May I finish surfacing it in a separate Issue?




http://gwt-code-reviews.appspot.com/1442804/

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


[gwt-contrib] Detaching the table section in CellTable before setting the innerHTML to replace the rows. This ... (issue1443805)

2011-05-24 Thread jlabanca

Reviewers: rchandia,

Description:
Detaching the table section in CellTable before setting the innerHTML to
replace the rows. This is a well known performance enhancement that
CellTable isn't taking advantage of.


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

Affected files:
  M user/src/com/google/gwt/user/cellview/client/CellTable.java


Index: user/src/com/google/gwt/user/cellview/client/CellTable.java
===
--- user/src/com/google/gwt/user/cellview/client/CellTable.java	(revision  
10206)
+++ user/src/com/google/gwt/user/cellview/client/CellTable.java	(working  
copy)

@@ -116,6 +116,7 @@
 /**
  * The styles used in this widget.
  */
+@Override
 @Source(BasicStyle.DEFAULT_CSS)
 BasicStyle cellTableStyle();
   }
@@ -425,8 +426,16 @@
 DOM.setEventListener(table.getElement(), table);
   }

+  // Remove the section from the tbody.
+  Element parent = section.getParentElement();
+  Element nextSection = section.getNextSiblingElement();
+  section.removeFromParent();
+
   // Render the html.
   section.setInnerHTML(html.asString());
+
+  // Reattach the section.
+  parent.insertBefore(section, nextSection);

   // Detach the event listener.
   if (!table.isAttached()) {
@@ -644,6 +653,7 @@

 // Create the ColumnSortList and delegate.
 sortList = new ColumnSortList(new ColumnSortList.Delegate() {
+  @Override
   public void onModification() {
 if (!updatingSortList) {
   createHeaders(false);
@@ -1601,6 +1611,7 @@
   TableCellElement td = tr.getCells().getItem(keyboardSelectedColumn);
   final com.google.gwt.user.client.Element cellParent =  
getCellParent(td).cast();
   CellBasedWidgetImpl.get().resetFocus(new  
Scheduler.ScheduledCommand() {

+@Override
 public void execute() {
   cellParent.focus();
 }
@@ -1871,6 +1882,7 @@
   cellIsEditing = cell.isEditing(context, parentElem, cellValue);
   if (cellWasEditing && !cellIsEditing) {
 CellBasedWidgetImpl.get().resetFocus(new  
Scheduler.ScheduledCommand() {

+  @Override
   public void execute() {
 setFocus(true);
   }


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


[gwt-contrib] Re: Autoformats user/super and user/test-super (issue1442805)

2011-05-24 Thread Scott Blum
I'm not sure what all that means, but shouldn't GPE be able to just turn the
code formatter on automatically?

On Tue, May 24, 2011 at 1:00 PM, Eric Ayers  wrote:

> Alex added a new eclipse application to GPE.  If you've got his latest
> and greatest (not sure if its public yet)
>
>  eclipse -nosplash -application
> com.google.gwt.eclipse.core.GWTCodeFormatterApplication  formatting opts>[ list of files and/or dirs ]
>
>
> On Tue, May 24, 2011 at 12:55 PM,   wrote:
> > Whoa, do you really have autoformatting JSNI working?  If so, that is
> > totally awesome!
> >
> > http://gwt-code-reviews.appspot.com/1442805/
> >
>
>
>
> --
> Eric Z. Ayers
> Google Web Toolkit, Atlanta, GA USA
>

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

[gwt-contrib] [google-web-toolkit] r10213 committed - Rollback Issue 1442804. Causes build breakage....

2011-05-24 Thread codesite-noreply

Revision: 10213
Author:   rchan...@google.com
Date: Tue May 24 07:34:42 2011
Log:  Rollback Issue 1442804. Causes build breakage.

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

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

Deleted:
 /trunk/user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.css
  
/trunk/user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.java
  
/trunk/user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.ui.xml

Modified:
 /trunk/user/src/com/google/gwt/uibinder/UiBinder.gwt.xml
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/CustomButtonParser.java

 /trunk/user/src/com/google/gwt/uibinder/elementparsers/DialogBoxParser.java
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/DomElementParser.java

 /trunk/user/src/com/google/gwt/uibinder/elementparsers/GridParser.java
 /trunk/user/src/com/google/gwt/uibinder/elementparsers/HTMLPanelParser.java
 /trunk/user/src/com/google/gwt/uibinder/elementparsers/HasHTMLParser.java
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/StackLayoutPanelParser.java
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/TabLayoutPanelParser.java

 /trunk/user/src/com/google/gwt/uibinder/elementparsers/TabPanelParser.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/AbstractFieldWriter.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/FieldWriter.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/model/HtmlTemplate.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/DialogBoxParserTest.java

 /trunk/user/test/com/google/gwt/uibinder/elementparsers/GridParserTest.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/MockUiBinderWriter.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/StackLayoutPanelParserTest.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/TabLayoutPanelParserTest.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/TabPanelParserTest.java

 /trunk/user/test/com/google/gwt/uibinder/test/client/Constants.java
 /trunk/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
 /trunk/user/test/com/google/gwt/uibinder/test/client/UiBinderTestApp.java

===
---  
/trunk/user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.css	 
Tue May 24 04:45:28 2011

+++ /dev/null
@@ -1,8 +0,0 @@
-.bodyColor {
-  color: indigo;
-}
-
-.bodyFont {
-  font-family: Helvetica, Arial, sans-serif;
-  font-size: small;
-}
===
---  
/trunk/user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.java	 
Tue May 24 04:45:28 2011

+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright 2008 Google Inc.
- *
- * Licensed under the Apache License, Version 2.0 (the "License"); you may  
not
- * use this file except in compliance with the License. You may obtain a  
copy of

- * the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,  
WITHOUT

- * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
- * License for the specific language governing permissions and limitations  
under

- * the License.
- */
-package com.google.gwt.uibinder.test.client;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.resources.client.ClientBundle;
-import com.google.gwt.resources.client.CssResource;
-import com.google.gwt.safehtml.shared.SafeHtml;
-import com.google.gwt.text.shared.SafeHtmlRenderer;
-
-/**
- * Sample use of a {@code SafeHtmlRenderer} with no dependency on
- * com.google.gwt.user.
- */
-public class SafeHtmlRendererUi {
-  /**
-   * Resources for this template.
-   */
-  public interface Resources extends ClientBundle {
-@Source("SafeHtmlRendererUi.css")
-Style style();
-  }
-
-  /**
-   * CSS for this template.
-   */
-  public interface Style extends CssResource {
-String bodyColor();
-String bodyFont();
-  }
-
-  interface HtmlRenderer extends SafeHtmlRenderer { }
-  private static final HtmlRenderer renderer =  
GWT.create(HtmlRenderer.class);

-
-  public SafeHtmlRendererUi() {
-  }
-
-  public SafeHtml render() {
-return renderer.render(null);
-  }
-}
===
---  
/trunk/user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.ui.xml	 
Tue May 24 04:45:28 2011

+++ /dev/null
@@ -1,47 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-

--   
xmlns:res='urn:with:com.google.gwt.uibinder.test.client.DomBasedUi.Resources'

-  >
-  type="com.google.gwt.uibinder.test.client.Constants"/>

-  
-
-
-Hello, .
-How goes it?
-  Placeholders in  
localizables
-  When you mark up your text for translation, there will be  

[gwt-contrib] Re: RequestFactoryServlet

2011-05-24 Thread Andrés Testi
Since ServiceLayerCache enforces service instances to be singleton,
the threadlocal instance will be the same between requests.
I reported this issue: 
http://code.google.com/p/google-web-toolkit/issues/detail?id=6355

- Andrés

On 24 mayo, 14:15, Ray Ryan  wrote:
> The blog post would be great. We'll plunder from it freely for our own
> samples and docs.
>
> One note: lately we've been using Objectify rather than JDO for appengine
> apps. It's pretty pleasant.
>
>
>
>
>
>
>
> On Tue, May 24, 2011 at 7:31 AM, Etienne P.  wrote:
> > I've gone through the same effort to get this working using Google
> > Guice based on some pointers provided by Thomas Broyer in another
> > discussion. It works quite well and could be reused easily across
> > applications. I've even done some integration with the JDO API to get
> > this working in GAE (not without a good amount of trial and error).
> > I'll be posting detailed instructions on my blog and committing some
> > code to github that people can reuse easily.  Unless there is a better
> > place for it in which case I'd be glad to contribute the code there as
> > well.
>
> > Suggestions?
>
> > On May 23, 10:14 pm, Jeff Larsen  wrote:
> > > Oh and I did test this to make sure it would with Spring. If you're
> > > interested here is a link to my test project.
>
> > >https://github.com/larsenje/SpringRequestFactoryExample
>
> > --
> >http://groups.google.com/group/Google-Web-Toolkit-Contributors

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


[gwt-contrib] Re: Attachable->IsRenderable step 2: Renaming AttachableComposite to RenderableComposite. (issue1450804)

2011-05-24 Thread rjrjr

LGTM

http://gwt-code-reviews.appspot.com/1450804/

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


Re: [gwt-contrib] Re: RequestFactoryServlet

2011-05-24 Thread Ray Ryan
The blog post would be great. We'll plunder from it freely for our own
samples and docs.

One note: lately we've been using Objectify rather than JDO for appengine
apps. It's pretty pleasant.

On Tue, May 24, 2011 at 7:31 AM, Etienne P.  wrote:

> I've gone through the same effort to get this working using Google
> Guice based on some pointers provided by Thomas Broyer in another
> discussion. It works quite well and could be reused easily across
> applications. I've even done some integration with the JDO API to get
> this working in GAE (not without a good amount of trial and error).
> I'll be posting detailed instructions on my blog and committing some
> code to github that people can reuse easily.  Unless there is a better
> place for it in which case I'd be glad to contribute the code there as
> well.
>
> Suggestions?
>
> On May 23, 10:14 pm, Jeff Larsen  wrote:
> > Oh and I did test this to make sure it would with Spring. If you're
> > interested here is a link to my test project.
> >
> > https://github.com/larsenje/SpringRequestFactoryExample
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>

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

[gwt-contrib] Re: Autoformats user/super and user/test-super (issue1442805)

2011-05-24 Thread Eric Ayers
Alex added a new eclipse application to GPE.  If you've got his latest
and greatest (not sure if its public yet)

  eclipse -nosplash -application
com.google.gwt.eclipse.core.GWTCodeFormatterApplication [ list of files and/or dirs ]


On Tue, May 24, 2011 at 12:55 PM,   wrote:
> Whoa, do you really have autoformatting JSNI working?  If so, that is
> totally awesome!
>
> http://gwt-code-reviews.appspot.com/1442805/
>



-- 
Eric Z. Ayers
Google Web Toolkit, Atlanta, GA USA

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


[gwt-contrib] Re: RequestFactoryServlet

2011-05-24 Thread Etienne P.
I've gone through the same effort to get this working using Google
Guice based on some pointers provided by Thomas Broyer in another
discussion. It works quite well and could be reused easily across
applications. I've even done some integration with the JDO API to get
this working in GAE (not without a good amount of trial and error).
I'll be posting detailed instructions on my blog and committing some
code to github that people can reuse easily.  Unless there is a better
place for it in which case I'd be glad to contribute the code there as
well.

Suggestions?

On May 23, 10:14 pm, Jeff Larsen  wrote:
> Oh and I did test this to make sure it would with Spring. If you're
> interested here is a link to my test project.
>
> https://github.com/larsenje/SpringRequestFactoryExample

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


[gwt-contrib] Re: Autoformats user/super and user/test-super (issue1442805)

2011-05-24 Thread scottb

Whoa, do you really have autoformatting JSNI working?  If so, that is
totally awesome!

http://gwt-code-reviews.appspot.com/1442805/

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


[gwt-contrib] Re: Add BatchedRequestScope utility class to aggregate all requests made within a single tick of the... (issue1449804)

2011-05-24 Thread rjrjr

Sweet.


http://gwt-code-reviews.appspot.com/1449804/diff/1/user/src/com/google/web/bindery/requestfactory/gwt/client/BatchedRequestScope.java
File
user/src/com/google/web/bindery/requestfactory/gwt/client/BatchedRequestScope.java
(right):

http://gwt-code-reviews.appspot.com/1449804/diff/1/user/src/com/google/web/bindery/requestfactory/gwt/client/BatchedRequestScope.java#newcode35
user/src/com/google/web/bindery/requestfactory/gwt/client/BatchedRequestScope.java:35:
* public class MyBatchedRequestScope extends
BatchedRequestScope {
Scope has a specific meaning to Gin users, would be good to avoid the
term here. s/BatchedRequestScope/RequestBatch/?

http://gwt-code-reviews.appspot.com/1449804/diff/1/user/src/com/google/web/bindery/requestfactory/gwt/client/BatchedRequestScope.java#newcode52
user/src/com/google/web/bindery/requestfactory/gwt/client/BatchedRequestScope.java:52:
* Request.to(Receiver)} as shown:
Fragile. Could put a guard on fire that makes it a synonym for to? The
finally call could raise the guard and make the real fire call.

http://gwt-code-reviews.appspot.com/1449804/diff/1/user/src/com/google/web/bindery/requestfactory/shared/FanoutReceiver.java
File
user/src/com/google/web/bindery/requestfactory/shared/FanoutReceiver.java
(right):

http://gwt-code-reviews.appspot.com/1449804/diff/1/user/src/com/google/web/bindery/requestfactory/shared/FanoutReceiver.java#newcode34
user/src/com/google/web/bindery/requestfactory/shared/FanoutReceiver.java:34:
public class FanoutReceiver extends Receiver {
be easy to unit test this

http://gwt-code-reviews.appspot.com/1449804/

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


[gwt-contrib] Attachable->IsRenderable step 2: Renaming AttachableComposite to RenderableComposite. (issue1450804)

2011-05-24 Thread rdcastro

Reviewers: rjrjr, juliog,

Description:
Attachable->IsRenderable step 2: Renaming AttachableComposite to
RenderableComposite.


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

Affected files:
  D user/src/com/google/gwt/user/client/ui/AttachableComposite.java
  A user/src/com/google/gwt/user/client/ui/RenderableComposite.java


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


Re: [gwt-contrib] gwtc classpath

2011-05-24 Thread Grzegorz Kossakowski
2011/5/24 Eric Ayers :
> If you are in the guts of the compiler and want to populate the type oracle
> form byte code, you can build a list of TypeOracleMediator.TypeData objects
> from any bytecode you like (doesn't have to be on classpath).  This won't
> feed into the building of the AST - that has to build from source.

Thanks Eric and John for your reply. This solves only one problem -
populating TypeOracle with data that is not coming from JDT.

Other problem is with running JDT. How can I add specific classes to
JDT's classpath and make it not inherit classpath of gwtc in order to
avoid two different versions of the same .class files?

-- 
Grzegorz Kossakowski

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


[gwt-contrib] Re: Autoformats user/super and user/test-super (issue1442805)

2011-05-24 Thread rjrjr

LGTM

Thanks, Eric!

http://gwt-code-reviews.appspot.com/1442805/

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


[gwt-contrib] Re: Adds a ui:safehtml tag to UiBinder (issue1422812)

2011-05-24 Thread rjrjr

LGTM!

Woo hoo! Just a couple of typos, yay!


http://gwt-code-reviews.appspot.com/1422812/diff/11009/user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java
File
user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java
(right):

http://gwt-code-reviews.appspot.com/1422812/diff/11009/user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java#newcode48
user/src/com/google/gwt/uibinder/elementparsers/ComputedAttributeInterpreter.java:48:
private Delegate delegate;
final

http://gwt-code-reviews.appspot.com/1422812/diff/11009/user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java
File
user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java
(right):

http://gwt-code-reviews.appspot.com/1422812/diff/11009/user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java#newcode72
user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java:72:
static final String BINDER_URI = "binderUi";
Uri

http://gwt-code-reviews.appspot.com/1422812/

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


[gwt-contrib] Re: Rollback Issue 1442804. Causes build breakage. (issue1447808)

2011-05-24 Thread Rafael Castro
LGTM

On May 24, 2011 12:46 PM,  wrote:
> Reviewers: rjrjr, rdcastro,
>
> Description:
> Rollback Issue 1442804. Causes build breakage.
>
>
> Please review this at http://gwt-code-reviews.appspot.com/1447808/
>
> Affected files:
> M user/src/com/google/gwt/uibinder/UiBinder.gwt.xml
> M
>
user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java
> M user/src/com/google/gwt/uibinder/elementparsers/CustomButtonParser.java
> M user/src/com/google/gwt/uibinder/elementparsers/DialogBoxParser.java
> M user/src/com/google/gwt/uibinder/elementparsers/DomElementParser.java
> M user/src/com/google/gwt/uibinder/elementparsers/GridParser.java
> M user/src/com/google/gwt/uibinder/elementparsers/HTMLPanelParser.java
> M user/src/com/google/gwt/uibinder/elementparsers/HasHTMLParser.java
> M
>
user/src/com/google/gwt/uibinder/elementparsers/StackLayoutPanelParser.java
> M
> user/src/com/google/gwt/uibinder/elementparsers/TabLayoutPanelParser.java
> M user/src/com/google/gwt/uibinder/elementparsers/TabPanelParser.java
> M user/src/com/google/gwt/uibinder/rebind/AbstractFieldWriter.java
> M user/src/com/google/gwt/uibinder/rebind/FieldWriter.java
> M user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
> M user/src/com/google/gwt/uibinder/rebind/model/HtmlTemplate.java
> M
> user/test/com/google/gwt/uibinder/elementparsers/DialogBoxParserTest.java
> M user/test/com/google/gwt/uibinder/elementparsers/GridParserTest.java
> M user/test/com/google/gwt/uibinder/elementparsers/MockUiBinderWriter.java
> M
>
user/test/com/google/gwt/uibinder/elementparsers/StackLayoutPanelParserTest.java
> M
>
user/test/com/google/gwt/uibinder/elementparsers/TabLayoutPanelParserTest.java
> M user/test/com/google/gwt/uibinder/elementparsers/TabPanelParserTest.java
> M user/test/com/google/gwt/uibinder/test/client/Constants.java
> D user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.css
> D user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.java
> D user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.ui.xml
> M user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
> M user/test/com/google/gwt/uibinder/test/client/UiBinderTestApp.java
>
>

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

[gwt-contrib] Re: Autoformats user/super and user/test-super (issue1442805)

2011-05-24 Thread zundel

So, other then the space before an auto decl of a for loop index, I
think this seems pretty reasonable:

for (var i = 0; i < 10 ; ++i) { }

turns into

for ( var i = 0; i < 10 ; ++i) { }

I can live with it...

http://gwt-code-reviews.appspot.com/1442805/

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


[gwt-contrib] Re: Autoformats user/super and user/test-super (issue1442805)

2011-05-24 Thread zundel

http://gwt-code-reviews.appspot.com/1442805/

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


[gwt-contrib] Re: Adds a ui:safehtml tag to UiBinder (issue1422812)

2011-05-24 Thread sbrubaker

Also, merged with Rodrigo's patch and updated the function naming in
Constants.java to disambiguate the testing for SafeHtmlRenderer and this
change.


http://gwt-code-reviews.appspot.com/1422812/diff/7001/user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java
File
user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java
(right):

http://gwt-code-reviews.appspot.com/1422812/diff/7001/user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java#newcode72
user/test/com/google/gwt/uibinder/elementparsers/ElementParserTester.java:72:
static final String BINDER_URI = "urn:ui:com.google.gwt.uibinder";
On 2011/05/23 19:43:32, rjrjr wrote:

Change the value back to "binderUi." Tests that need to verify the uri

can refer

to this constant, make it public if need be.


Done; I was expecting the hardcoded BINDER_URI in UiBinderGenerator to
still cause an issue, but it doesn't.

http://gwt-code-reviews.appspot.com/1422812/

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


[gwt-contrib] Re: Adds a ui:safehtml tag to UiBinder (issue1422812)

2011-05-24 Thread sbrubaker

http://gwt-code-reviews.appspot.com/1422812/

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


[gwt-contrib] Rollback Issue 1442804. Causes build breakage. (issue1447808)

2011-05-24 Thread rchandia

Reviewers: rjrjr, rdcastro,

Description:
Rollback Issue 1442804. Causes build breakage.


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

Affected files:
  M user/src/com/google/gwt/uibinder/UiBinder.gwt.xml
  M  
user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java

  M user/src/com/google/gwt/uibinder/elementparsers/CustomButtonParser.java
  M user/src/com/google/gwt/uibinder/elementparsers/DialogBoxParser.java
  M user/src/com/google/gwt/uibinder/elementparsers/DomElementParser.java
  M user/src/com/google/gwt/uibinder/elementparsers/GridParser.java
  M user/src/com/google/gwt/uibinder/elementparsers/HTMLPanelParser.java
  M user/src/com/google/gwt/uibinder/elementparsers/HasHTMLParser.java
  M  
user/src/com/google/gwt/uibinder/elementparsers/StackLayoutPanelParser.java
  M  
user/src/com/google/gwt/uibinder/elementparsers/TabLayoutPanelParser.java

  M user/src/com/google/gwt/uibinder/elementparsers/TabPanelParser.java
  M user/src/com/google/gwt/uibinder/rebind/AbstractFieldWriter.java
  M user/src/com/google/gwt/uibinder/rebind/FieldWriter.java
  M user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
  M user/src/com/google/gwt/uibinder/rebind/model/HtmlTemplate.java
  M  
user/test/com/google/gwt/uibinder/elementparsers/DialogBoxParserTest.java

  M user/test/com/google/gwt/uibinder/elementparsers/GridParserTest.java
  M user/test/com/google/gwt/uibinder/elementparsers/MockUiBinderWriter.java
  M  
user/test/com/google/gwt/uibinder/elementparsers/StackLayoutPanelParserTest.java
  M  
user/test/com/google/gwt/uibinder/elementparsers/TabLayoutPanelParserTest.java

  M user/test/com/google/gwt/uibinder/elementparsers/TabPanelParserTest.java
  M user/test/com/google/gwt/uibinder/test/client/Constants.java
  D user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.css
  D user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.java
  D user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.ui.xml
  M user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
  M user/test/com/google/gwt/uibinder/test/client/UiBinderTestApp.java


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


[gwt-contrib] [google-web-toolkit] r10212 committed - Add a ServletContext ThreadLocal to RequestFactoryServlet....

2011-05-24 Thread codesite-noreply

Revision: 10212
Author:   larse...@gmail.com
Date: Tue May 24 05:33:27 2011
Log:  Add a ServletContext ThreadLocal to RequestFactoryServlet.
http://gwt-code-reviews.appspot.com/1448804/
Patch by: larsenje
Review by: bobv

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

Modified:
  
/trunk/user/src/com/google/web/bindery/requestfactory/server/RequestFactoryServlet.java


===
---  
/trunk/user/src/com/google/web/bindery/requestfactory/server/RequestFactoryServlet.java	 
Tue Apr  5 10:47:39 2011
+++  
/trunk/user/src/com/google/web/bindery/requestfactory/server/RequestFactoryServlet.java	 
Tue May 24 05:33:27 2011

@@ -23,6 +23,7 @@
 import java.util.logging.Level;
 import java.util.logging.Logger;

+import javax.servlet.ServletContext;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
@@ -43,6 +44,7 @@
* These ThreadLocals are used to allow service objects to obtain access  
to

* the HTTP transaction.
*/
+  private static final ThreadLocal perThreadContext = new  
ThreadLocal();
   private static final ThreadLocal perThreadRequest =  
new ThreadLocal();
   private static final ThreadLocal perThreadResponse  
= new ThreadLocal();


@@ -63,6 +65,15 @@
   public static HttpServletResponse getThreadLocalResponse() {
 return perThreadResponse.get();
   }
+
+  /**
+   * Returns the thread-local {@link ServletContext}
+   *
+   * @return the {@link ServletContext} associated with this servlet
+   */
+  public static ServletContext getThreadLocalServletContext() {
+return perThreadContext.get();
+  }

   private final SimpleRequestProcessor processor;

@@ -102,6 +113,7 @@
   protected void doPost(HttpServletRequest request, HttpServletResponse  
response)

   throws IOException, ServletException {

+perThreadContext.set(getServletContext());
 perThreadRequest.set(request);
 perThreadResponse.set(response);

@@ -130,6 +142,7 @@
 log.log(Level.SEVERE, "Unexpected error", e);
   }
 } finally {
+  perThreadContext.set(null);
   perThreadRequest.set(null);
   perThreadResponse.set(null);
 }

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


Re: [gwt-contrib] gwtc classpath

2011-05-24 Thread Eric Ayers
On Tue, May 24, 2011 at 9:33 AM, Grzegorz Kossakowski <
grzegorz.kossakow...@gmail.com> wrote:

> 2011/5/24 Eric Ayers :
> > Yes, that class does read bytecode, but the source of the bytecode isn't
> > usually compiled .class files from the classpath, its the result of
> running
> > JDT on the sources.  I think it might be confusing because I worked on a
> > project to try to build type oracle from bytecode from any compiler, but
> we
> > have kind of abandoned that effort in favor of creating an equivalent to
> > javac that spits out more than just bytecode with each compiled class.
>
> Do you want to say that gwtc doesn't read .class files from classpath
> at all? Or if it does in what cases and what for?
>
> > I think I see why you are having the problem, yes.   But since the
> > collections in B are only needed at the source level (Type Oracle does
> not
> > need .class files), your "dev" jar could just contain .class files and a
> >  separate "runtime" jar could just contain .java sources and not .class
> > files.  I think this would fix your build woes, but it might make
> debugging
> > the collections a bit tricky.
>
> The problem is that I don't have .java files for scala-library (it's
> written in scala but compiled to jribble[1]). If I have java class J
> referring to scala class S (that we have .jribble for) then in order
> to run JDT for J we need information about S. The idea was to use
> .class file corresponding to S so JDT can correctly resolve references
> to S from J and build it's AST. Then JDT could build AST nodes for
> Java files that would get converted to GWT nodes and for jribble we
> have our own logic that converts jribble directly to GWT nodes without
> JDT involved in a process. We would need to populate TypeOracle with
> data corresponding jribble classes but we could use the same .class
> files that JDT was using for Scala (jribble) code.
>
> To sum up:
>  * version A of scala-library is needed by gwtc itself and we need
> (and have) only .class files for it
>  * version B of scala-library is in two forms: .jribble files and
> .class files. Class files are needed by JDT in order to resolve
> references to scala-library from Java sources of application we are
> compiling and by special logic that populates TypeOracle for that
> application for .jribble files. We need .jribble files to build GWT
> AST nodes.
>
> Now the question is how can I make version B of .class files visible
> only to JDT and special logic in TypeOracleMediator? Sounds I need
> custom classloader but I fear that gwtc reads .class files somewhere
> else for whatever purpose and I would get some nasty inconsistencies
> that would be extremely hard to debug.
>

If you are in the guts of the compiler and want to populate the type oracle
form byte code, you can build a list of TypeOracleMediator.TypeData objects
from any bytecode you like (doesn't have to be on classpath).  This won't
feed into the building of the AST - that has to build from source.



> If it's not a case how can I plug my own classes that would be visible
> to JDT? Is AbstractCompiler. INameEnvironmentImpl what I should be
> looking at?
>
> [1] jribble contains similar information as java code but jdt doesn't
> know about it, obviously.
>
> --
> Grzegorz Kossakowski
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors
>



-- 
Eric Z. Ayers
Google Web Toolkit, Atlanta, GA USA

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

[gwt-contrib] [google-web-toolkit] r10211 committed - Add missing xpcomglue_s.a for Darwin Gecko 2.0

2011-05-24 Thread codesite-noreply

Revision: 10211
Author:   con...@google.com
Date: Tue May 24 08:31:32 2011
Log:  Add missing xpcomglue_s.a for Darwin Gecko 2.0
http://code.google.com/p/google-web-toolkit/source/detail?r=10211

Added:
 /plugin-sdks/gecko-sdks/gecko-2.0.0/Darwin-gcc3/lib/libxpcomglue_s.a

===
--- /dev/null   
+++ /plugin-sdks/gecko-sdks/gecko-2.0.0/Darwin-gcc3/lib/libxpcomglue_s.a	 
Tue May 24 08:31:32 2011

File is too large to display a diff.

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


[gwt-contrib] Re: SafeHtmlRenderer code gen for UiBinder. Picking up issue 1426803 (issue1442804)

2011-05-24 Thread rchandia

Submitted as of r10210

On 2011/05/23 20:00:39, rjrjr wrote:

LGTM



Woot!



http://gwt-code-reviews.appspot.com/1442804/diff/10001/user/test/com/google/gwt/uibinder/elementparsers/DialogBoxParserTest.java

File

user/test/com/google/gwt/uibinder/elementparsers/DialogBoxParserTest.java

(right):



http://gwt-code-reviews.appspot.com/1442804/diff/10001/user/test/com/google/gwt/uibinder/elementparsers/DialogBoxParserTest.java#newcode80

user/test/com/google/gwt/uibinder/elementparsers/DialogBoxParserTest.java:80:

"fieldName.setHTML(\"@mockToken-fieldName-Hello, I

captionyou.\");",

Absolutely, and sorry for the mess.



On 2011/05/23 19:52:21, rchandia wrote:
> On 2011/05/23 18:25:23, rjrjr wrote:
> > is the "fieldName" string coming from a constant in

ElementParserTester or

> > something? If so, can you open up its visibility and use it in

these tests,

> > rather having it inlined all over the place?
>
> Done for the lines changed in this Issue.
>
> The string comes from ElementParserTester#FIELD_NAME. It is

hard-coded all

over
> the place, though (at least 45/278 tests in UiBinderJreSuite).
>
> May I finish surfacing it in a separate Issue?




http://gwt-code-reviews.appspot.com/1442804/

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


[gwt-contrib] Add BatchedRequestScope utility class to aggregate all requests made within a single tick of the... (issue1449804)

2011-05-24 Thread bobv

Reviewers: rjrjr,

Description:
Add BatchedRequestScope utility class to aggregate all requests made
within a single tick of the event loop.
Add FanoutReceiver utility class.
Remove redundant tests from RequestFactoryGwtJreSuite.
Patch by: bobv
Review by: rjrjr


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

Affected files:
  A  
user/src/com/google/web/bindery/requestfactory/gwt/client/BatchedRequestScope.java
  A  
user/src/com/google/web/bindery/requestfactory/shared/FanoutReceiver.java
  M  
user/src/com/google/web/bindery/requestfactory/shared/RequestContext.java
  M  
user/test/com/google/web/bindery/requestfactory/gwt/RequestFactoryGwtJreSuite.java
  M  
user/test/com/google/web/bindery/requestfactory/gwt/RequestFactorySuite.java
  A  
user/test/com/google/web/bindery/requestfactory/gwt/client/BatchedRequestScopeTest.java
  M  
user/test/com/google/web/bindery/requestfactory/vm/RequestFactoryJreSuite.java



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


[gwt-contrib] Re: Adds a ServletContext ThreadLocal to RequestFactoryServlet issue 6393 (issue1448804)

2011-05-24 Thread bobv

LGTM, will commit with minor sorting.

http://gwt-code-reviews.appspot.com/1448804/

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


[gwt-contrib] [google-web-toolkit] r10210 committed - SafeHtmlRenderer code gen for UiBinder. Picking up issue 1426803...

2011-05-24 Thread codesite-noreply

Revision: 10210
Author:   rchan...@google.com
Date: Tue May 24 04:45:28 2011
Log:  SafeHtmlRenderer code gen for UiBinder. Picking up issue 1426803

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

Review by: rj...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=10210

Added:
 /trunk/user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.css
  
/trunk/user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.java
  
/trunk/user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.ui.xml

Modified:
 /trunk/user/src/com/google/gwt/uibinder/UiBinder.gwt.xml
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/AttachableHTMLPanelParser.java
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/CustomButtonParser.java

 /trunk/user/src/com/google/gwt/uibinder/elementparsers/DialogBoxParser.java
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/DomElementParser.java

 /trunk/user/src/com/google/gwt/uibinder/elementparsers/GridParser.java
 /trunk/user/src/com/google/gwt/uibinder/elementparsers/HTMLPanelParser.java
 /trunk/user/src/com/google/gwt/uibinder/elementparsers/HasHTMLParser.java
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/StackLayoutPanelParser.java
  
/trunk/user/src/com/google/gwt/uibinder/elementparsers/TabLayoutPanelParser.java

 /trunk/user/src/com/google/gwt/uibinder/elementparsers/TabPanelParser.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/AbstractFieldWriter.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/FieldWriter.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
 /trunk/user/src/com/google/gwt/uibinder/rebind/model/HtmlTemplate.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/DialogBoxParserTest.java

 /trunk/user/test/com/google/gwt/uibinder/elementparsers/GridParserTest.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/MockUiBinderWriter.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/StackLayoutPanelParserTest.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/TabLayoutPanelParserTest.java
  
/trunk/user/test/com/google/gwt/uibinder/elementparsers/TabPanelParserTest.java

 /trunk/user/test/com/google/gwt/uibinder/test/client/Constants.java
 /trunk/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
 /trunk/user/test/com/google/gwt/uibinder/test/client/UiBinderTestApp.java

===
--- /dev/null
+++  
/trunk/user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.css	 
Tue May 24 04:45:28 2011

@@ -0,0 +1,8 @@
+.bodyColor {
+  color: indigo;
+}
+
+.bodyFont {
+  font-family: Helvetica, Arial, sans-serif;
+  font-size: small;
+}
===
--- /dev/null
+++  
/trunk/user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.java	 
Tue May 24 04:45:28 2011

@@ -0,0 +1,54 @@
+/*
+ * Copyright 2008 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may  
not
+ * use this file except in compliance with the License. You may obtain a  
copy of

+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,  
WITHOUT

+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations  
under

+ * the License.
+ */
+package com.google.gwt.uibinder.test.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.resources.client.ClientBundle;
+import com.google.gwt.resources.client.CssResource;
+import com.google.gwt.safehtml.shared.SafeHtml;
+import com.google.gwt.text.shared.SafeHtmlRenderer;
+
+/**
+ * Sample use of a {@code SafeHtmlRenderer} with no dependency on
+ * com.google.gwt.user.
+ */
+public class SafeHtmlRendererUi {
+  /**
+   * Resources for this template.
+   */
+  public interface Resources extends ClientBundle {
+@Source("SafeHtmlRendererUi.css")
+Style style();
+  }
+
+  /**
+   * CSS for this template.
+   */
+  public interface Style extends CssResource {
+String bodyColor();
+String bodyFont();
+  }
+
+  interface HtmlRenderer extends SafeHtmlRenderer { }
+  private static final HtmlRenderer renderer =  
GWT.create(HtmlRenderer.class);

+
+  public SafeHtmlRendererUi() {
+  }
+
+  public SafeHtml render() {
+return renderer.render(null);
+  }
+}
===
--- /dev/null
+++  
/trunk/user/test/com/google/gwt/uibinder/test/client/SafeHtmlRendererUi.ui.xml	 
Tue May 24 04:45:28 2011

@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+

++   
xmlns:res='urn:with:com.google.gwt.uibinder.test.client.DomBasedUi.Resources'

+  >
+  type="com.google.gwt.uibinder.test.client.Constants"/>

+  
+
+
+Hello, .
+How goes it?
+  Placeholders in  
localizables
+  When you mark u

[gwt-contrib] [google-web-toolkit] r10209 committed - Updating apichecker for GWT 2.4....

2011-05-24 Thread codesite-noreply

Revision: 10209
Author:   jlaba...@google.com
Date: Tue May 24 04:12:44 2011
Log:  Updating apichecker for GWT 2.4.

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

Review by: rj...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=10209

Added:
 /trunk/tools/api-checker/config/gwt23_24userApi.conf
Modified:
 /trunk/build.xml
 /trunk/tools/api-checker/reference/README
 /trunk/tools/api-checker/reference/createApiCheckerReferenceJars.sh
 /trunk/tools/api-checker/reference/gwt-dev-modified.jar
 /trunk/tools/api-checker/reference/gwt-user-modified.jar
  
/trunk/tools/api-checker/src/com/google/gwt/tools/apichecker/ApiCompatibilityChecker.java


===
--- /dev/null
+++ /trunk/tools/api-checker/config/gwt23_24userApi.conf	Tue May 24  
04:12:44 2011

@@ -0,0 +1,139 @@
+#existing API
+
+# dirRoot_old is missing because refJars are being supplied
+name_old gwt23userApi
+#sourceFiles is specified as colon-separated list of files
+sourceFiles_old com/google/gwt\
+:com/google/web\
+:javax/validation\
+
+#excludedFiles is specified as colon-separated ant patterns
+excludedFiles_old com/google/gwt/benchmarks/BenchmarkReport.java\
+:com/google/gwt/benchmarks/BenchmarkShell.java\
+:com/google/gwt/benchmarks/client/Benchmark.java\
+:**/linker/**\
+:**/rebind/**\
+:**/server/**\
+:**/tools/**\
+:**/vm/**\
+:com/google/gwt/regexp/shared/**\
+:com/google/gwt/autobean/**/impl/**\
+:com/google/gwt/autobean/shared/ValueCodex.java\
+:com/google/gwt/autobean/shared/ValueCodexHelper.java\
+:com/google/gwt/autobean/shared/AutoBeanCodex.java\
+:com/google/gwt/core/client/impl/WeakMapping.java\
+:com/google/gwt/core/ext/**\
+:com/google/gwt/dev/*.java\
+:com/google/gwt/dev/asm/**\
+:com/google/gwt/dev/cfg/**\
+:com/google/gwt/dev/generator/**\
+:com/google/gwt/dev/javac/**\
+:com/google/gwt/dev/jdt/**\
+:com/google/gwt/dev/jjs/*.java\
+:com/google/gwt/dev/jjs/ast/**\
+:com/google/gwt/dev/jjs/impl/**\
+:com/google/gwt/dev/js/**\
+:com/google/gwt/dev/json/**\
+:com/google/gwt/dev/resource/**\
+:com/google/gwt/dev/shell/**\
+:com/google/gwt/dev/ui/**\
+:com/google/gwt/dev/util/**\
+:com/google/gwt/junit/*.java\
+:com/google/gwt/junit/client/GWTTestCase.java\
+:com/google/gwt/junit/client/impl/GWTRunner.java\
+:com/google/gwt/junit/remote/**\
+:com/google/gwt/requestfactory/**\
+:com/google/gwt/resources/client/impl/**\
+:com/google/gwt/resources/css/**\
+:com/google/gwt/resources/ext/**\
+:com/google/gwt/resources/rg/**\
+:com/google/gwt/rpc/client/impl/ClientWriterFactory.java\
+:com/google/gwt/rpc/client/impl/EscapeUtil.java\
+:com/google/gwt/rpc/client/impl/RpcCallbackAdapter.java\
+:com/google/gwt/soyc/**\
+:com/google/gwt/safehtml/shared/SafeHtmlHostedModeUtils.java\
+:com/google/gwt/user/client/rpc/core/**\
+:com/google/gwt/user/client/rpc/impl/**\
+:com/google/gwt/uibinder/attributeparsers/**\
+:com/google/gwt/uibinder/elementparsers/**\
+:com/google/gwt/uibinder/testing/**\
+:com/google/gwt/util/**\
+:com/google/gwt/validation/**\
+:com/google/web/bindery/autobean/**/impl/**\
+:com/google/web/bindery/autobean/shared/ValueCodexHelper.java\
+:com/google/web/bindery/requestfactory/gwt/client/impl/**\
+:com/google/web/bindery/requestfactory/shared/impl/**\
+
+##
+#new Api
+
+dirRoot_new ./
+name_new gwt24userApi
+#sourceFiles is specified as colon-separated list of files
+sourceFiles_new dev/core/super\
+:user/src\
+:user/super\
+
+#excludedFiles is specified as colon-separated ant patterns
+# The last 3 entries exclude the validation stuff.
+# Bug: http://code.google.com/p/google-web-toolkit/issues/detail?id=5566
+excludedFiles_new user/src/com/google/gwt/benchmarks/BenchmarkReport.java\
+:user/src/com/google/gwt/benchmarks/BenchmarkShell.java\
+:user/src/com/google/gwt/benchmarks/client/Benchmark.java\
+:**/linker/**\
+:**/rebind/**\
+:**/server/**\
+:**/tools/**\
+:**/vm/**\
+:user/src/com/google/gwt/regexp/shared/**\
+:user/src/com/google/web/bindery/autobean/shared/ValueCodexHelper.java\
+:user/src/com/google/web/bindery/autobean/**/impl/**\
+:user/src/com/google/gwt/core/client/impl/WeakMapping.java\
+:user/src/com/google/gwt/junit/*.java\
+:user/src/com/google/gwt/junit/client/GWTTestCase.java\
+:user/src/com/google/gwt/junit/client/impl/GWTRunner.java\
+:user/src/com/google/gwt/junit/remote/**\
+:user/src/com/google/gwt/resources/css/**\
+:user/src/com/google/gwt/resources/ext/**\
+:user/src/com/google/gwt/resources/rg/**\
+:user/src/com/google/gwt/rpc/client/impl/ClientWriterFactory.java\
+:user/src/com/google/gwt/rpc/client/impl/EscapeUtil.java\
+:user/src/com/google/gwt/rpc/client/impl/RpcCallbackAdapter.java\
+:user/src/com/google/gwt/safehtml/shared/SafeHtmlHostedModeUtils.java\
+:user/src/com/google/gwt/user/client/rpc/core/**\
+:user/src/com/google/gwt/user/client/rpc/impl/**\
+:user/src/com/google/gwt/uibinder/attributeparsers/**\
+:user/src/com/google/gwt/uibinder/elementparsers/**\
+:user/src/com/googl

[gwt-contrib] Re: Updating apichecker for GWT 2.4. (issue1447807)

2011-05-24 Thread jlabanca

committed as r10209

http://gwt-code-reviews.appspot.com/1447807/

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


[gwt-contrib] [google-web-toolkit] r10208 committed - Fixing checkstyle errors... for realz this time....

2011-05-24 Thread codesite-noreply

Revision: 10208
Author:   gwt.mirror...@gmail.com
Date: Tue May 24 07:52:07 2011
Log:  Fixing checkstyle errors... for realz this time.

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

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

Modified:
 /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java

===
--- /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	Tue  
May 24 03:25:31 2011
+++ /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	Tue  
May 24 04:00:30 2011

@@ -695,11 +695,6 @@
 String uri = elem.getNamespaceUri();
 return uri != null && UiBinderGenerator.BINDER_URI.equals(uri);
   }
-
-  public boolean isRenderableElement(XMLElement elem)
-  throws UnableToCompleteException {
-return findFieldType(elem).isAssignableTo(isRenderableClassType);
-  }

   public boolean isElementAssignableTo(XMLElement elem, Class  
possibleSuperclass)

   throws UnableToCompleteException {
@@ -757,6 +752,11 @@

 return  
lazyDomElementClass.isAssignableFrom(ownerField.getType().getRawType());

   }
+
+  public boolean isRenderableElement(XMLElement elem)
+  throws UnableToCompleteException {
+return findFieldType(elem).isAssignableTo(isRenderableClassType);
+  }

   public boolean isWidgetElement(XMLElement elem) throws  
UnableToCompleteException {

 return isElementAssignableTo(elem, IsWidget.class);

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


[gwt-contrib] Re: Fixing checkstyle errors... for realz this time. (issue1446808)

2011-05-24 Thread jlabanca

committed as r10208

http://gwt-code-reviews.appspot.com/1446808/

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


[gwt-contrib] [google-web-toolkit] r10207 committed - Add the method name to the message of InvocationService to make it eas...

2011-05-24 Thread codesite-noreply

Revision: 10207
Author:   gaill...@google.com
Date: Tue May 24 03:58:52 2011
Log:  Add the method name to the message of InvocationService to make  
it easier to

find out the rootcause of the exception.

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

Review by: rj...@google.com
http://code.google.com/p/google-web-toolkit/source/detail?r=10207

Modified:
 /trunk/user/src/com/google/gwt/rpc/client/impl/RpcCallbackAdapter.java
 /trunk/user/src/com/google/gwt/user/client/rpc/impl/RemoteServiceProxy.java
  
/trunk/user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java


===
--- /trunk/user/src/com/google/gwt/rpc/client/impl/RpcCallbackAdapter.java	 
Mon Sep 20 10:54:28 2010
+++ /trunk/user/src/com/google/gwt/rpc/client/impl/RpcCallbackAdapter.java	 
Tue May 24 03:58:52 2011

@@ -83,7 +83,7 @@
 caught = new StatusCodeException(statusCode, encodedResponse);
   } else if (encodedResponse == null) {
 // This can happen if the XHR is interrupted by the server dying
-caught = new InvocationException("No response payload");
+caught = new InvocationException("No response payload from " +  
methodName);

   } else {
 result = (T)  
streamFactory.createStreamReader(encodedResponse).readObject();

   }
===
---  
/trunk/user/src/com/google/gwt/user/client/rpc/impl/RemoteServiceProxy.java	 
Tue Apr 26 07:33:38 2011
+++  
/trunk/user/src/com/google/gwt/user/client/rpc/impl/RemoteServiceProxy.java	 
Tue May 24 03:58:52 2011

@@ -372,7 +372,8 @@
   return rb.send();
 } catch (RequestException ex) {
   InvocationException iex = new InvocationException(
-  "Unable to initiate the asynchronous service invocation -- check  
the network connection",

+  "Unable to initiate the asynchronous service invocation (" +
+  methodName + ") -- check the network connection",
   ex);
   callback.onFailure(iex);
 } finally {
===
---  
/trunk/user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java	 
Tue Nov 23 13:47:33 2010
+++  
/trunk/user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java	 
Tue May 24 03:58:52 2011

@@ -209,13 +209,13 @@
 caught = new StatusCodeException(statusCode, encodedResponse);
   } else if (encodedResponse == null) {
 // This can happen if the XHR is interrupted by the server dying
-caught = new InvocationException("No response payload");
+caught = new InvocationException("No response payload from " +  
methodName);

   } else if (RemoteServiceProxy.isReturnValue(encodedResponse)) {
 result = (T)  
responseReader.read(streamFactory.createStreamReader(encodedResponse));

   } else if (RemoteServiceProxy.isThrownException(encodedResponse)) {
 caught = (Throwable)  
streamFactory.createStreamReader(encodedResponse).readObject();

   } else {
-caught = new InvocationException(encodedResponse);
+caught = new InvocationException(encodedResponse + " from " +  
methodName);

   }
 } catch (com.google.gwt.user.client.rpc.SerializationException e) {
   caught = new IncompatibleRemoteServiceException(

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


[gwt-contrib] Re: Fixing checkstyle error. (issue1448805)

2011-05-24 Thread jlabanca

committed as r10206

http://gwt-code-reviews.appspot.com/1448805/

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


[gwt-contrib] [google-web-toolkit] r10206 committed - Fixing checkstyle error....

2011-05-24 Thread codesite-noreply

Revision: 10206
Author:   jlaba...@google.com
Date: Tue May 24 03:25:31 2011
Log:  Fixing checkstyle error.

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

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

Modified:
 /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java

===
--- /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	Mon  
May 23 17:23:56 2011
+++ /trunk/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	Tue  
May 24 03:25:31 2011

@@ -690,16 +690,16 @@
   public String getUiFieldAttributeName() {
 return gwtPrefix + ":field";
   }
-
-  public boolean isRenderableElement(XMLElement elem)
-  throws UnableToCompleteException {
-return findFieldType(elem).isAssignableTo(isRenderableClassType);
-  }

   public boolean isBinderElement(XMLElement elem) {
 String uri = elem.getNamespaceUri();
 return uri != null && UiBinderGenerator.BINDER_URI.equals(uri);
   }
+
+  public boolean isRenderableElement(XMLElement elem)
+  throws UnableToCompleteException {
+return findFieldType(elem).isAssignableTo(isRenderableClassType);
+  }

   public boolean isElementAssignableTo(XMLElement elem, Class  
possibleSuperclass)

   throws UnableToCompleteException {

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


[gwt-contrib] Fixing checkstyle errors... for realz this time. (issue1446808)

2011-05-24 Thread jlabanca

Reviewers: zundel,

Description:
Fixing checkstyle errors... for realz this time.


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

Affected files:
  M user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java


Index: user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
===
--- user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	(revision  
10205)
+++ user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	(working  
copy)

@@ -696,11 +696,6 @@
 return uri != null && UiBinderGenerator.BINDER_URI.equals(uri);
   }

-  public boolean isRenderableElement(XMLElement elem)
-  throws UnableToCompleteException {
-return findFieldType(elem).isAssignableTo(isRenderableClassType);
-  }
-
   public boolean isElementAssignableTo(XMLElement elem, Class  
possibleSuperclass)

   throws UnableToCompleteException {
 JClassType classType =  
oracle.findType(possibleSuperclass.getCanonicalName());

@@ -756,6 +751,11 @@
 }

 return  
lazyDomElementClass.isAssignableFrom(ownerField.getType().getRawType());

+  }
+
+  public boolean isRenderableElement(XMLElement elem)
+  throws UnableToCompleteException {
+return findFieldType(elem).isAssignableTo(isRenderableClassType);
   }

   public boolean isWidgetElement(XMLElement elem) throws  
UnableToCompleteException {



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


[gwt-contrib] Re: Updating apichecker for GWT 2.4. (issue1447807)

2011-05-24 Thread rjrjr

LGTM

http://gwt-code-reviews.appspot.com/1447807/

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


Re: [gwt-contrib] gwtc classpath

2011-05-24 Thread John Tamplin
On Tue, May 24, 2011 at 9:33 AM, Grzegorz Kossakowski <
grzegorz.kossakow...@gmail.com> wrote:

> 2011/5/24 Eric Ayers :
> > Yes, that class does read bytecode, but the source of the bytecode isn't
> > usually compiled .class files from the classpath, its the result of
> running
> > JDT on the sources.  I think it might be confusing because I worked on a
> > project to try to build type oracle from bytecode from any compiler, but
> we
> > have kind of abandoned that effort in favor of creating an equivalent to
> > javac that spits out more than just bytecode with each compiled class.
>
> Do you want to say that gwtc doesn't read .class files from classpath
> at all? Or if it does in what cases and what for?


For user code (that which will be compiled by GWT), it only looks for class
files from the classpath for annotations that it doesn't have the source to.
 In DevMode, it will also load user classes from the classpath if the
visible source file is annotated with @GwtScriptOnly.

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

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

Re: [gwt-contrib] gwtc classpath

2011-05-24 Thread Grzegorz Kossakowski
2011/5/24 Eric Ayers :
> Yes, that class does read bytecode, but the source of the bytecode isn't
> usually compiled .class files from the classpath, its the result of running
> JDT on the sources.  I think it might be confusing because I worked on a
> project to try to build type oracle from bytecode from any compiler, but we
> have kind of abandoned that effort in favor of creating an equivalent to
> javac that spits out more than just bytecode with each compiled class.

Do you want to say that gwtc doesn't read .class files from classpath
at all? Or if it does in what cases and what for?

> I think I see why you are having the problem, yes.   But since the
> collections in B are only needed at the source level (Type Oracle does not
> need .class files), your "dev" jar could just contain .class files and a
>  separate "runtime" jar could just contain .java sources and not .class
> files.  I think this would fix your build woes, but it might make debugging
> the collections a bit tricky.

The problem is that I don't have .java files for scala-library (it's
written in scala but compiled to jribble[1]). If I have java class J
referring to scala class S (that we have .jribble for) then in order
to run JDT for J we need information about S. The idea was to use
.class file corresponding to S so JDT can correctly resolve references
to S from J and build it's AST. Then JDT could build AST nodes for
Java files that would get converted to GWT nodes and for jribble we
have our own logic that converts jribble directly to GWT nodes without
JDT involved in a process. We would need to populate TypeOracle with
data corresponding jribble classes but we could use the same .class
files that JDT was using for Scala (jribble) code.

To sum up:
  * version A of scala-library is needed by gwtc itself and we need
(and have) only .class files for it
  * version B of scala-library is in two forms: .jribble files and
.class files. Class files are needed by JDT in order to resolve
references to scala-library from Java sources of application we are
compiling and by special logic that populates TypeOracle for that
application for .jribble files. We need .jribble files to build GWT
AST nodes.

Now the question is how can I make version B of .class files visible
only to JDT and special logic in TypeOracleMediator? Sounds I need
custom classloader but I fear that gwtc reads .class files somewhere
else for whatever purpose and I would get some nasty inconsistencies
that would be extremely hard to debug.

If it's not a case how can I plug my own classes that would be visible
to JDT? Is AbstractCompiler. INameEnvironmentImpl what I should be
looking at?

[1] jribble contains similar information as java code but jdt doesn't
know about it, obviously.

-- 
Grzegorz Kossakowski

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


[gwt-contrib] Re: Fixing checkstyle error. (issue1448805)

2011-05-24 Thread zundel

LGTM

http://gwt-code-reviews.appspot.com/1448805/

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


[gwt-contrib] Fixing checkstyle error. (issue1448805)

2011-05-24 Thread jlabanca

Reviewers: zundel,

Description:
Fixing checkstyle error.


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

Affected files:
  M user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java


Index: user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
===
--- user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	(revision  
10205)
+++ user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	(working  
copy)

@@ -691,14 +691,14 @@
 return gwtPrefix + ":field";
   }

-  public boolean isRenderableElement(XMLElement elem)
-  throws UnableToCompleteException {
-return findFieldType(elem).isAssignableTo(isRenderableClassType);
-  }
-
   public boolean isBinderElement(XMLElement elem) {
 String uri = elem.getNamespaceUri();
 return uri != null && UiBinderGenerator.BINDER_URI.equals(uri);
+  }
+
+  public boolean isRenderableElement(XMLElement elem)
+  throws UnableToCompleteException {
+return findFieldType(elem).isAssignableTo(isRenderableClassType);
   }

   public boolean isElementAssignableTo(XMLElement elem, Class  
possibleSuperclass)



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


[gwt-contrib] Re: Add the method name to the message of InvocationService to make it easier to (issue1450803)

2011-05-24 Thread Ray Ryan
LGTM

On Tue, May 24, 2011 at 5:04 AM,  wrote:

> Reviewers: rjrjr,
>
> Description:
> Add the method name to the message of InvocationService to make it
> easier to
> find out the rootcause of the exception.
>
>
> Please review this at http://gwt-code-reviews.appspot.com/1450803/
>
> Affected files:
>  M user/src/com/google/gwt/rpc/client/impl/RpcCallbackAdapter.java
>  M user/src/com/google/gwt/user/client/rpc/impl/RemoteServiceProxy.java
>  M user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java
>
>
> Index: user/src/com/google/gwt/rpc/client/impl/RpcCallbackAdapter.java
> ===
> --- user/src/com/google/gwt/rpc/client/impl/RpcCallbackAdapter.java
> (revision 10205)
> +++ user/src/com/google/gwt/rpc/client/impl/RpcCallbackAdapter.java
> (working copy)
> @@ -83,7 +83,7 @@
> caught = new StatusCodeException(statusCode, encodedResponse);
>   } else if (encodedResponse == null) {
> // This can happen if the XHR is interrupted by the server dying
> -caught = new InvocationException("No response payload");
> +caught = new InvocationException("No response payload from " +
> methodName);
>   } else {
> result = (T)
> streamFactory.createStreamReader(encodedResponse).readObject();
>   }
> Index: user/src/com/google/gwt/user/client/rpc/impl/RemoteServiceProxy.java
> ===
> --- user/src/com/google/gwt/user/client/rpc/impl/RemoteServiceProxy.java
>  (revision 10205)
> +++ user/src/com/google/gwt/user/client/rpc/impl/RemoteServiceProxy.java
>  (working copy)
> @@ -372,7 +372,8 @@
>   return rb.send();
> } catch (RequestException ex) {
>   InvocationException iex = new InvocationException(
> -  "Unable to initiate the asynchronous service invocation -- check
> the network connection",
> +  "Unable to initiate the asynchronous service invocation (" +
> +  methodName + ") -- check the network connection",
>   ex);
>   callback.onFailure(iex);
> } finally {
> Index:
> user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java
> ===
> ---
> user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java
>  (revision 10205)
> +++
> user/src/com/google/gwt/user/client/rpc/impl/RequestCallbackAdapter.java
>  (working copy)
> @@ -209,13 +209,13 @@
> caught = new StatusCodeException(statusCode, encodedResponse);
>   } else if (encodedResponse == null) {
> // This can happen if the XHR is interrupted by the server dying
> -caught = new InvocationException("No response payload");
> +caught = new InvocationException("No response payload from " +
> methodName);
>   } else if (RemoteServiceProxy.isReturnValue(encodedResponse)) {
> result = (T)
> responseReader.read(streamFactory.createStreamReader(encodedResponse));
>   } else if (RemoteServiceProxy.isThrownException(encodedResponse)) {
> caught = (Throwable)
> streamFactory.createStreamReader(encodedResponse).readObject();
>   } else {
> -caught = new InvocationException(encodedResponse);
> +caught = new InvocationException(encodedResponse + " from " +
> methodName);
>   }
> } catch (com.google.gwt.user.client.rpc.SerializationException e) {
>   caught = new IncompatibleRemoteServiceException(
>
>
>

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

[gwt-contrib] Re: 1. Assert, at runtime, that GWT is running in Standards Mode (i.e. with an appropriate DOCTYPE d... (issue1422816)

2011-05-24 Thread dmenounos

Standards Mode is not only HTML5 . (X)HTML Strict and
Transitional modes also qualify as such.

http://en.wikipedia.org/wiki/Quirks_mode

I hope this patch does not force us to move to HTML5, which is not even
finalized yet.


http://gwt-code-reviews.appspot.com/1422816/

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


[gwt-contrib] Re: 1. Assert, at runtime, that GWT is running in Standards Mode (i.e. with an appropriate DOCTYPE d... (issue1422816)

2011-05-24 Thread dmenounos

On 2011/05/23 18:26:02, dmenounos wrote:

Standards Mode is not only HTML5 . (X)HTML Strict and
Transitional modes also qualify as such.



http://en.wikipedia.org/wiki/Quirks_mode



I hope this patch does not force us to move to HTML5, which is not

even

finalized yet.


http://en.wikipedia.org/wiki/Quirks_mode#Comparison_of_document_types

http://gwt-code-reviews.appspot.com/1422816/

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


[gwt-contrib] Updating apichecker for GWT 2.4. (issue1447807)

2011-05-24 Thread jlabanca

Reviewers: rjrjr,

Description:
Updating apichecker for GWT 2.4.


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

Affected files:
  M build.xml
  A tools/api-checker/config/gwt23_24userApi.conf
  M tools/api-checker/reference/README
  M tools/api-checker/reference/createApiCheckerReferenceJars.sh
  M  
tools/api-checker/src/com/google/gwt/tools/apichecker/ApiCompatibilityChecker.java



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


[gwt-contrib] Re: Public (steph...@gmail.com): (issue1450802)

2011-05-24 Thread jlabanca

LGTM

http://gwt-code-reviews.appspot.com/1450802/

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


Re: [gwt-contrib] gwtc classpath

2011-05-24 Thread Eric Ayers
On Tue, May 24, 2011 at 8:00 AM, Grzegorz Kossakowski <
grzegorz.kossakow...@gmail.com> wrote:

> 2011/5/24 Eric Ayers :
> > Hi Grzegorz,
> >
> > You mentioned the compiled classes in the class path are used to
> > populate the type orace.  For the most part, the type oracle types are
> > compiled from source.  Types that don't have source are then checked
> > to see if they are binary annotations and then a type oracle reference
> > is entered.
>
> I have addNewTypes method in mind:
>
> http://www.google.com/codesearch/p?hl=en#A1edwVHBClQ/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java&l=380
>
> It reads class file data and uses it to populate TypeOracle, right?
>

Yes, that class does read bytecode, but the source of the bytecode isn't
usually compiled .class files from the classpath, its the result of running
JDT on the sources.  I think it might be confusing because I worked on a
project to try to build type oracle from bytecode from any compiler, but we
have kind of abandoned that effort in favor of creating an equivalent to
javac that spits out more than just bytecode with each compiled class.


>
> > Could it be true that scala-library.jar contains both libraries to use
> > with the GWT compiler and some sort of runtime environment (sources)
> > to compile with your app?  If so, maybe the solution is to split
> > scala-library.jar into the equivalent of 'dev' and 'user' components,
> > such that 'user' is not needed for running the compiler and 'dev' is
> > not needed for the app to link against.
>
> I think the answer is no. Let me explain the issue a little bit more.
> The scala-library.jar contains the whole scala runtime library
> including things like scala collections, etc. Those classes are used
> by gwtc itself to handle jribble input (alternative to java input).
>
> Now, application written in Scala is going to use the same classes
> (e.g. collections) but of different version. Thus we need two versions
> of .class files on the classpath: one (call it A) used by gwtc
> implementation and one (call it B) used for application itself. We
> need B version of .class files on a classpath because JDT needs those
> classes in order to properly resolve references to Scala code
> (application code) from Java code. We also need B in order to populate
> TypeOracle in addNewTypes method.
>
> Does this explain the issue a bit better now?
>

I think I see why you are having the problem, yes.   But since the
collections in B are only needed at the source level (Type Oracle does not
need .class files), your "dev" jar could just contain .class files and a
 separate "runtime" jar could just contain .java sources and not .class
files.  I think this would fix your build woes, but it might make debugging
the collections a bit tricky.



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



-- 
Eric Z. Ayers
Google Web Toolkit, Atlanta, GA USA

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

Re: [gwt-contrib] gwtc classpath

2011-05-24 Thread Grzegorz Kossakowski
2011/5/24 Eric Ayers :
> Hi Grzegorz,
>
> You mentioned the compiled classes in the class path are used to
> populate the type orace.  For the most part, the type oracle types are
> compiled from source.  Types that don't have source are then checked
> to see if they are binary annotations and then a type oracle reference
> is entered.

I have addNewTypes method in mind:
http://www.google.com/codesearch/p?hl=en#A1edwVHBClQ/dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java&l=380

It reads class file data and uses it to populate TypeOracle, right?

> Could it be true that scala-library.jar contains both libraries to use
> with the GWT compiler and some sort of runtime environment (sources)
> to compile with your app?  If so, maybe the solution is to split
> scala-library.jar into the equivalent of 'dev' and 'user' components,
> such that 'user' is not needed for running the compiler and 'dev' is
> not needed for the app to link against.

I think the answer is no. Let me explain the issue a little bit more.
The scala-library.jar contains the whole scala runtime library
including things like scala collections, etc. Those classes are used
by gwtc itself to handle jribble input (alternative to java input).

Now, application written in Scala is going to use the same classes
(e.g. collections) but of different version. Thus we need two versions
of .class files on the classpath: one (call it A) used by gwtc
implementation and one (call it B) used for application itself. We
need B version of .class files on a classpath because JDT needs those
classes in order to properly resolve references to Scala code
(application code) from Java code. We also need B in order to populate
TypeOracle in addNewTypes method.

Does this explain the issue a bit better now?

-- 
Grzegorz Kossakowski

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


[gwt-contrib] Earn $1000-$2500 per month

2011-05-24 Thread amala a
Earn $1000-$2500 per month
If you Register your name
You Get Sign-up bonus $5
   AND
Get $.20 cent for each referral.
Further details

http://www.earnbyforex.com/index.php?id=35678365


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