[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.platform] Infinite Nested Property
|
- From: Luca Baldi <luca.baldi@xxxxxxxxxxx>
- Date: Fri, 17 Mar 2006 11:39:21 +0000
- Newsgroups: eclipse.platform
- Organization: EclipseCorner
- User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)
Hi
I have a list of properties in a Properties View for an Editor object,
and one of the properties is a reference to a Label object.
The list of properties for the Label object include a propery which is a
reference to the Editor object.
You can probably see where I am heading to. When I expand the Label
property, I get a list containing the Editor, which I can expand and I
get a list containing the Label, which I can expand and I get a list
containing the Editor, and so on and so forth.
Editor
- ...
- ...
+ Label - ...
- ...
+ Editor - ...
- ...
+ Label - ...
- ...
+ Editor - ... and so on
How can I avoid this??
What I want is either to hide the property depending how far down the
tree structure it is.
Editor
- ...
- ...
+ Label - ...
- ...
( no Editor )
Or make sure the property is not expandable
Editor
- ...
- ...
+ Lable - ...
- ...
- Editor
I have a PropertyDescriptor object both for a Label and an Editor,
overriding the method createPropertyEditor(Composite parent). The parent
is a reference to the Tree containing all the properties or at least I
thought it was. All I can get from it is a list of TreeItems (
properties ) that belong to the current node. I can't seem to be able to
get up the tree structure to find out whether a Label ( or Editor )
TreeItem is child of an Editor ( or Label ) which is in turn a child itself.
Another approach I tried is to have a PropertySource object, which can
remove the Label ( or Editor ) PropertyDescriptor, but again I can't
find a way to determine how far down the tree structure the node is.
Does anybody have any suggestion as to how to solve the problem??
Thanks
Luca