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

Bug 342656

Summary: read.only rendering hint is not parsed as Boolean
Product: z_Archived Reporter: Greg Amerson <gregory.amerson>
Component: SapphireAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: konstantin, ling.hao
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Screenshot of the problem in UI
none
Patch attempt #1 konstantin: iplog+

Description Greg Amerson CLA 2011-04-12 23:59:24 EDT
Build Identifier: 3.6.2

Using Sapphire v0.3.0.201104112149

When trying to specify read.only rendering hint for a Property List editor to false, I was getting the following exception:

java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean
at org.eclipse.sapphire.ui.SapphirePropertyEditor.getRenderingHint(SapphirePropertyEditor.java:318)
at org.eclipse.sapphire.ui.renderers.swt.DefaultListPropertyEditorRenderer.createContents(DefaultListPropertyEditorRenderer.java:171)
at org.eclipse.sapphire.ui.renderers.swt.DefaultListPropertyEditorRenderer.createContents(DefaultListPropertyEditorRenderer.java:162)
at org.eclipse.sapphire.ui.renderers.swt.PropertyEditorRenderer.create(PropertyEditorRenderer.java:158)
at org.eclipse.sapphire.ui.SapphirePropertyEditor.render(SapphirePropertyEditor.java:411)
at org.eclipse.sapphire.ui.SapphirePartContainer.render(SapphirePartContainer.java:86)
at org.eclipse.sapphire.ui.SapphireComposite.render(SapphireComposite.java:175)
at org.eclipse.sapphire.ui.editor.views.masterdetails.MasterDetailsPage$DetailsSection.createSections(MasterDetailsPage.java:1321)
at org.eclipse.sapphire.ui.editor.views.masterdetails.MasterDetailsPage$DetailsSection.selectionChanged(MasterDetailsPage.java:1299)
at org.eclipse.ui.forms.DetailsPart$1.run(DetailsPart.java:274)

Reproducible: Always

Steps to Reproduce:
1. Add a property list editor to a section
2. Set the read.only Hint to false in sdef file
3. Load this section in the resulting editor UI
Comment 1 Greg Amerson CLA 2011-04-13 00:00:57 EDT
Created attachment 193115 [details]
Screenshot of the problem in UI

The result of this is an error dialog box when the section is loaded .
Comment 2 Greg Amerson CLA 2011-04-13 00:09:59 EDT
Created attachment 193116 [details]
Patch attempt #1

Added read.only hint to list  of hints parsed as boolean
Comment 3 Konstantin Komissarchik CLA 2011-04-13 14:47:49 EDT
Patch integrated. Thanks!
Comment 4 Ling Hao CLA 2011-06-09 14:27:05 EDT
Verify by adding read.only hint to list.