aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2011-07-16 14:08:40 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2011-07-16 14:08:40 +0000
commit38025f89b5f8cebf8e85586cd56e02ec2f45af29 (patch)
tree885c6c46aad7535e89be41400a8da0ac087bde8e /src
parent9f3d8a400d8f1109f265d96a4e74321d06cd78a5 (diff)
downloadvaadin-framework-38025f89b5f8cebf8e85586cd56e02ec2f45af29.tar.gz
vaadin-framework-38025f89b5f8cebf8e85586cd56e02ec2f45af29.zip
duplicate instantiators are now not allowed. Helps GWT code splitting to do its magic properly.
svn changeset:19802/svn branch:6.6
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java b/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java
index a3f1c59846..7ad790e25e 100644
--- a/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java
+++ b/src/com/vaadin/terminal/gwt/widgetsetutils/WidgetMapGenerator.java
@@ -8,6 +8,7 @@ import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
+import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.TreeSet;
@@ -244,10 +245,16 @@ public class WidgetMapGenerator extends Generator {
boolean first = true;
ArrayList<Class<? extends Paintable>> lazyLoadedWidgets = new ArrayList<Class<? extends Paintable>>();
+
+ HashSet<Class<? extends com.vaadin.terminal.gwt.client.Paintable>> widgetsWithInstantiator = new HashSet<Class<? extends com.vaadin.terminal.gwt.client.Paintable>>();
+
for (Class<? extends Paintable> class1 : paintablesHavingWidgetAnnotation) {
ClientWidget annotation = class1.getAnnotation(ClientWidget.class);
Class<? extends com.vaadin.terminal.gwt.client.Paintable> clientClass = annotation
.value();
+ if(widgetsWithInstantiator.contains(clientClass)) {
+ continue;
+ }
if (clientClass == VView.class) {
// VView's are not instantiated by widgetset
continue;
@@ -288,6 +295,7 @@ public class WidgetMapGenerator extends Generator {
sourceWriter.print(");");
}
sourceWriter.print("}");
+ widgetsWithInstantiator.add(clientClass);
}
sourceWriter.println("}");