Again error with handling actions

SWT Designer allows you to create the views, editors, perspectives, pref pages, composites, etc. that comprise Eclipse SWT & RCP applications and plug-ins.

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

Again error with handling actions

Postby CrystalPalace » Sun Sep 05, 2004 4:47 am

Hello Eric,

I just downloaded 2004.09.03 release and now whenever I create a new ApplicationWindow and try to add an action, two error dialogs occur with the following log messages:
Code: Select all
!SESSION Sep 05, 2004 14:41:45.343 ---------------------------------------------
eclipse.buildId=I200408122000
java.version=1.4.2_03
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=de_DE

!ENTRY org.eclipse.core.runtime 4 2 Sep 05, 2004 14:41:45.343
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.runtime".
!STACK 0
java.lang.NullPointerException
   at com.swtdesigner.model.swt.jface.action.ActionInfo.getTreeTitle(SourceFile:68)
   at com.swtdesigner.gef.common.property.d.getText(SourceFile:12)
   at org.eclipse.jface.viewers.TreeViewer.doUpdateItem(TreeViewer.java:123)
   at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:86)
   at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
   at org.eclipse.core.runtime.Platform.run(Platform.java:747)
   at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:488)
   at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:135)
   at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
   at org.eclipse.core.runtime.Platform.run(Platform.java:747)
   at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:1432)
   at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:402)
   at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:381)
   at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
   at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:361)
   at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel(AbstractTreeViewer.java:954)
   at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel(AbstractTreeViewer.java:963)
   at org.eclipse.jface.viewers.AbstractTreeViewer.internalExpandToLevel(AbstractTreeViewer.java:963)
   at org.eclipse.jface.viewers.AbstractTreeViewer.expandToLevel(AbstractTreeViewer.java:525)
   at org.eclipse.jface.viewers.AbstractTreeViewer.expandToLevel(AbstractTreeViewer.java:508)
   at org.eclipse.jface.viewers.AbstractTreeViewer.expandAll(AbstractTreeViewer.java:497)
   at com.swtdesigner.gef.common.property.DesignerEditorPropertyComposite.handleGUIPropertyChanged(SourceFile:368)
   at com.swtdesigner.gef.common.property.DesignerEditorPropertyComposite$4.propertyChanged(SourceFile:262)
   at com.swtdesigner.model.JavaInfo.notifyPropertyChanged(SourceFile:5296)
   at com.swtdesigner.model.swt.widgets.control.ControlInfo.notifyPropertyChanged(SourceFile:188)
   at com.swtdesigner.model.JavaInfo.notifyPropertyChanged(SourceFile:5247)
   at com.swtdesigner.model.JavaInfo.unlockNotify(SourceFile:5220)
   at com.swtdesigner.model.JavaInfo.endEdit(SourceFile:794)
   at com.swtdesigner.model.swt.jface.advanced.ActionsComposite.handleAddAction(SourceFile:837)
   at com.swtdesigner.model.swt.jface.advanced.j.widgetSelected(SourceFile:262)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
   at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1435)
   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1406)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:263)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144)
   at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102)
   at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
   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.core.launcher.Main.basicRun(Main.java:183)
   at org.eclipse.core.launcher.Main.run(Main.java:644)
   at org.eclipse.core.launcher.Main.main(Main.java:628)

!ENTRY org.eclipse.core.runtime 4 2 Sep 05, 2004 14:41:48.593
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.core.runtime".
!STACK 0
java.lang.NullPointerException
   at com.swtdesigner.model.swt.jface.action.ActionInfo.getViewerLabel(SourceFile:102)
   at com.swtdesigner.model.swt.jface.advanced.y.getText(SourceFile:79)
   at org.eclipse.jface.viewers.TreeViewer.doUpdateItem(TreeViewer.java:123)
   at org.eclipse.jface.viewers.AbstractTreeViewer$UpdateItemSafeRunnable.run(AbstractTreeViewer.java:86)
   at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
   at org.eclipse.core.runtime.Platform.run(Platform.java:747)
   at org.eclipse.jface.viewers.AbstractTreeViewer.doUpdateItem(AbstractTreeViewer.java:488)
   at org.eclipse.jface.viewers.StructuredViewer$UpdateItemSafeRunnable.run(StructuredViewer.java:135)
   at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:615)
   at org.eclipse.core.runtime.Platform.run(Platform.java:747)
   at org.eclipse.jface.viewers.StructuredViewer.updateItem(StructuredViewer.java:1432)
   at org.eclipse.jface.viewers.AbstractTreeViewer.createTreeItem(AbstractTreeViewer.java:402)
   at org.eclipse.jface.viewers.AbstractTreeViewer$1.run(AbstractTreeViewer.java:381)
   at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69)
   at org.eclipse.jface.viewers.AbstractTreeViewer.createChildren(AbstractTreeViewer.java:361)
   at org.eclipse.jface.viewers.AbstractTreeViewer.internalSetExpanded(AbstractTreeViewer.java:1166)
   at org.eclipse.jface.viewers.AbstractTreeViewer.setExpandedElements(AbstractTreeViewer.java:1382)
   at com.swtdesigner.model.swt.jface.advanced.ActionsComposite.expandActionFolders(SourceFile:489)
   at com.swtdesigner.model.swt.jface.advanced.ActionsComposite.propertyChanged(SourceFile:821)
   at com.swtdesigner.model.swt.jface.advanced.p.propertyChanged(SourceFile:330)
   at com.swtdesigner.gef.DesignerEditor.notifyPagesPropertyChanged(SourceFile:1209)
   at com.swtdesigner.gef.common.property.DesignerEditorPropertyComposite.handlePropertyChanged(SourceFile:769)
   at com.swtdesigner.gef.common.property.DesignerEditorPropertyComposite.handleGUIPropertyChanged(SourceFile:373)
   at com.swtdesigner.gef.common.property.DesignerEditorPropertyComposite$4.propertyChanged(SourceFile:262)
   at com.swtdesigner.model.JavaInfo.notifyPropertyChanged(SourceFile:5296)
   at com.swtdesigner.model.swt.widgets.control.ControlInfo.notifyPropertyChanged(SourceFile:188)
   at com.swtdesigner.model.JavaInfo.notifyPropertyChanged(SourceFile:5247)
   at com.swtdesigner.model.JavaInfo.unlockNotify(SourceFile:5220)
   at com.swtdesigner.model.JavaInfo.endEdit(SourceFile:794)
   at com.swtdesigner.model.swt.jface.advanced.ActionsComposite.handleAddAction(SourceFile:837)
   at com.swtdesigner.model.swt.jface.advanced.j.widgetSelected(SourceFile:262)
   at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:89)
   at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82)
   at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:796)
   at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2772)
   at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2431)
   at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1435)
   at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1406)
   at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:263)
   at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144)
   at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102)
   at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273)
   at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129)
   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.core.launcher.Main.basicRun(Main.java:183)
   at org.eclipse.core.launcher.Main.run(Main.java:644)
   at org.eclipse.core.launcher.Main.main(Main.java:628)


A fresh installation of both eclipse 3.1m1 and 3.0 does not solve the problem! :cry:
CrystalPalace
 
Posts: 9
Joined: Sat Jul 10, 2004 11:48 am

Postby CrystalPalace » Sun Sep 05, 2004 4:59 am

changing the java VM to 1.5 rc also does not solve the problem
CrystalPalace
 
Posts: 9
Joined: Sat Jul 10, 2004 11:48 am

Postby Eric Clayberg » Sun Sep 05, 2004 2:39 pm

Sorry about that. Try the new 2004.09.05 update.
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

Postby CrystalPalace » Sun Sep 05, 2004 3:14 pm

:D Yeah now it works again, but with a minor flaw :-)

When you double click on the action item, I would expect to jump to the run() procedure of the action class.
Instead, Designer takes me only to the ApplicationWindows´ createActions() where the action class is created.
I am just wondering if that was the intention how double clicking on the designer action definition should work

Thx,

Christian
CrystalPalace
 
Posts: 9
Joined: Sat Jul 10, 2004 11:48 am

Postby Eric Clayberg » Mon Sep 06, 2004 4:47 am

CrystalPalace wrote:When you double click on the action item, I would expect to jump to the run() procedure of the action class. Instead, Designer takes me only to the ApplicationWindows´ createActions() where the action class is created. I am just wondering if that was the intention how double clicking on the designer action definition should work

Double-clicking will take you to the createActions() method and place the cursor at the location where the Action is instantiated. For an anonymous Action class that Designer created, there is a further refinement in that it will take you to run() method within the Action class definition.

Currently, the Action editor double-click routine knows where each Action is created, but not where its class is defined (it just happens that for an anonymous class, those two locations are the same). For the general case of an Action created by the user, the Action class could be an inner class created in the same compilation unit or it might even be in a different compilation unit entirely.

We certainly could enhance the double-click routine to do as you suggest, but it would entail quite a bit of additional coding. The original intent was not to have it do as you suggest in the general case, but we could certainly enhance it at some point to do that.
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 SWT Designer

Who is online

Users browsing this forum: No registered users and 1 guest