Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » org.eclipse.swt.SWTException when using a command in a conditional-subitem(Issue with Eclipse cheat sheets; Possible Eclipse bug)
org.eclipse.swt.SWTException when using a command in a conditional-subitem [message #921891] Mon, 24 September 2012 14:28
Atanas Gegov is currently offline Atanas GegovFriend
Messages: 2
Registered: September 2012
Junior Member
Hallo everyone,

I am experience a strange problem when placing a command in a conditional-subitem element of a cheat sheet. Firstly, the command opens a dialog/wizard and the user sees the cheat sheet on the right side of the dialog/wizard (because of dialog="true"). After finishing the interaction with the dialog/wizard (and the cheat sheet returns to its normal view) the following exception is thrown:

!ENTRY org.eclipse.ui 4 0 2012-09-24 15:56:30.347
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Widget is disposed
	at org.eclipse.swt.SWT.error(SWT.java:4361)
	at org.eclipse.swt.SWT.error(SWT.java:4276)
	at org.eclipse.swt.SWT.error(SWT.java:4247)
	at org.eclipse.swt.widgets.Widget.error(Widget.java:480)
	at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:417)
	at org.eclipse.swt.widgets.Control.setCursor(Control.java:3886)
	at org.eclipse.ui.internal.cheatsheets.views.CheatSheetViewer.runSubItemPerformExecutable(CheatSheetViewer.java:1096)
	at org.eclipse.ui.internal.cheatsheets.views.CoreItem$4.linkActivated(CoreItem.java:198)
	at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:233)
	at org.eclipse.ui.forms.widgets.ImageHyperlink.handleActivate(ImageHyperlink.java:199)
	at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleMouseUp(AbstractHyperlink.java:327)
	at org.eclipse.ui.forms.widgets.AbstractHyperlink.access$2(AbstractHyperlink.java:311)
	at org.eclipse.ui.forms.widgets.AbstractHyperlink$4.handleEvent(AbstractHyperlink.java:125)
	at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
	at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1276)
	at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3554)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3179)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1022)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:916)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:585)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:616)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1414)


Below is a minimal cheat sheet demonstrating the problem. Once again, in the first "normal" case ("Create a Hello World Project I") there is no exception after finishing the wizard, while the same command in the conditional-subitem (placed into "Create a Hello World Project II") results into an exception after the completion of the wizard.

<?xml version="1.0" encoding="UTF-8"?>
<cheatsheet title="Creating a Hello World Project">
	<intro>
		<description>
			Test description for cheat sheet.
		</description>
	</intro>
	<item title="Create a Hello World Project I" dialog="true">
		<description>
			Create a Project by using the C++ Project wizard.
		</description>
		<subitem>
			<description>
				Click <b>File</b> &gt; <b>New</b> &gt; <b>C++ Project</b> to
				launch the C++ Project wizard.
			</description>
			<command
				required="false"
				serialization="org.eclipse.ui.newWizard(newWizardId=org.eclipse.cdt.ui.wizards.NewCWizard1)">
			</command>
		</subitem>
		<subitem>
			<description>
				Do something and finish the wizard.
			</description>
		</subitem>
	</item>
	<item title="Choose the programming language for the project" dialog="true">
		<description>
			Choose between C and C++.
		</description>
		<command returns="progLanguage"
		serialization="org.eclipse.ui.dialogs.openMessageDialog(title=Select Programming Language,buttonLabel0=C++,message=Select the programming language for the Hello World Project project,buttonLabel1=C)"/>
		<onCompletion> You selected ${progLanguage}.</onCompletion>
	</item>
	<item title="Create a Hello World Project II" dialog="true">
		<description>
			Create a Project by using the appropriate Project wizard.
		</description>
		<conditional-subitem condition="${progLanguage}">
			<subitem when="C++">
				<description>
					Click <b>File</b> &gt; <b>New</b> &gt; <b>C++ Project</b> to
					launch the C++ Project wizard.
				</description>
				<command
					required="false"
					serialization="org.eclipse.ui.newWizard(newWizardId=org.eclipse.cdt.ui.wizards.NewCWizard1)">
				</command>
			</subitem>
			<subitem when="C">
				<description>
					Click <b>File</b> &gt; <b>New</b> &gt; <b>C Project</b> to
					launch the C Project wizard.
				</description>
				<command
					required="false"
					serialization="org.eclipse.ui.newWizard(newWizardId=org.eclipse.cdt.ui.wizards.NewCWizard2)">
				</command>
			</subitem>
		</conditional-subitem>
		<subitem skip="true">
			<description>
				Do something and finish it.
			</description>
		</subitem>
	</item>
</cheatsheet>


Is it my fault in using the elements somehow wrongly or is it possibly an Eclipse bug?

I am using Eclipse Juno (4.2.0) an Ubuntu 11.10 64-bit. The cheatsheet-Plugin is: org.eclipse.ui.cheatsheets in Version 3.4.200.v20120521-2344.
The same problem occures as well with Eclispe Indigo (3.7.2).

Thank you in advance for your help!

Best regards,
Atanas

[Updated on: Tue, 02 October 2012 08:26]

Report message to a moderator

Previous Topic:InjectionException: java.lang.NoClassDefFoundError: XmlSchemaCollection
Next Topic:RCP application on MAC
Goto Forum:
  


Current Time: Thu Mar 28 20:17:43 GMT 2024

Powered by FUDForum. Page generated in 0.02968 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top