Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 339466 - Extends of Exception artifact is created with Unhandled event loop exception
Summary: Extends of Exception artifact is created with Unhandled event loop exception
Status: CLOSED FIXED
Alias: None
Product: Tigerstripe
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 major (vote)
Target Milestone: 0.5M0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-10 01:23 EST by Maria Kolchinskaja CLA
Modified: 2011-04-05 23:50 EDT (History)
2 users (show)

See Also:


Attachments
patch.339466 (1.83 KB, text/plain)
2011-03-28 14:59 EDT, Valentin Yerastov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Maria Kolchinskaja CLA 2011-03-10 01:23:41 EST
Build Identifier: 

1. Create Tigerstripe project
2. Create Exception artifact.

Result:
In Extends field of Exception artifact java.lang.Exception is displayed.

Click on Extends link and see error log:
java.lang.IllegalArgumentException
at org.eclipse.ui.part.FileEditorInput.<init>(FileEditorInput.java:92)
at org.eclipse.tigerstripe.workbench.ui.internal.views.explorerview.actions.TSOpenAction.openEditor(TSOpenAction.java:133)
at org.eclipse.tigerstripe.workbench.ui.internal.editors.artifacts.ArtifactGeneralInfoSection.openArtifact(ArtifactGeneralInfoSection.java:284)
at org.eclipse.tigerstripe.workbench.ui.internal.editors.artifacts.ArtifactGeneralInfoSection.access$0(ArtifactGeneralInfoSection.java:268)
at org.eclipse.tigerstripe.workbench.ui.internal.editors.artifacts.ArtifactGeneralInfoSection$1.linkActivated(ArtifactGeneralInfoSection.java:229)
at org.eclipse.ui.forms.widgets.AbstractHyperlink.handleActivate(AbstractHyperlink.java:233)
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:1053)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4066)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3657)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
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:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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:619)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
at org.eclipse.equinox.launcher.Main.run(Main.java:1407)


Reproducible: Always
Comment 1 Valentin Yerastov CLA 2011-03-14 15:31:55 EDT
This happens because we try to open java.lang.Exception in the artifact editor, that can not be done in principle.

My suggestion to solve this problem - is to change the method 
org.eclipse.tigerstripe.workbench.ui.internal.views.explorerview.actions.TSOpenAction.openEditor (Object, IWorkbenchPage)
so that method will check the resource availability for the opening artifact or not (getAdapter (IResource.class) == null), and if not then do not open and does not throw an exception, because this situation is quite normal.
Also, if a resource for artifacts is not available, disable the link extends.
Comment 2 Valentin Yerastov CLA 2011-03-28 14:59:43 EDT
Created attachment 192035 [details]
patch.339466

I solved the problem by making 'java.lang.Exception' artifact read-only
Comment 3 Yuri Strot CLA 2011-04-04 04:57:45 EDT
Patch applied.
Comment 4 Maria Kolchinskaja CLA 2011-04-05 23:50:50 EDT
Verified