Re: [gwt-contrib] now.. afetr GWT 2.0?
On Dec 17, 2009, at 3:03 PM, Arthur Kalmenson wrote: >> Working on a draft one. >> What do folks here think is important? > > - data binding and validation frameworks, which would remove a _lot_ > of boiler plate code and greatly increase productivity. > - incubator clean up and perhaps splitting it into multiple projects? Also, take a look at http://code.google.com/p/gwt-pectin/ that is a data binding and validation framework that uses HasValue as basis. It would also be neat with a "Enablable" interface to slap on everything that has setEnabled. > GWT 2.0 release is awesome, thanks for all the great work! > > -- > Arthur Kalmenson > > > > On Wed, Dec 16, 2009 at 12:01 PM, Bruce Johnson wrote: >> Working on a draft one. >> What do folks here think is important? >> >> On Wed, Dec 16, 2009 at 7:42 AM, tfreitas wrote: >>> >>> What about roadmap? >>> >>> -- >>> http://groups.google.com/group/Google-Web-Toolkit-Contributors >> >> -- >> http://groups.google.com/group/Google-Web-Toolkit-Contributors > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] now.. afetr GWT 2.0?
On Dec 17, 2009, at 3:03 PM, Arthur Kalmenson wrote: >> Working on a draft one. >> What do folks here think is important? > > - data binding and validation frameworks, which would remove a _lot_ > of boiler plate code and greatly increase productivity. Absolutely! > - incubator clean up and perhaps splitting it into multiple projects? Yes, It would be nice to clean up the scrolltable and put it in a separate project. > GWT 2.0 release is awesome, thanks for all the great work! I agree. Thank you! -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7333 committed - Move more IE6 urls out of war and into resource space...
Revision: 7333 Author: rj...@google.com Date: Thu Dec 17 23:02:13 2009 Log: Move more IE6 urls out of war and into resource space Review by bobv Manually tested on Safari, Ie6, Ie7, Mac Chrome http://code.google.com/p/google-web-toolkit/source/detail?r=7333 Added: /trunk/samples/mail/src/com/google/gwt/sample/mail/client/contactsgroup_ie6.gif /trunk/samples/mail/src/com/google/gwt/sample/mail/client/mailboxesgroup_ie6.gif /trunk/samples/mail/src/com/google/gwt/sample/mail/client/tasksgroup_ie6.gif Deleted: /trunk/samples/mail/war/contactsgroup_ie6.gif /trunk/samples/mail/war/mailboxesgroup_ie6.gif /trunk/samples/mail/war/tasksgroup_ie6.gif Modified: /trunk/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml === --- /dev/null +++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/contactsgroup_ie6.gif Thu Dec 17 23:02:13 2009 Binary file, no diff available. === --- /dev/null +++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/mailboxesgroup_ie6.gif Thu Dec 17 23:02:13 2009 Binary file, no diff available. === --- /dev/null +++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/tasksgroup_ie6.gif Thu Dec 17 23:02:13 2009 Binary file, no diff available. === --- /trunk/samples/mail/war/contactsgroup_ie6.gif Tue Nov 17 14:23:51 2009 +++ /dev/null Binary file, no diff available. === --- /trunk/samples/mail/war/mailboxesgroup_ie6.gif Tue Nov 17 14:23:51 2009 +++ /dev/null Binary file, no diff available. === --- /trunk/samples/mail/war/tasksgroup_ie6.gif Tue Nov 17 14:23:51 2009 +++ /dev/null Binary file, no diff available. === --- /trunk/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml Tue Nov 24 14:14:51 2009 +++ /trunk/samples/mail/src/com/google/gwt/sample/mail/client/Shortcuts.ui.xml Thu Dec 17 23:02:13 2009 @@ -3,6 +3,13 @@ xmlns:g='urn:import:com.google.gwt.user.client.ui' xmlns:mail='urn:import:com.google.gwt.sample.mail.client'> + + + + + .shortcuts { border-left: 1px solid #999; @@ -24,26 +31,30 @@ } @if user.agent ie6 { - .mailboxesIcon { - background-image: url(mailboxesgroup_ie6.gif); - width: 31px; - height: 22px; - float: left; - } - - .tasksIcon { - background-image: url(tasksgroup_ie6.gif); +@url mailboxesgroupIe6 mailboxesgroupIe6Data; +@url tasksgroupIe6 tasksgroupIe6Data; +@url contactsgroupIe6 contactsgroupIe6Data; + +.mailboxesIcon { + background-image: mailboxesgroupIe6; width: 31px; height: 22px; - float: left; - } - - .contactsIcon { - background-image: url(contactsgroup_ie6.gif); + float: left; +} + +.tasksIcon { + background-image: tasksgroupIe6; width: 31px; height: 22px; - float: left; - } + float: left; +} + +.contactsIcon { + background-image: contactsgroupIe6; + width: 31px; + height: 22px; + float: left; +} } @else { @sprite .mailboxesIcon { gwt-image: 'mailboxesgroup'; @@ -59,7 +70,7 @@ gwt-image: 'contactsgroup'; float: left; } - } + } -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Framework naming question
Hi Toth I would suggest not to use gwt-from-x as it sounds like you wrote gwt. I would suggest either something dash / for gwt so it's named along the style log4j where log is your something etc. Hth On 18/12/2009, at 10:11 AM, Tóth Imre wrote: > Hi All! > > Within a few weeks I gonna release a framework. I would nami ie > GWTFromALLIn, or just Simple FormALLIn. Because I have written it > completely for developing GWT applications I would use the first > mentioned. Do you think is it a problem, or "legal"? > > Maybe a good question, maybe not. > > tnx > > Best Regards > Tóth Imre > > Save a tree...Think before you print > > > Sent from Debrecen, HB, Hungary > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Move more ie6 gis into resource space in Mail sample
LGTM http://gwt-code-reviews.appspot.com/126808 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Move more ie6 gis into resource space in Mail sample
ping http://gwt-code-reviews.appspot.com/126808 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7332 committed - Fix a bug where Collections.unmodifiableMap's entrySet toArray method ...
Revision: 7332 Author: j...@google.com Date: Thu Dec 17 20:58:44 2009 Log: Fix a bug where Collections.unmodifiableMap's entrySet toArray method tries to wrap extra elements in the array, including the null marking the end of the elements. Also, fixed a bug where toArray() went through the array twice and cleaned up CollectionsTest (generics, sort order). Patch by: hhchan, jat Review by: jat http://code.google.com/p/google-web-toolkit/source/detail?r=7332 Modified: /trunk/user/super/com/google/gwt/emul/java/util/Collections.java /trunk/user/test/com/google/gwt/emultest/java/util/CollectionsTest.java === --- /trunk/user/super/com/google/gwt/emul/java/util/Collections.javaFri Oct 9 15:22:16 2009 +++ /trunk/user/super/com/google/gwt/emul/java/util/Collections.javaThu Dec 17 20:58:44 2009 @@ -230,20 +230,32 @@ } @Override - @SuppressWarnings("unchecked") public Object[] toArray() { -return toArray(super.toArray()); +Object[] array = super.toArray(); +wrap(array, array.length); +return array; } @Override @SuppressWarnings("unchecked") public T[] toArray(T[] a) { Object[] result = super.toArray(a); -for (int i = 0, c = result.length; i < c; ++i) { - result[i] = new UnmodifiableEntry((Map.Entry) result[i]); -} +wrap(result, coll.size()); return (T[]) result; } + + /** + * Wrap an array of Map.Entries as UnmodifiableEntries. + * + * @param array array to wrap + * @param size number of entries to wrap + */ + @SuppressWarnings("unchecked") + private void wrap(Object[] array, int size) { +for (int i = 0; i < size; ++i) { + array[i] = new UnmodifiableEntry((Map.Entry) array[i]); +} + } } private transient UnmodifiableSet> entrySet; === --- /trunk/user/test/com/google/gwt/emultest/java/util/CollectionsTest.java Tue Apr 29 11:01:50 2008 +++ /trunk/user/test/com/google/gwt/emultest/java/util/CollectionsTest.java Thu Dec 17 20:58:44 2009 @@ -19,34 +19,36 @@ import java.util.Arrays; import java.util.Collections; import java.util.Comparator; -import java.util.LinkedHashMap; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.Map.Entry; /** - * TODO: document me. + * Test various collections. */ public class CollectionsTest extends EmulTestBase { - LinkedHashMap dummy() { -return new LinkedHashMap(); + public static List createRandomList() { +ArrayList l = new ArrayList(); +l.add(new Integer(5)); +l.add(new Integer(2)); +l.add(new Integer(3)); +l.add(new Integer(1)); +l.add(new Integer(4)); +return l; } - public static List createSortedList() { -ArrayList l = new ArrayList(); + public static List createSortedList() { +ArrayList l = new ArrayList(); l.add("a"); l.add("b"); l.add("c"); return l; } - public static List createRandomList() { -ArrayList l = new ArrayList(); -l.add(new Integer(5)); -l.add(new Integer(2)); -l.add(new Integer(3)); -l.add(new Integer(1)); -l.add(new Integer(4)); -return l; + private static Entry dummyEntry() { +return Collections.singletonMap("foo", "bar").entrySet().iterator().next(); } /** @@ -57,15 +59,17 @@ * smaller than all elements */ public void testBinarySearchObject() { -List a1 = new ArrayList(); +List a1 = new ArrayList(); int ret = Collections.binarySearch(a1, ""); assertEquals(-1, ret); -List a2 = new ArrayList(Arrays.asList(new String[] {"a", "g", "y"})); +List a2 = new ArrayList(Arrays.asList(new String[] { +"a", "g", "y"})); ret = Collections.binarySearch(a2, "c"); assertEquals(-2, ret); ret = Collections.binarySearch(a2, "y"); assertEquals(2, ret); -List a3 = new ArrayList(Arrays.asList(new String[] {"b", "c", "x", "y"})); +List a3 = new ArrayList(Arrays.asList(new String[] { +"b", "c", "x", "y"})); ret = Collections.binarySearch(a3, "z"); assertEquals(-5, ret); ret = Collections.binarySearch(a3, "a"); @@ -82,20 +86,22 @@ * smaller than all elements null Comparator uses natural ordering */ public void testBinarySearchObjectComparator() { -Comparator inverseSort = new Comparator() { - public int compare(Object o1, Object o2) { -return ((Comparable) o2).compareTo(o1); +Comparator inverseSort = new Comparator() { + public int compare(String o1, String o2) { +return o2.compareTo(o1); } }; -List a1 = new ArrayList(); +List a1 = new ArrayList(); int ret = Collections.binarySearch(a1, "", inverseSort); assertEquals(-1, ret); -List a2 = new ArrayList(Arrays.asList(new Str
[gwt-contrib] [google-web-toolkit] r7331 committed - Add missing case for multiplier with a boxed long.
Revision: 7331 Author: j...@google.com Date: Thu Dec 17 17:06:04 2009 Log: Add missing case for multiplier with a boxed long. http://code.google.com/p/google-web-toolkit/source/detail?r=7331 Modified: /changes/jat/bigdecimal/user/src/com/google/gwt/i18n/client/NumberFormat.java === --- /changes/jat/bigdecimal/user/src/com/google/gwt/i18n/client/NumberFormat.java Thu Dec 17 16:21:13 2009 +++ /changes/jat/bigdecimal/user/src/com/google/gwt/i18n/client/NumberFormat.java Thu Dec 17 17:06:04 2009 @@ -863,6 +863,7 @@ if (isNegative) { longVal = -longVal; } + longVal *= multiplier; StringBuilder buf = new StringBuilder(); buf.append(String.valueOf(longVal)); format(isNegative, buf, 0); -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] BigDecimal, BigInteger, Random support
Reviewers: rice+legacy, richard, Description: This adds support for the above, derived from the gwt-java-math package which itself was derived from Apache Harmony. I think this is ready to go in as-is, and we can add to it later. The remaining tasks before checking into trunk: - get CLA from Richard - get Legal signoff on copyright headers In a separate commit, I will add support to NumberFormat to parse BigDecimal/BigInteger values. Please review this at http://gwt-code-reviews.appspot.com/126811 Affected files: branch-info.txt eclipse/dev/.classpath eclipse/dev/.project eclipse/lang/.project eclipse/plugins/MissingPlugin/.classpath eclipse/plugins/MissingPlugin/.project eclipse/samples/Hello/.project eclipse/samples/Hello/Hello-gwtc.launch eclipse/samples/Hello/Hello.launch eclipse/samples/Mail/.project eclipse/samples/Showcase/.project eclipse/user/.project plugins/common/HostChannel.cpp plugins/npapi/prebuilt/gwt-dev-plugin/manifest.json plugins/xpcom/ExternalWrapper.cpp plugins/xpcom/prebuilt/gwt-dev-plugin.xpi samples/hello/src/com/google/gwt/sample/hello/client/Hello.java user/src/com/google/gwt/i18n/client/NumberFormat.java user/src/com/google/gwt/i18n/rebind/MessagesMethodCreator.java user/src/com/google/gwt/user/client/rpc/core/java/math/BigDecimal_CustomFieldSerializer.java user/src/com/google/gwt/user/client/rpc/core/java/math/BigInteger_CustomFieldSerializer.java user/src/com/google/gwt/user/client/rpc/core/java/math/MathContext_CustomFieldSerializer.java user/super/com/google/gwt/emul/java/lang/ArithmeticException.java user/super/com/google/gwt/emul/java/lang/Float.java user/super/com/google/gwt/emul/java/math/BigDecimal.java user/super/com/google/gwt/emul/java/math/BigInteger.java user/super/com/google/gwt/emul/java/math/BitLevel.java user/super/com/google/gwt/emul/java/math/Conversion.java user/super/com/google/gwt/emul/java/math/Division.java user/super/com/google/gwt/emul/java/math/Elementary.java user/super/com/google/gwt/emul/java/math/Logical.java user/super/com/google/gwt/emul/java/math/MathContext.java user/super/com/google/gwt/emul/java/math/Multiplication.java user/super/com/google/gwt/emul/java/math/Primality.java user/super/com/google/gwt/emul/java/math/RoundingMode.java user/super/com/google/gwt/emul/java/util/Random.java user/test/com/google/gwt/emultest/EmulSuite.java user/test/com/google/gwt/emultest/java/lang/FloatTest.java user/test/com/google/gwt/emultest/java/math/BigDecimalArithmeticTest.java user/test/com/google/gwt/emultest/java/math/BigDecimalCompareTest.java user/test/com/google/gwt/emultest/java/math/BigDecimalConstructorsTest.java user/test/com/google/gwt/emultest/java/math/BigDecimalConvertTest.java user/test/com/google/gwt/emultest/java/math/BigDecimalScaleOperationsTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerAddTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerAndTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerCompareTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerConstructorsTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerConvertTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerDivideTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerHashCodeTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerModPowTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerMultiplyTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerNotTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerOperateBitsTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerOrTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerSubtractTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerToStringTest.java user/test/com/google/gwt/emultest/java/math/BigIntegerXorTest.java user/test/com/google/gwt/emultest/java/util/RandomTest.java user/test/com/google/gwt/i18n/client/I18NTest.java user/test/com/google/gwt/i18n/client/NumberFormat_en_Test.java user/test/com/google/gwt/i18n/client/TestAnnotatedMessages.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7330 committed - Add Messages tests with BigDecimal/BigNumber/boxed numbers.
Revision: 7330 Author: j...@google.com Date: Thu Dec 17 16:46:40 2009 Log: Add Messages tests with BigDecimal/BigNumber/boxed numbers. http://code.google.com/p/google-web-toolkit/source/detail?r=7330 Modified: /changes/jat/bigdecimal/user/test/com/google/gwt/i18n/client/I18NTest.java /changes/jat/bigdecimal/user/test/com/google/gwt/i18n/client/TestAnnotatedMessages.java === --- /changes/jat/bigdecimal/user/test/com/google/gwt/i18n/client/I18NTest.java Wed Jun 17 12:35:29 2009 +++ /changes/jat/bigdecimal/user/test/com/google/gwt/i18n/client/I18NTest.java Thu Dec 17 16:46:40 2009 @@ -33,6 +33,8 @@ import com.google.gwt.i18n.client.resolutiontest.Inners.InnerClass.LocalizableInnerInner; import com.google.gwt.junit.client.GWTTestCase; +import java.math.BigDecimal; +import java.math.BigInteger; import java.util.ArrayList; import java.util.Collection; import java.util.Date; @@ -558,6 +560,21 @@ assertEquals("nested dollar", m.nestedDollar()); assertEquals("estednay underscoray", m.nestedUnderscore()); } + + /** + * Test that messages works with Number subclasses. + */ + public void testNumber() { +TestAnnotatedMessages m = GWT.create(TestAnnotatedMessages.class); +BigInteger intVal = new BigInteger("100"); +assertEquals("Total is US$1,000,000,000,000,000,000.00", +m.withNumberCurrency(intVal)); +BigDecimal decVal = new BigDecimal("100.01"); +assertEquals("Total is US$1,000,000,000,000,000,000.01", +m.withNumberCurrency(decVal)); +assertEquals("Distance is 1.0E18", m.withNumberExponent(intVal)); +assertEquals("Distance is 100.0E6", m.withNumberExponent(1e8f)); + } public void testShapesFamily() { Shapes shapes = GWT.create(Shapes.class); === --- /changes/jat/bigdecimal/user/test/com/google/gwt/i18n/client/TestAnnotatedMessages.java Mon May 18 11:47:32 2009 +++ /changes/jat/bigdecimal/user/test/com/google/gwt/i18n/client/TestAnnotatedMessages.java Thu Dec 17 16:46:40 2009 @@ -88,4 +88,10 @@ @PluralText({"one", "A {0}"}) String twoParamPlural(String name, @PluralCount int count); -} + + @DefaultMessage("Total is {0,number,currency}") + String withNumberCurrency(Number value); + + @DefaultMessage("Distance is {0,number,##0.0##E0}") + String withNumberExponent(Number value); +} -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: now.. afetr GWT 2.0?
- Junit 4 support would be one great addition, as writing JUnit 3 tests is really a pain - the fake DOM structures that one of the GWT talks at Google IO talks about would be great as well (for the purposes of testing) - removing all the deprecated classes from the trunk (DevMode still warns about lots of them, and my understanding was that all of the deprecated classes would be removed in the 2.0 release) - one more thing (and this is a big one): make the compile process parallel; I'm not sure if this is at all possible, but I cannot think why not, at least to a certain degree. It seems that each new GWT release is adding more compiler optimizations, which is great, but all of these build up and the compile time increases. Making this parallel would probably be the single best improvement of GWT. - that's it for now, I'm sure the addition of closures to Java 7 makes possible a host of other compiler optimizations and changes for the better, so that will be great to see happening (when using Java 7 of course) Thanks for the great work on the 2.0 release. -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Framework naming question
Hi All! Within a few weeks I gonna release a framework. I would nami ie GWTFromALLIn, or just Simple FormALLIn. Because I have written it completely for developing GWT applications I would use the first mentioned. Do you think is it a problem, or "legal"? Maybe a good question, maybe not. tnx Best Regards Tóth Imre Save a tree...Think before you print Sent from Debrecen, HB, Hungary -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] uibinder and bnudled CSS
Definitely do need to escape, as you said. On Thursday, December 17, 2009, John Huss wrote: > I think you have to escape the css attributes that start with a dash > like this: > > \-moz-box-shadow: 2px 2px 5px #000; > > You should be getting a warning about it in dev mode if you are not - > making sure you having logging on at a good level. > > John > > On Dec 17, 6:03 am, "nicolas.deloof" wrote: >> Hi >> >> I'm migrating some nice HTML-fragment to GWT. Thanks to UiBinder this >> is really easy and I get a nice result in few hours. >> >> I notice the uiBinder seems to rewrite the CSS rules according to >> browser support (I may be wrong) : my CSS uses CSS3 box-shadow : >> >> box-shadow: 2px 2px 5px #000; >> -moz-box-shadow: 2px 2px 5px #000; >> -webkit-box-shadow: 2px 2px 5px #000; >> >> This works fine on my Chrome browser, but when I use the uibinder >> version I dont' have shadows anymore. The CSS rule filter should not >> remove any -webkit* rule when targeting a webkit based browser, >> sould'it ? Also the box-shadow is supported by recent webkit browsers >> (it is on chrome 4, but this is in the dev channel) >> >> 2nd question : If my CSS uses background-image: url(...), can I >> include those images in my ClientBundle and still make references to >> them in my CSS fragement ? >> >> Cheers, >> Nicolas > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors > -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: wrong DTD generated for modules in GEP
This one is better: http://google-web-toolkit.googlecode.com/svn/releases/2.0/distro-source/core/src/gwt-module.dtd On 17 dec, 16:56, Arthur Kalmenson wrote: > Hey everyone, > > I just noticed that the DTD used in the GWT modules generated by the > GEP is incorrect. It points > tohttp://google-web-toolkit.googlecode.com/svn/tags/2.0.0/distro-source... > which doesn't exist. Looks like the fix would be pretty easy though, > just create a 2.0.0 tag in the repo, > becausehttp://google-web-toolkit.googlecode.com/svn/tags/2.0.0-rc1/distro-so... > works. > > All the best, > -- > Arthur Kalmenson -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Call servlet.log(message) instead of servlet.log(message, (Throwable) null)
LGTM http://gwt-code-reviews.appspot.com/126809 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] [google-web-toolkit] r7328 committed - Fix NumberFormat to work with BigInteger/BigDecimal (using code/ideas ...
Revision: 7328 Author: j...@google.com Date: Thu Dec 17 14:28:24 2009 Log: Fix NumberFormat to work with BigInteger/BigDecimal (using code/ideas from Dan's implementation), fix bug present in Harmony, more tests. http://code.google.com/p/google-web-toolkit/source/detail?r=7328 Modified: /changes/jat/bigdecimal/user/src/com/google/gwt/i18n/client/NumberFormat.java /changes/jat/bigdecimal/user/super/com/google/gwt/emul/java/math/BigDecimal.java /changes/jat/bigdecimal/user/super/com/google/gwt/emul/java/math/BigInteger.java /changes/jat/bigdecimal/user/test/com/google/gwt/emultest/java/math/BigDecimalArithmeticTest.java /changes/jat/bigdecimal/user/test/com/google/gwt/emultest/java/math/BigIntegerConvertTest.java /changes/jat/bigdecimal/user/test/com/google/gwt/i18n/client/NumberFormat_en_Test.java === --- /changes/jat/bigdecimal/user/src/com/google/gwt/i18n/client/NumberFormat.java Sun Dec 13 22:19:25 2009 +++ /changes/jat/bigdecimal/user/src/com/google/gwt/i18n/client/NumberFormat.java Thu Dec 17 14:28:24 2009 @@ -15,7 +15,6 @@ */ package com.google.gwt.i18n.client; -import com.google.gwt.core.client.GWT; import com.google.gwt.i18n.client.constants.NumberConstants; import java.math.BigDecimal; @@ -610,7 +609,48 @@ } return "\u00A0"; } - + + /** + * Appends a scaled string representation to a buffer, returning the scale + * (which is the number of places to the right of the end of the string the + * decimal point should be moved -- i.e., 3.5 would be added to the buffer + * as "35" and a returned scale of -1). + * + * @param buf + * @param val + * @return scale to apply to the result + */ + // @VisibleForTesting + static int toScaledString(StringBuilder buf, double val) { +int startLen = buf.length(); +buf.append(toPrecision(val, 20)); +int scale = 0; + +// remove exponent if present, adjusting scale +int expIdx = buf.indexOf("e", startLen); +if (expIdx < 0) { + expIdx = buf.indexOf("E", startLen); +} +if (expIdx >= 0) { + int expDigits = expIdx + 1; + if (expDigits < buf.length() && buf.charAt(expDigits) == '+') { +++expDigits; + } + if (expDigits < buf.length()) { +scale = Integer.parseInt(buf.substring(expDigits)); + } + buf.delete(expIdx, buf.length()); +} + +// remove decimal point if present, adjusting scale +int dot = buf.indexOf(".", startLen); +if (dot >= 0) { + buf.deleteCharAt(dot); + scale -= buf.length() - dot; +} +return scale; + } + /** * Lookup a currency code. * @@ -628,31 +668,48 @@ return currencyData; } - private static native String toFixed(double d, int digits) /*-{ -return d.toFixed(digits); + /** + * Convert a double to a string with {...@code digits} precision. The resulting + * string may still be in exponential notation. + * + * @param d double value + * @param digits number of digits of precision to include + * @return non-localized string representation of {...@code d} + */ + private static native String toPrecision(double d, int digits) /*-{ +return d.toPrecision(digits); }-*/; - // The currency code. + /** + * The currency code. + */ private final String currencyCode; - // Currency setting. + /** + * Currency symbol to use. + */ private final String currencySymbol; - // Forces the decimal separator to always appear in a formatted number. + /** + * Forces the decimal separator to always appear in a formatted number. + */ private boolean decimalSeparatorAlwaysShown = false; - // The number of digits between grouping separators in the integer - // portion of a number. + /** + * The number of digits between grouping separators in the integer portion of + * a number. + */ private int groupingSize = 3; - + private boolean isCurrencyFormat = false; private int maximumFractionDigits = 3; // invariant, >= minFractionDigits. + private int maximumIntegerDigits = 40; private int minExponentDigits; private int minimumFractionDigits = 0; private int minimumIntegerDigits = 1; - + // The multiplier for use in percent, per mille, etc. private int multiplier = 1; @@ -673,6 +730,24 @@ // True to force the use of exponential (i.e. scientific) notation. private boolean useExponentialNotation = false; + /** + * Holds the current exponent during one call to + * {...@link #format(boolean, StringBuilder, int)}. + */ + private transient int exponent; + + /** + * Holds the current decimal position during one call to + * {...@link #format(boolean, StringBuilder, int)}. + */ + private transient int decimalPosition; + + /** + * Holds the current digits length during one call to + * {...@link #format(boolean, StringBuilder, int)}. + */ + private transient int digitsLength; + /** *
[gwt-contrib] Re: now.. afetr GWT 2.0?
+1 Databinding -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: uibinder and bnudled CSS
I think you have to escape the css attributes that start with a dash like this: \-moz-box-shadow: 2px 2px 5px #000; You should be getting a warning about it in dev mode if you are not - making sure you having logging on at a good level. John On Dec 17, 6:03 am, "nicolas.deloof" wrote: > Hi > > I'm migrating some nice HTML-fragment to GWT. Thanks to UiBinder this > is really easy and I get a nice result in few hours. > > I notice the uiBinder seems to rewrite the CSS rules according to > browser support (I may be wrong) : my CSS uses CSS3 box-shadow : > > box-shadow: 2px 2px 5px #000; > -moz-box-shadow: 2px 2px 5px #000; > -webkit-box-shadow: 2px 2px 5px #000; > > This works fine on my Chrome browser, but when I use the uibinder > version I dont' have shadows anymore. The CSS rule filter should not > remove any -webkit* rule when targeting a webkit based browser, > sould'it ? Also the box-shadow is supported by recent webkit browsers > (it is on chrome 4, but this is in the dev channel) > > 2nd question : If my CSS uses background-image: url(...), can I > include those images in my ClientBundle and still make references to > them in my CSS fragement ? > > Cheers, > Nicolas -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: Arrays implement Serializable and Cloneable
Mostly LGTM, just one concern. http://gwt-code-reviews.appspot.com/125803/diff/1/3 File dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java (right): http://gwt-code-reviews.appspot.com/125803/diff/1/3#newcode480 Line 480: } Might add these to INDEX_TYPES and nest inside that block, as in createClass(), and avoid the two string compares in the general case. http://gwt-code-reviews.appspot.com/125803/diff/1/3#newcode1032 Line 1032: allArrayTypes.add(arrayType); I know the current type hierarchy doesn't currently lend itself to this, but it kind of feels like we ought to add the two interfaces to the array type here, instead of hard coding the cast rules elsewhere. Guess it's a judgement call, but it feels kind of weird to have to encode special logic. For example, imagine 1) A slightly smarter implementation of JTypeOracle.canTheoerticallyCast() where one interface can be theoretically cast to another IFF there is some concrete instantiable type that implements both. 2) A program where an array type is the *only* instantiable object that implements both Clonable and Serializable. In that case, JTypeOracle.canTheoerticallyCast(Clonable, Serializable) ought to return true; but would return false without additional special-case logic. Just something to think about. http://gwt-code-reviews.appspot.com/125803 -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Re: now.. afetr GWT 2.0?
A lot of people are asking for a faster DevMode, is that because you are closing DevMode after every change? You don't have to do that, you can leave DevMode running for the entire day and just refresh the browser itself (while coding in whichever IDE you wish, as long as it's compiling the classes into the correct directory). If you make server side changes, you can just click the "Restart Server" button under the Jetty tab. Furthermore, GWT 2.0 adds the "-draftCompile" flag which, according to the GWT Blog http://googlewebtoolkit.blogspot.com/2009/12/introducing-google-web-toolkit-20-now.html "If you do need to compile to JavaScript often — though hopefully development mode will dramatically reduce your need to do so — you can use the GWT compiler's new -draftCompile flag, which speeds up compiles by skipping optimizations. To be clear, you definitely shouldn't deploy JavaScript compiled that way, but it can be a time saver during non-production continuous builds." -draftCompile in addition to restrictions to the user agent you compile to (if you can afford to do that during development), should make your compiles a lot faster. Hope that helps! All the best, -- Arthur Kalmenson On Thu, Dec 17, 2009 at 3:08 PM, Konstantin.Scheglov wrote: > > >> >> What do folks here think is important? > > +1 for faster DevMode startup. > I don't understand why it recompiles all Java classes again and > again, when Eclipse already has classes in "output" folder. > Plus performing JSNI code parsing and applying ASM converters > Would be great to cache all these things on disk and start... hm... > 10 times faster. ;-) > > -- > http://groups.google.com/group/Google-Web-Toolkit-Contributors -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Arrays implement Serializable and Cloneable
Reviewers: bobv, Description: Arrays implement Serializable and Cloneable. See: http://code.google.com/p/google-web-toolkit/issues/detail?id=1822 Please review this at http://gwt-code-reviews.appspot.com/125803 Affected files: dev/core/src/com/google/gwt/dev/jjs/ast/JProgram.java dev/core/src/com/google/gwt/dev/jjs/ast/JTypeOracle.java dev/core/test/com/google/gwt/dev/jjs/JjsTypeTest.java user/test/com/google/gwt/dev/jjs/test/ClassCastTest.java -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
[gwt-contrib] Re: now.. afetr GWT 2.0?
> > What do folks here think is important? +1 for faster DevMode startup. I don't understand why it recompiles all Java classes again and again, when Eclipse already has classes in "output" folder. Plus performing JSNI code parsing and applying ASM converters Would be great to cache all these things on disk and start... hm... 10 times faster. ;-) -- http://groups.google.com/group/Google-Web-Toolkit-Contributors
Re: [gwt-contrib] Inlining nocache.js
If it's the same error we ran into, it's that there are things that look like HTML script and comment tags in the linker script that throw the parser off. Note how we broke up the script start tags and comment start/end tags the same way as the script end tags: XSLinker: var compiledScriptTag = '""'; $doc.write('