Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358182 - The palette cannot load all of the RUI widgets after restarting the workspace
Summary: The palette cannot load all of the RUI widgets after restarting the workspace
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Huo Zhen Zhong CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-20 02:46 EDT by fahua jin CLA
Modified: 2017-02-23 14:14 EST (History)
4 users (show)

See Also:


Attachments
Patch (1.42 KB, patch)
2011-10-20 14:33 EDT, Paul Harmon CLA
lasher: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description fahua jin CLA 2011-09-20 02:46:23 EDT
Build Identifier: 0.7.0.v201109192102

1) Create an RUIHandler in an empty workspace (only select RUI Widgets)
2) Keep the RUIHandler open, and select 'File > Restart' to restart the workspace.
3) VE prints 'document.write("could not open %handler_name%");', which has opened a defect with # 356039.
4) Right click the client package, and create another RUIHandler. You can find that the Palette view is empty.
5) Click the refresh button to refresh the palette.
6) Only 7 widgets are displayed in the palette view, the expected result is a dozen of widgets in the palette view.
7) Now if you switch back to the handler created in the 1st step, you'll find the handler can be displayed, but the palette is still not correct.

Reproducible: Always
Comment 1 Huo Zhen Zhong CLA 2011-10-20 04:13:58 EDT
Hi, Paul

I did a investigation on the problem and find that, when EDT restart with VE opened, WidgetDescriptorFactory will use ProjectEnvironment to find the widgets, but the ProjectEnvironment have some problem to find some of the widgets, it will report a DeserializationException exception. Could you help to look at it? Thanks


org.eclipse.edt.mof.egl.PartNotFoundException: org.eclipse.edt.mof.serialization.DeserializationException: java.lang.RuntimeException: org.eclipse.edt.mof.serialization.TypeNotFoundException: org.eclipse.edt.mof.serialization.MofObjectNotFoundException: MofObject not found: org.eclipse.edt.mof.egl.Annotation
	at org.eclipse.edt.ide.core.internal.lookup.ProjectBuildPathEntry.findPart(ProjectBuildPathEntry.java:399)
	at org.eclipse.edt.ide.core.internal.lookup.ProjectEnvironment.findPart(ProjectEnvironment.java:218)
	at org.eclipse.edt.ide.rui.visualeditor.internal.widget.WidgetDescriptorFactory.createWidgetDescriptor(WidgetDescriptorFactory.java:125)
	at org.eclipse.edt.ide.rui.visualeditor.internal.widget.WidgetDescriptorRegistry.createWidgetDescriptor(WidgetDescriptorRegistry.java:258)
	at org.eclipse.edt.ide.rui.visualeditor.internal.widget.WidgetDescriptorRegistry$Updater.initializeRegistry(WidgetDescriptorRegistry.java:111)
	at org.eclipse.edt.ide.rui.visualeditor.internal.widget.WidgetDescriptorRegistry$Updater.run(WidgetDescriptorRegistry.java:83)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.edt.mof.serialization.DeserializationException: java.lang.RuntimeException: org.eclipse.edt.mof.serialization.TypeNotFoundException: org.eclipse.edt.mof.serialization.MofObjectNotFoundException: MofObject not found: org.eclipse.edt.mof.egl.Annotation
	at org.eclipse.edt.mof.serialization.xml.XMLDeserializer.deserialize(XMLDeserializer.java:79)
	at org.eclipse.edt.mof.serialization.AbstractObjectStore.get(AbstractObjectStore.java:69)
	at org.eclipse.edt.ide.core.internal.builder.IFileSystemObjectStore.get(IFileSystemObjectStore.java:192)
	at org.eclipse.edt.ide.core.internal.lookup.ProjectBuildPathEntry.readPart(ProjectBuildPathEntry.java:380)
	at org.eclipse.edt.ide.core.internal.lookup.ProjectBuildPathEntry.findPart(ProjectBuildPathEntry.java:393)
	... 6 more
Comment 2 Paul Harmon CLA 2011-10-20 14:33:50 EDT
Created attachment 205671 [details]
Patch
Comment 3 Paul Harmon CLA 2011-10-20 14:34:22 EDT
I am attaching a patch that seems to fix the problem. I did not investigate enough to see if there is an appropriate place to invoke popEnv()
Comment 4 Huo Zhen Zhong CLA 2011-10-23 23:23:38 EDT
Yes, Paul, that works, thank
Comment 5 fahua jin CLA 2011-10-26 20:44:07 EDT
Verified in M3 build.