[gwt-contrib] Add various docs, minor variable renames (issue1578807)

2011-10-26 Thread stephen . haberman

Reviewers: cromwellian,

Message:
No functionality changes, just adding docs, usually to explicitly state
whether its internal/binary/source names being used, or a few renames to
make which internal/etc. names are being used more explicit.



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

Affected files:
  M dev/core/src/com/google/gwt/core/ext/typeinfo/JClassType.java
  M dev/core/src/com/google/gwt/core/ext/typeinfo/TypeOracle.java
  M dev/core/src/com/google/gwt/dev/asm/Type.java
  M dev/core/src/com/google/gwt/dev/javac/CompilationState.java
  M dev/core/src/com/google/gwt/dev/javac/CompilationStateBuilder.java
  M dev/core/src/com/google/gwt/dev/javac/CompilationUnitBuilder.java
  M dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
  M dev/core/src/com/google/gwt/dev/javac/JsniChecker.java
  M dev/core/src/com/google/gwt/dev/javac/Resolver.java
  M dev/core/src/com/google/gwt/dev/javac/TypeOracleMediator.java
  M dev/core/src/com/google/gwt/dev/javac/asm/CollectClassData.java
  M dev/core/src/com/google/gwt/dev/javac/asm/ResolveMethodSignature.java
  M dev/core/src/com/google/gwt/dev/javac/asm/ResolveTypeSignature.java
  M dev/core/src/com/google/gwt/dev/javac/typemodel/JRealClassType.java
  M dev/core/src/com/google/gwt/dev/javac/typemodel/TypeOracle.java
  M dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java
  M dev/core/src/com/google/gwt/dev/jjs/ast/JReferenceType.java
  M dev/core/src/com/google/gwt/dev/util/JsniRef.java
  M dev/core/test/com/google/gwt/dev/javac/asm/ResolveGenericsTest.java


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


[gwt-contrib] AdditionalTypeProviderDelegate uses internal names (issue1583803)

2011-10-26 Thread stephen . haberman

Reviewers: cromwellian,

Message:
This is a small clean up from the less name mangling patch that is just
fixing a variable name to be "internalName" instead of "binaryName".

I have another patch or two coming that is the same thing; pulling
peripheral, no-functionality-changes out of the name mangling patch to
make things simpler to review.



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

Affected files:
  M dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
  M  
dev/core/test/com/google/gwt/dev/jjs/impl/AdditionalTypeProviderDelegateTest.java



Index: dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
diff --git a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java  
b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
index  
9f0c604913af233358fa8ee53f445e4ab8de0774..1ab2a23e5fa63ef5286dc907cf7744c3c837fa6c  
100644

--- a/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
+++ b/dev/core/src/com/google/gwt/dev/javac/JdtCompiler.java
@@ -103,11 +103,11 @@ public class JdtCompiler {
  * Finds a new compilation unit on-the-fly for the requested type, if  
there

  * is an alternate mechanism for doing so.
  *
- * @param binaryName the binary name of the requested type
+ * @param internalName the internal name of the requested type
  * @return a unit answering the name, or null if no such  
unit

  * can be created
  */
-GeneratedUnit doFindAdditionalType(String binaryName);
+GeneratedUnit doFindAdditionalType(String internalName);
   }

   /**
@@ -290,9 +290,9 @@ public class JdtCompiler {
 }

 public NameEnvironmentAnswer findType(char[][] compoundTypeName) {
-  char[] binaryNameChars =  
CharOperation.concatWith(compoundTypeName, '/');

-  String binaryName = String.valueOf(binaryNameChars);
-  CompiledClass compiledClass = binaryTypes.get(binaryName);
+  char[] internalNameChars =  
CharOperation.concatWith(compoundTypeName, '/');

+  String internalName = String.valueOf(internalNameChars);
+  CompiledClass compiledClass = binaryTypes.get(internalName);
   try {
 if (compiledClass != null) {
   return compiledClass.getNameEnvironmentAnswer();
@@ -300,11 +300,11 @@ public class JdtCompiler {
   } catch (ClassFormatException ex) {
 // fall back to binary class
   }
-  if (isPackage(binaryName)) {
+  if (isPackage(internalName)) {
 return null;
   }
   if (additionalTypeProviderDelegate != null) {
-GeneratedUnit unit =  
additionalTypeProviderDelegate.doFindAdditionalType(binaryName);
+GeneratedUnit unit =  
additionalTypeProviderDelegate.doFindAdditionalType(internalName);

 if (unit != null) {
   CompilationUnitBuilder b = CompilationUnitBuilder.create(unit);
   Adapter a = new Adapter(b);
@@ -312,7 +312,7 @@ public class JdtCompiler {
 }
   }
   try {
-URL resource = getClassLoader().getResource(binaryName + ".class");
+URL resource = getClassLoader().getResource(internalName  
+ ".class");

 if (resource != null) {
   InputStream openStream = resource.openStream();
   try {
@@ -487,7 +487,7 @@ public class JdtCompiler {
   private AdditionalTypeProviderDelegate additionalTypeProviderDelegate;

   /**
-   * Maps dotted binary names to compiled classes.
+   * Maps internal names to compiled classes.
*/
   private final Map binaryTypes = new  
HashMap();


Index:  
dev/core/test/com/google/gwt/dev/jjs/impl/AdditionalTypeProviderDelegateTest.java
diff --git  
a/dev/core/test/com/google/gwt/dev/jjs/impl/AdditionalTypeProviderDelegateTest.java  
b/dev/core/test/com/google/gwt/dev/jjs/impl/AdditionalTypeProviderDelegateTest.java
index  
1962d883f889e10e56751f3cfaddf8a819c462cc..e781cc770c47c597850923692ae9c45cba4e7fe1  
100644
---  
a/dev/core/test/com/google/gwt/dev/jjs/impl/AdditionalTypeProviderDelegateTest.java
+++  
b/dev/core/test/com/google/gwt/dev/jjs/impl/AdditionalTypeProviderDelegateTest.java
@@ -212,8 +212,8 @@ public class AdditionalTypeProviderDelegateTest extends  
OptimizerTestBase {

 return false;
   }

-  public GeneratedUnit doFindAdditionalType(String binaryName) {
-if (binaryName.compareTo("myPackage/InsertedClass") == 0) {
+  public GeneratedUnit doFindAdditionalType(String internalName) {
+if (internalName.compareTo("myPackage/InsertedClass") == 0) {
   return new JavaWrapperCompilationUnit();
   }
   return null;


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


[gwt-contrib] Re: Make form event getTypes public. (issue1582803)

2011-10-26 Thread stephen . haberman


http://gwt-code-reviews.appspot.com/1582803/diff/1/user/src/com/google/gwt/user/client/ui/FormPanel.java
File user/src/com/google/gwt/user/client/ui/FormPanel.java (left):

http://gwt-code-reviews.appspot.com/1582803/diff/1/user/src/com/google/gwt/user/client/ui/FormPanel.java#oldcode98
user/src/com/google/gwt/user/client/ui/FormPanel.java:98: return TYPE;
This was returning null if I instantiated an event and called
getAssociatedType before getType was called. I'm not sure if this was a
purposeful optimization, but it seems safer to use getType.

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

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


[gwt-contrib] Make form event getTypes public. (issue1582803)

2011-10-26 Thread stephen . haberman

Reviewers: rjrjr,

Message:
I was writing some stubs for FormPanel and couldn't access the event
types from another package. So far all the events I've needed have an
accessible getType method, so I think this change is okay.



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

Affected files:
  M user/src/com/google/gwt/user/client/ui/FormPanel.java


Index: user/src/com/google/gwt/user/client/ui/FormPanel.java
diff --git a/user/src/com/google/gwt/user/client/ui/FormPanel.java  
b/user/src/com/google/gwt/user/client/ui/FormPanel.java
index  
6143ff5d436634290d41cb2d1c994951be2635a0..fe35fa85619934dc64feb4c8b1f4b71e6ea5d8c1  
100644

--- a/user/src/com/google/gwt/user/client/ui/FormPanel.java
+++ b/user/src/com/google/gwt/user/client/ui/FormPanel.java
@@ -75,7 +75,7 @@ public class FormPanel extends SimplePanel implements  
FiresFormEvents, FormPanel

  *
  * @return the handler hook
  */
-static Type getType() {
+public static Type getType() {
   if (TYPE == null) {
 TYPE = new Type();
   }
@@ -95,7 +95,7 @@ public class FormPanel extends SimplePanel implements  
FiresFormEvents, FormPanel


 @Override
 public final Type getAssociatedType() {
-  return TYPE;
+  return getType();
 }

 /**
@@ -142,7 +142,7 @@ public class FormPanel extends SimplePanel implements  
FiresFormEvents, FormPanel

  *
  * @return the handler hook
  */
-static Type getType() {
+public static Type getType() {
   if (TYPE == null) {
 TYPE = new Type();
   }
@@ -161,7 +161,7 @@ public class FormPanel extends SimplePanel implements  
FiresFormEvents, FormPanel


 @Override
 public final Type getAssociatedType() {
-  return TYPE;
+  return getType();
 }

 /**


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


[gwt-contrib] Re: r10697 is back! It was falsely accused last time. Fingers crossed: (issue1578806)

2011-10-26 Thread rdayal

LGTM.



http://gwt-code-reviews.appspot.com/1578806/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java
File user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java
(right):

http://gwt-code-reviews.appspot.com/1578806/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java#newcode216
user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java:216:
Boolean rtn = extractConfigProperty(logger, propertyOracle,
LAZY_WIDGET_BUILDERS_PROPERTY, false);
Do you want to set the default value to true?

http://gwt-code-reviews.appspot.com/1578806/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
File user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
(right):

http://gwt-code-reviews.appspot.com/1578806/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java#newcode1009
user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java:1009: return
tokenForStringExpression(source, expression);
Why was this change necessary?

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

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


[gwt-contrib] Re: r10697 is back! It was falsely accused last time. Fingers crossed: (issue1578806)

2011-10-26 Thread rchandia


http://gwt-code-reviews.appspot.com/1578806/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java
File user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java
(right):

http://gwt-code-reviews.appspot.com/1578806/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java#newcode216
user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java:216:
Boolean rtn = extractConfigProperty(logger, propertyOracle,
LAZY_WIDGET_BUILDERS_PROPERTY, false);
On 2011/10/26 20:28:37, rdayal wrote:

Do you want to set the default value to true?


Done.

http://gwt-code-reviews.appspot.com/1578806/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
File user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
(right):

http://gwt-code-reviews.appspot.com/1578806/diff/1/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java#newcode1009
user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java:1009: return
tokenForStringExpression(source, expression);
On 2011/10/26 20:28:37, rdayal wrote:

Why was this change necessary?


Quoting rjrjr in the original issue:

Fixes unreported bad code gen for things like
 when safehtml is off. Fix is a bit squirrelly, but
the intent is to delete the code
in question almost immediately if nothing blows up with new default.

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

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


[gwt-contrib] Re: r10697 is back! It was falsely accused last time. Fingers crossed: (issue1578806)

2011-10-26 Thread rchandia

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

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


[gwt-contrib] Re: Switch to internal implementation of StringInterner to avoid class loader (issue1578804)

2011-10-26 Thread tobyr

LGTM

Still not really fond of the manual sharding, but it's hard to argue
against fixed without regression.


http://gwt-code-reviews.appspot.com/1578804/diff/4004/dev/core/test/com/google/gwt/dev/util/StringInternerTest.java
File dev/core/test/com/google/gwt/dev/util/StringInternerTest.java
(right):

http://gwt-code-reviews.appspot.com/1578804/diff/4004/dev/core/test/com/google/gwt/dev/util/StringInternerTest.java#newcode87
dev/core/test/com/google/gwt/dev/util/StringInternerTest.java:87:
private static String makeString(int[] array) {
Dead code?

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

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


Re: [gwt-contrib] Re: loading live, instantly-generated data from the server and displaying it as a line graph

2011-10-26 Thread arif
Thank you for the reply!
Is there any example/tutorial you could refer to that explains this in more
detail?
BTW, which users group you were referring to?


On Tue, Oct 25, 2011 at 12:07 PM, Jeff Larsen  wrote:

> This is probably a better discussion for the users group, but I'll answer
> it anyway. I'm using HighCharts for some of my charting needs, you'll just
> need to send the data down to the charting software and either poll for new
> data, or implement server push/cometd and have it update the graph that
> way.
>
> --
> http://groups.google.com/group/Google-Web-Toolkit-Contributors




-- 
Thanks,
*S. M. Niaz Arifin*
Graduate Student
206 Cushing, Department of Computer Science and Engineering
University of Notre Dame, IN 46556, USA
*Research*: https://sites.google.com/a/nd.edu/publications
*Website*: http://smniazarifin.tripod.com

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

[gwt-contrib] Announce: GwtQuery 1.1.0

2011-10-26 Thread Manuel Carrasco MoƱino
The GQuery team is proud to announce the version 1.1.0 of the library.

We have been working hard in order to fix many issues and to achieve a
closed jQuery API.

The new release includes new features like the jQuery Ajax API, Data
binding to easily manage json and xml data, better interaction with
gwt widgets, and improved documentation.

You can see the full list of features in the presentation given in The
RivieraDev last week in France [1] or taking a look to the project
wiki pages [2]

[1] 
http://www.slideshare.net/dodotis/gquery-a-jquery-clone-for-gwt-rivieradev-2011
[2] http://code.google.com/p/gwtquery/w/list


Thanks so much to the people sending issues, testing, and using the library.

- GQuery Team

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


[gwt-contrib] Re: Switch to internal implementation of StringInterner to avoid class loader (issue1578804)

2011-10-26 Thread skybrian

Another possibility is that WeakKeyHashMap's performance varies with
size and the performance difference has nothing to do with concurrency -
it's just the smaller hash maps are closer to optimal.

But anyway, we're speculating, and I'm not inclined to investigate the
mystery. At that point I'm pretty confident that it solves the problem
and isn't a significant performance regression (at 1024 shards).

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

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


[gwt-contrib] Re: Fixing a bug in Cell Widgets when using the BOUND_TO_SELECTION KeyboardSelectionPolicy in which ... (issue1578805)

2011-10-26 Thread jlabanca

committed as r10724

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

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


[gwt-contrib] r10697 is back! It was falsely accused last time. Fingers crossed: (issue1578806)

2011-10-26 Thread rchandia

Reviewers: rdayal,

Description:
r10697 is back! It was falsely accused last time. Fingers crossed:

*** Original change description ***

Change default of UiBinder.useLazyWidgetBuilders to true, in
preparation for deleting the old code.

Review by: rda...@google.com

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

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


Index: user/src/com/google/gwt/uibinder/UiBinder.gwt.xml
===
--- user/src/com/google/gwt/uibinder/UiBinder.gwt.xml   (revision 10724)
+++ user/src/com/google/gwt/uibinder/UiBinder.gwt.xml   (working copy)
@@ -27,11 +27,11 @@
   is-multi-valued="false"/>
   value="true"/>


-  
+  
   is-multi-valued="false"/>
-  value="false"/>
+  value="true"/>


   
 class="com.google.gwt.uibinder.client.UiRenderer"/>

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

@@ -52,6 +52,7 @@
   private static final String LAZY_WIDGET_BUILDERS_PROPERTY  
= "UiBinder.useLazyWidgetBuilders";


   private static boolean gaveSafeHtmlWarning;
+  private static boolean gaveLazyBuildersWarning;

   /**
* Given a UiBinder interface, return the path to its ui.xml file,  
suitable

@@ -212,7 +213,14 @@
   }

   private Boolean useLazyWidgetBuilders(MortalLogger logger,  
PropertyOracle propertyOracle) {
-return extractConfigProperty(logger, propertyOracle,  
LAZY_WIDGET_BUILDERS_PROPERTY, false);
+Boolean rtn = extractConfigProperty(logger, propertyOracle,  
LAZY_WIDGET_BUILDERS_PROPERTY, false);

+if (!gaveLazyBuildersWarning && !rtn) {
+  logger.warn("Configuration property %s is false. Deprecated code  
generation is in play. " +

+  "This property will soon become a no-op.",
+  LAZY_WIDGET_BUILDERS_PROPERTY);
+  gaveLazyBuildersWarning = true;
+}
+return rtn;
   }

   private Boolean useSafeHtmlTemplates(MortalLogger logger, PropertyOracle  
propertyOracle) {

@@ -221,7 +229,8 @@

 if (!gaveSafeHtmlWarning && !rtn) {
   logger.warn("Configuration property %s is false! UiBinder SafeHtml  
integration is off, "
-  + "leaving your users more vulnerable to cross-site scripting  
attacks.",
+  + "leaving your users more vulnerable to cross-site scripting  
attacks. This property " +
+  "will soon become a no-op, and SafeHtml integration will always  
be on.",

   XSS_SAFE_CONFIG_PROPERTY);
   gaveSafeHtmlWarning = true;
 }
Index: user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
===
--- user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	(revision  
10724)
+++ user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java	(working  
copy)

@@ -1006,7 +1006,7 @@
*/
   public String tokenForSafeUriExpression(XMLElement source, String  
expression) {

 if (!useSafeHtmlTemplates) {
-  return tokenForStringExpression(source, expression + ".asString()");
+  return tokenForStringExpression(source, expression);
 }

 htmlTemplates.noteUri(expression);


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