From: Matti Tahvonen Date: Fri, 25 Sep 2009 14:54:10 +0000 (+0000) Subject: GWT.create instead of _new_, making it possible for hc users to override implementations. X-Git-Tag: 6.7.0.beta1~2433^2~7 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=59d88071fd7d3004f08d91c406c7f27abc179691;p=vaadin-framework.git GWT.create instead of _new_, making it possible for hc users to override implementations. svn changeset:8942/svn branch:2009-09-widget-packaging_3332 --- diff --git a/src/com/vaadin/terminal/gwt/rebind/WidgetMapGenerator.java b/src/com/vaadin/terminal/gwt/rebind/WidgetMapGenerator.java index 73494ad785..270ab63702 100644 --- a/src/com/vaadin/terminal/gwt/rebind/WidgetMapGenerator.java +++ b/src/com/vaadin/terminal/gwt/rebind/WidgetMapGenerator.java @@ -72,6 +72,7 @@ public class WidgetMapGenerator extends Generator { // init composer, set class properties, create source writer ClassSourceFileComposerFactory composer = null; composer = new ClassSourceFileComposerFactory(packageName, className); + composer.addImport("com.google.gwt.core.client.GWT"); composer.setSuperclass("com.vaadin.terminal.gwt.client.WidgetMap"); SourceWriter sourceWriter = composer.createSourceWriter(context, printWriter); @@ -147,13 +148,13 @@ public class WidgetMapGenerator extends Generator { } sourceWriter.print("if ("); sourceWriter.print(clientClass.getName()); - sourceWriter.print(".class == classType) return new "); + sourceWriter.print(".class == classType) return GWT.create("); sourceWriter.print(clientClass.getName()); - sourceWriter.println("();"); + sourceWriter.println(".class );"); sourceWriter.print(" else "); } sourceWriter - .println("return new com.vaadin.terminal.gwt.client.ui.VUnknownComponent();"); + .println("return GWT.create( com.vaadin.terminal.gwt.client.ui.VUnknownComponent.class );"); sourceWriter.println("}"); }