Will GWT Designer work with gwittir widgets?

GWT Designer allows you to quickly create the modules, composites, panels, remote services and other elements that comprise Google Web Tookit applications.

Moderators: Konstantin.Scheglov, gnebling, Alexander.Mitin, jwren, Eric Clayberg

Will GWT Designer work with gwittir widgets?

Postby mmonette » Thu Mar 27, 2008 12:16 pm

I'm attempting to add gwittir bound widgets to a GWT Designer project. When I do, I get the exception below (bottom of message):

Are the gwittir widgets incompatible with GWT Designer, or is this a configuration issue? I'm interested in using gwittir for the databinding/validation facilities. If it's not compatible with Designer, is there a similar framework anyone can recommend?

Thanks
Mike Monette


com.swtdesigner.properties.PropertyException: Designer is unable to create the 'textBox' component at line 21 of GwittirHelloPanel.java, using public com.totsp.gwittir.client.ui.TextBox() and arguments {}.
This can be caused by problems evaluating the arguments of the constructor, or by any other problem that triggers an exception in the component when instantiated.
See your Eclipse <workspace>.metadata\.log file for details.
null
at com.swtdesigner.model.swt.widgets.ConstructorSourcePropertiesHelper.createObject(ConstructorSourcePropertiesHelper.java:274)
at com.swtdesigner.gwt.model.widgets.UIObjectInfo.createWidgetInstance(UIObjectInfo.java:312)
at com.swtdesigner.gwt.model.widgets.panel.CompositeInfo.createWidgetInstance(CompositeInfo.java:42)
at com.swtdesigner.gwt.model.widgets.UIObjectInfo.createWidget(UIObjectInfo.java:264)
at com.swtdesigner.gwt.model.widgets.WidgetInfo.createWidget(WidgetInfo.java:178)
at com.swtdesigner.gwt.model.widgets.panel.AbstractContainerInfo.createWidget(AbstractContainerInfo.java:182)
at com.swtdesigner.gwt.model.widgets.panel.AbstractContainerInfo.createChildrenWidgets(AbstractContainerInfo.java:202)
at com.swtdesigner.gwt.model.widgets.panel.AbstractContainerInfo.createWidget(AbstractContainerInfo.java:183)
at com.swtdesigner.gwt.model.widgets.panel.AbstractContainerInfo.createChildrenWidgets(AbstractContainerInfo.java:202)
at com.swtdesigner.gwt.model.widgets.panel.AbstractContainerInfo.createWidget(AbstractContainerInfo.java:183)
at com.swtdesigner.gwt.model.widgets.panel.ThisCompositeInfo.createWidget(ThisCompositeInfo.java:211)
at com.swtdesigner.gwt.model.widgets.panel.ThisCompositeInfo.createGUIComponent(ThisCompositeInfo.java:203)
at com.swtdesigner.model.JavaInfo$18.execute(JavaInfo.java:5610)
at com.swtdesigner.model.swing.properties.custom.DesignTimeHelper.execute(DesignTimeHelper.java:54)
at com.swtdesigner.model.JavaInfo.notifyPropertyChanged(JavaInfo.java:5605)
at com.swtdesigner.model.JavaInfo.notifyPropertyChanged(JavaInfo.java:5586)
at com.swtdesigner.model.JavaInfo.unlockNotify(JavaInfo.java:5557)
at com.swtdesigner.model.JavaInfo.endEdit(JavaInfo.java:771)
at com.swtdesigner.gef.command.common.AddControlCommand.execute(AddControlCommand.java:28)
at org.eclipse.gef.commands.CommandStack.execute(CommandStack.java:78)
at com.swtdesigner.gef.domain.DesignerEditDomain$1.execute(DesignerEditDomain.java:54)
at org.eclipse.gef.tools.AbstractTool.executeCurrentCommand(AbstractTool.java:416)
at org.eclipse.gef.tools.CreationTool.performCreation(CreationTool.java:198)
at org.eclipse.gef.tools.CreationTool.handleButtonUp(CreationTool.java:122)
at org.eclipse.gef.tools.AbstractTool.mouseUp(AbstractTool.java:1006)
at org.eclipse.gef.EditDomain.mouseUp(EditDomain.java:229)
at com.swtdesigner.gef.domain.DesignerEditDomain.mouseUp(DesignerEditDomain.java:262)
at org.eclipse.gef.ui.parts.DomainEventDispatcher.dispatchMouseReleased(DomainEventDispatcher.java:346)
at org.eclipse.draw2d.LightweightSystem$EventHandler.mouseUp(LightweightSystem.java:511)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:206)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
Caused by: java.lang.NoClassDefFoundError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.swtdesigner.model.swt.widgets.ConstructorSourcePropertiesHelper.createObject(ConstructorSourcePropertiesHelper.java:271)
... 53 more
mmonette
 
Posts: 1
Joined: Thu Mar 27, 2008 12:08 pm

Re: Will GWT Designer work with gwittir widgets?

Postby Eric Clayberg » Thu Mar 27, 2008 1:45 pm

I don't know anything about those widgets.

General information about what is required for a custom widget to work with GWT Designer can be found in the GWT Designer FAQ.

The most common problem with custom widgets is the lack of a default (zero-argument) constructor.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA

Re: Will GWT Designer work with gwittir widgets?

Postby peterblazejewicz » Thu Mar 27, 2008 2:30 pm

hi Eric,

maybe issue is that gwittir composites (projects implements gwt composite based composition pattern to add bindings and other things to existing widgets) do not instantiate within constructor but as private field? They basically follow GWTD rules: public default constructor (always present) and parametrized constructors in a way like:
Code: Select all
private Label base = new Label();
/* constructor */
public MyLabel(){
   init();
}
public MyLabel(String text){
   init();
   setText(text0;
}
///
protected void init(){
   // modify base widget with additional init related data
   initWidget(base);
}

http://code.google.com/p/gwittir/source ... client/ui/
because they implement composition using GWT Composite widget there should be no issues I think, however that private field instantiations is something I would check,

regards
Peter
Peter Blazejewicz
GWT groups profile
peterblazejewicz
 
Posts: 153
Joined: Fri Jul 27, 2007 7:09 pm
Location: Europe/Poland/Warsaw

Re: Will GWT Designer work with gwittir widgets?

Postby Eric Clayberg » Fri Mar 28, 2008 4:12 am

GWT Designer won't care about instantiating within a private field like that.

It will care if the component throws an exception during instantiation.
Eric Clayberg
Software Engineering Manager
Google
http://code.google.com/webtoolkit/download.html

Author: "Eclipse Plug-ins"
http://www.qualityeclipse.com
Eric Clayberg
Moderator
 
Posts: 4503
Joined: Tue Sep 30, 2003 6:39 am
Location: Boston, MA USA


Return to GWT Designer

Who is online

Users browsing this forum: No registered users and 3 guests