questions about the designer

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

questions about the designer

Postby costa_basil » Tue Feb 06, 2007 9:36 pm

1. Is it possible to add more than one entrypoint to a module? I know gwt allows you to add more than one entry point to a module but I haven't been able to do so in gwt designer. There is no New Entry Point option.

2. I created a dynamic web project in eclipse and I added a gwt module using googlipse (http://www.googlipse.com). Then I tried to make it a gwt project but doing so doesn't seem to have any effect. I tried to open an EntryPoint class created by googlipse but the designer is not available.

What I am trying to say is - let's ignore googlipse - I have a big enterprise web project using weblogic and jsf (myfaces). I was very impressed with the Gwt Designer, and I want to use gwt in my project because the designer makes the page creation much easier. But I am having a hard time trying to fit GWT in my project structure and GWT Designer doesn't make this job easier. I wish it gave me a bit more freedom over where to create things (for instance i want to place the server class somewhere other than <module package>.server. Then it would be nice to be able to open an EntryPoint class in design mode even if that class was not created using the GWT Designer. The designer doesn't seem to work on an EntryPoint that was not created with GWTD. The palette is empty even if the class is fine.

3. Does Gwt Designer keep the RemoteService class and the Async interface and possibly the client interface in sync?


Thanks
costa_basil
 
Posts: 8
Joined: Tue Feb 06, 2007 4:14 pm

questions about the designer

Postby costa_basil » Tue Feb 06, 2007 9:41 pm

Now, after I submitted the previous message, gwtd got screwed up somehow, and when I try to open an EntryPoint class in designer (the class was created using the GWD) I get the following messages:


A Runtime Error has occurred.
Do you wish to Debug?

Line: 1
$wnd is undefined

After I click No, I get:

A Runtime Error has occurred.
Do you wish to Debug?

Line: 0
Error: '__eventBits' is null or not an object


The designer displays unknown window type. The palette is empty.

I tried uninstalling and reinstalling gwtd and it still returns the same error.

and here is the log content:

!MESSAGE Designer internal error [6.1.0.20070130125037]: java.lang.reflect.InvocationTargetException
!STACK 0
com.swtdesigner.properties.PropertyException: java.lang.reflect.InvocationTargetException
at com.swtdesigner.gwt.model.GWTJavaInfoFactory.create(GWTJavaInfoFactory.java:96)
at com.swtdesigner.model.parser.factory.JavaInfoFactory.create(JavaInfoFactory.java:108)
at com.swtdesigner.model.parser.factory.JavaInfoFactory.create(JavaInfoFactory.java:92)
at com.swtdesigner.model.parser.factory.JavaInfoFactory.create(JavaInfoFactory.java:85)
at com.swtdesigner.model.parser.JavaInfoParser$ParserVisitor.endVisit(JavaInfoParser.java:1291)
at org.eclipse.jdt.core.dom.ClassInstanceCreation.accept0(ClassInstanceCreation.java:336)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2513)
at org.eclipse.jdt.core.dom.Assignment.accept0(Assignment.java:311)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2513)
at org.eclipse.jdt.core.dom.ExpressionStatement.accept0(ExpressionStatement.java:143)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2536)
at org.eclipse.jdt.core.dom.Block.accept0(Block.java:135)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466)
at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2513)
at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:501)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466)
at com.swtdesigner.model.parser.JavaInfoParser$ParserVisitor.visit(JavaInfoParser.java:2705)
at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:466)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466)
at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2536)
at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212)
at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466)
at com.swtdesigner.model.parser.JavaInfoParser.parse(JavaInfoParser.java:202)
at com.swtdesigner.gef.DesignerEditor.parseCompilationUnit(DesignerEditor.java:1064)
at com.swtdesigner.gef.DesignerEditor$17.execute(DesignerEditor.java:1001)
at com.swtdesigner.model.swing.properties.custom.DesignTimeHelper.execute(DesignTimeHelper.java:54)
at com.swtdesigner.gef.DesignerEditor.handleActivate(DesignerEditor.java:995)
at com.swtdesigner.gef.DesignerEditor.handleActivate(DesignerEditor.java:991)
at com.swtdesigner.editors.MultiPageEditor.showDesignEditor(MultiPageEditor.java:413)
at com.swtdesigner.editors.MultiPageEditor$2.widgetSelected(MultiPageEditor.java:183)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:952)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:937)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:709)
at org.eclipse.swt.custom.CTabFolder.setSelection(CTabFolder.java:3171)
at org.eclipse.swt.custom.CTabFolder.onMouse(CTabFolder.java:1953)
at org.eclipse.swt.custom.CTabFolder$1.handleEvent(CTabFolder.java:288)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95)
at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at com.swtdesigner.gwt.model.GWTJavaInfoFactory.create(GWTJavaInfoFactory.java:88)
... 63 more
Caused by: org.apache.commons.lang.exception.NestableError: org.eclipse.swt.SWTException: Failed to change Variant type result = -2147352571
at com.swtdesigner.gwt.model.widgets.UIObjectInfo.getState(UIObjectInfo.java:323)
at com.swtdesigner.gwt.model.widgets.UIObjectInfo.classByName(UIObjectInfo.java:143)
at com.swtdesigner.gwt.model.widgets.UIObjectInfo.<init>(UIObjectInfo.java:59)
at com.swtdesigner.gwt.model.widgets.WidgetInfo.<init>(WidgetInfo.java:48)
at com.swtdesigner.gwt.model.widgets.FocusWidgetInfo.<init>(FocusWidgetInfo.java:17)
at com.swtdesigner.gwt.model.widgets.button.ButtonBaseInfo.<init>(ButtonBaseInfo.java:25)
at com.swtdesigner.gwt.model.widgets.button.ButtonInfo.<init>(ButtonInfo.java:28)
... 68 more
Caused by: org.eclipse.swt.SWTException: Failed to change Variant type result = -2147352571
at org.eclipse.swt.ole.win32.OLE.error(OLE.java:332)
at com.swtdesigner.gwt.support.ole.Variant2.getInt(Variant2.java:577)
at com.swtdesigner.gwt.support.host.ModuleSpaceIE6.invokeNativeInt(ModuleSpaceIE6.java:215)
at com.swtdesigner.gwt.support.host.JavaScriptHost.invokeNativeInt(JavaScriptHost.java:77)
at com.google.gwt.user.client.impl.DOMImpl.getEventsSunk(DOMImpl.java)
at com.google.gwt.user.client.DOM.getEventsSunk(DOM.java:605)
at com.google.gwt.user.client.ui.UIObject.sinkEvents(UIObject.java:310)
at com.google.gwt.user.client.ui.FocusWidget.<init>(FocusWidget.java:59)
at com.google.gwt.user.client.ui.ButtonBase.<init>(ButtonBase.java:34)
at com.google.gwt.user.client.ui.Button.<init>(Button.java:57)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
at java.lang.Class.newInstance0(Class.java:350)
at java.lang.Class.newInstance(Class.java:303)
at com.swtdesigner.gwt.model.widgets.support.GWTState.initClassesAndMethods(GWTState.java:428)
at com.swtdesigner.gwt.model.widgets.support.GWTState.<init>(GWTState.java:145)
at com.swtdesigner.gwt.support.browser.ie.GWTStateIE6.<init>(GWTStateIE6.java:30)
at com.swtdesigner.gwt.support.browser.ie.BrowserSupportFactory.createState(BrowserSupportFactory.java:12)
at com.swtdesigner.gwt.model.widgets.support.GWTState.createState(GWTState.java:1385)
at com.swtdesigner.gwt.model.widgets.UIObjectInfo.getState(UIObjectInfo.java:320)
... 74 more

and the javascript script is this:

window["@com.google.gwt.user.client.impl.DOMImplIE6::init()"] = function() { // Set up event dispatchers.
$wnd.__dispatchEvent = function() {
if ($wnd.event.returnValue == null) {
$wnd.event.returnValue = true;
if (!__static["@com.google.gwt.user.client.DOM::previewEvent(Lcom/google/gwt/user/client/Event;)"]($wnd.event))
return;
}

var listener, curElem = this;
while (curElem && !(listener = curElem.__listener))
curElem = curElem.parentElement;

if (listener)
__static["@com.google.gwt.user.client.DOM::dispatchEvent(Lcom/google/gwt/user/client/Event;Lcom/google/gwt/user/client/Element;Lcom/google/gwt/user/client/EventListener;)"]($wnd.event, curElem, listener);
};

$wnd.__dispatchDblClickEvent = function() {
var newEvent = $doc.createEventObject();
this.fireEvent('onclick', newEvent);
if (this.__eventBits & 2)
$wnd.__dispatchEvent.call(this);
};

$doc.body.onclick =
$doc.body.onmousedown =
$doc.body.onmouseup =
$doc.body.onmousemove =
$doc.body.onkeydown =
$doc.body.onkeypress =
$doc.body.onkeyup =
$doc.body.onfocus =
$doc.body.onblur =
$doc.body.ondblclick = $wnd.__dispatchEvent; };
costa_basil
 
Posts: 8
Joined: Tue Feb 06, 2007 4:14 pm

Postby costa_basil » Wed Feb 07, 2007 9:21 am

The problem has been corrected after I rebooted the computer.
costa_basil
 
Posts: 8
Joined: Tue Feb 06, 2007 4:14 pm

Postby costa_basil » Wed Feb 07, 2007 9:35 am

Another shortcoming of the tool is the inability to deploy more than one module in a war file.
costa_basil
 
Posts: 8
Joined: Tue Feb 06, 2007 4:14 pm

Re: questions about the designer

Postby Eric Clayberg » Thu Feb 08, 2007 1:55 pm

costa_basil wrote:1. Is it possible to add more than one entrypoint to a module? I know gwt allows you to add more than one entry point to a module but I haven't been able to do so in gwt designer. There is no New Entry Point option.

The latest build includes a New > Designer > GWT > EntryPoint wizard.

Image Image

costa_basil wrote:2. I created a dynamic web project in eclipse and I added a gwt module using googlipse (http://www.googlipse.com). Then I tried to make it a gwt project but doing so doesn't seem to have any effect. I tried to open an EntryPoint class created by googlipse but the designer is not available.

What do you mean by "designer is not available"?

costa_basil wrote:Then it would be nice to be able to open an EntryPoint class in design mode even if that class was not created using the GWT Designer. The designer doesn't seem to work on an EntryPoint that was not created with GWTD. The palette is empty even if the class is fine.

Designer can edit EntryPoint classes that it did not create, but, without a test case, there is little we can do to help you.

In order for Designer to edit any GWT GUI class, the following conditions should be satisfied:

    1. the class path should be correct
    2. the GUI class should be located in the "client" of some GWT module
costa_basil wrote:3. Does Gwt Designer keep the RemoteService class and the Async interface and possibly the client interface in sync?

Yes. See the RemoteServices and Refactoring docs.

Image

Image

Image

costa_basil wrote:Another shortcoming of the tool is the inability to deploy more than one module in a war file.

We are planning to make the deployment option more flexible in the future.

Note that GWT Designer generates a build.xml file (an Ant script) in the same directory as the module.gwt.xml file. You can copy that file and modify it to address more sophisticated deployment scenarios.

Image
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