Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 359468

Summary: Most properties are missing for Dojo widgets in the Properties view of the RUI editor
Product: z_Archived Reporter: broy2
Component: EDTAssignee: Huo Zhen Zhong <huozz>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P1 CC: chenzhh, huozz, jinfahua, jqian, pharmon, svihovec
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
EDT properties
none
RBD properties
none
DojoButton events
none
Events RBD
none
fix lasher: iplog+

Description broy2 CLA 2011-09-29 14:56:22 EDT
Created attachment 204319 [details]
EDT properties

Drop any Dojo widget on a RUIHandler.
Select the widget in the Outline view and click the Properties tab.
There are very few properties available.
Screen shots comparing the properties of a Dojo Button in EDT and RBD are attached.
Comment 1 broy2 CLA 2011-09-29 14:56:58 EDT
Created attachment 204320 [details]
RBD properties
Comment 2 broy2 CLA 2011-10-03 18:42:09 EDT
Created attachment 204480 [details]
DojoButton events
Comment 3 broy2 CLA 2011-10-03 18:47:56 EDT
Created attachment 204481 [details]
Events RBD
Comment 4 Brian Svihovec CLA 2011-10-06 15:13:48 EDT
When processing the widgets, the following line is throwing an exception:

WidgetDescriptorFactory
private void processWidgetExcludedFields( Annotation widgetAnnotation, WidgetDescriptor widgetDescriptor )

EnumerationEntry propertyFilterType = (EnumerationEntry)widgetAnnotation.getValue( PROPERTY_FILTER_TYPE );

Exception:
java.lang.ClassCastException: eglx.ui.rui.FilterKind cannot be cast to org.eclipse.edt.mof.egl.EnumerationEntry
	at org.eclipse.edt.ide.rui.visualeditor.internal.widget.WidgetDescriptorFactory.processWidgetExcludedFields(WidgetDescriptorFactory.java:481)
	at org.eclipse.edt.ide.rui.visualeditor.internal.widget.WidgetDescriptorFactory.processWidget(WidgetDescriptorFactory.java:210)
	at org.eclipse.edt.ide.rui.visualeditor.internal.widget.WidgetDescriptorFactory.createWidgetDescriptor(WidgetDescriptorFactory.java:132)
	
Paul is investigating this issue to see why the types are different than expected.
Comment 5 Paul Harmon CLA 2011-10-06 16:16:50 EDT
The Deserializer (XMLDeserializer), when resolving references to Enumerations (such as for annotation values), first attempts to resolve to the Java ENUM for the package/name associated with the type for the annotation field. If it finds a Java entity, this is used. So, in this case you get the actual Java enumeration value. If the resolution to the java ENUM fails, the code then uses the mof model Enumeration and EnumerationEntry.

The problem is that the enumerations defined in the eglx.ui.rui package have been generated (via the Java generator) and exist as Java objects in the java.runtime project. Because these exist, and (for some reason) the java runtime project is in the classpath, the Deserializer is able to find these when the widget(s) are deserialized.

I have deleted the 3 Java enums that were generated for eglx.ui.rui.

We may need to identify all enumerations that are not needed as java runtime objects and remove those from the java runtime.
Comment 6 broy2 CLA 2011-10-07 22:21:58 EDT
I'm on the 201110072101 build, and the properties are still missing.
Comment 7 Huo Zhen Zhong CLA 2011-10-08 03:32:01 EDT
Created attachment 204789 [details]
fix
Comment 8 Huo Zhen Zhong CLA 2011-10-08 03:35:37 EDT
I have fixed the VE part, it should show the missing properties and events now. The problem is caused that VE should not only read the widget's parents fields but also read the widget's ancestors fields.
Comment 9 Huo Zhen Zhong CLA 2011-10-08 03:39:14 EDT
*** Bug 359403 has been marked as a duplicate of this bug. ***
Comment 10 fahua jin CLA 2011-10-09 20:26:11 EDT
Forest,

Please set the defect status as resolved if it has been resolved. Thanks.
Comment 11 Huo Zhen Zhong CLA 2011-10-09 21:48:17 EDT
Hi, Paul, I have no right to change the bug status, please help to change it to fixed.
Comment 12 Huo Zhen Zhong CLA 2011-10-10 02:47:27 EDT
fixed
Comment 13 broy2 CLA 2011-10-10 22:15:03 EDT
Verified in 201110100901 build.