Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 342656 - read.only rendering hint is not parsed as Boolean
Summary: read.only rendering hint is not parsed as Boolean
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-12 23:59 EDT by Greg Amerson CLA
Modified: 2021-11-19 09:22 EST (History)
2 users (show)

See Also:


Attachments
Screenshot of the problem in UI (50.42 KB, image/png)
2011-04-13 00:00 EDT, Greg Amerson CLA
no flags Details
Patch attempt #1 (1.04 KB, patch)
2011-04-13 00:09 EDT, Greg Amerson CLA
konstantin: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.