Bug 1891 - [PropertiesView] API request: need dynamic property descriptors (1GA9W2Q)
Summary: [PropertiesView] API request: need dynamic property descriptors (1GA9W2Q)
Status: RESOLVED INVALID
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All Windows All
: P4 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Platform-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: investigate, needinfo
Depends on:
Blocks:
 
Reported: 2001-10-10 22:21 EDT by Dejan Glozic CLA
Modified: 2009-08-30 02:10 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dejan Glozic CLA 2001-10-10 22:21:41 EDT
There is a need for dynamic property descriptors. Right now, property descriptor is asked to provide a cell editor.
This editor is cached and reused (method 'getCellEditor' is called only once). This is appropriate for static cases.
However, some properties may change nature depending on other properties' values. Example:

PDE XML Schema editor exposes attribute properties through the property sheet. Attribute 'type' is a set of
choices (string, boolean, etc.). There can also be a restriction on a base type (for example, base type 'string'
can be restricted with a list of choices - an enumeration). Depending on values of properties 'type' and 
'restriction', property 'value' needs to use different cell editors. For a 'boolean' type, default value
can only be 'true' or 'false'. For a 'string' type, it should be a text cell editor. However, if there
is an enumeration restriction on the 'string' type, 'value' cell editor should be a combo box containing only
the list of choices defined on the restriction.

Right now, I am using text cell editor and trying to catch restriction violation using cell validator.
However, this is against the good UI design practice to dissalow users to enter invalid input in the
first place, rather than punish them later.

This would be easy to implement if 'getCellEditor' on the property descriptor would be called each time.
The implementation of the desciptor can choose to cache the editor, or create a new widget every time.
The key is to provide an API on IPropertyDescriptor interface to indicate that cell editor should
not be cached by the property sheet entry (IPropertyDescriptor.setDynamic(boolean)/isDynamic() seem
like a sensible choice). If the returned value is true, cell editor would not be cached. The default
return value would be 'false', indicating behaviour as today.


NOTES:
Comment 1 Kevin Haaland CLA 2001-11-22 06:30:15 EST
Deferring until development resources become available to consider this 
enhancement. 
Comment 2 Randy Giffen CLA 2002-08-06 16:02:34 EDT
Reopened for investigation
Comment 3 Dejan Glozic CLA 2003-02-19 15:06:18 EST
We will not complain if you defer this to 2.2
Comment 4 Tod Creasey CLA 2004-10-22 15:35:27 EDT
is this still of interest?
Comment 5 Nick Edgar CLA 2006-03-15 11:51:01 EST
Reassigning bugs in component areas that are changing ownership.
Comment 6 Eric Moffatt CLA 2006-06-23 15:25:10 EDT
Cleaning up defect lists by setting ones without recent traffic to 'REMIND'.
Comment 7 Denis Roy CLA 2009-08-30 02:10:38 EDT
As of now 'LATER' and 'REMIND' resolutions are no longer supported.
Please reopen this bug if it is still valid for you.