Editing Element Properties [message #76311] |
Wed, 23 April 2003 11:14  |
Eclipse User |
|
|
|
Originally posted by: dev.abgraph.com
Say I wanted to add editable string properties to the various elements in
the Logic Example what implementation options would I have? Would it be easy
to add them in the OutlinePage tree under their owner Elements? Could they
be editable there or would that be limited to displaing their current value
(like the Label Element)?
Or would it be better to add an org.eclipse.jface.viewers.TableViewer and
edit the properties there?
How would I integrate this with Logic model?
Any ideas/suggestions much appreciated.
Gert van Spijker
|
|
|
|
|
Re: Editing Element Properties [message #76614 is a reply to message #76565] |
Thu, 24 April 2003 16:24  |
Eclipse User |
|
|
|
Originally posted by: dev.abgraph.com
"Randy Hudson" <none@us.ibm.com> wrote in message
news:b89bk5$ig9$1@rogue.oti.com...
> "Gert" <dev@abgraph.com> wrote in message
news:b899cq$gji$1@rogue.oti.com...
> > I see that nobody has answered. I wonder why. Probably I must explain
> > better.
> >
> > I don't mind digging into this myself. In fact I was planning to do just
> > that. And later share my findings with anybody interested. But I don't
> > want to start digging in the wrong place so that's why I asked for
> > suggestions from other more experienced users. So I will repeat my
question in a
> > more generic way: What is the best way to edit additonal properties to
Logic example
> > elements?
>
> The property sheet is one way. A popup dialog is another.
IMHO the most intuitive way, from a users perspective, would be editing them
directly in the Outline tree. The property sheet definitely seems the next
best option. It shows that I am new to Java/Eclipse/SWT/JFace/Draw2d/GEF: I
didn't even know of the existence of org.eclipse.ui.views.PropertySheet!
After many years of MSVC/MFC programming this is certainly a shock. I am
pleasantly surprised but forced back to school. I will step through the
Property Sheet Example to see how it is done. Thanks for the suggestion!
> If your editor does not have container (like circuits in the logic
examples)
> then I suppose it does makes sense to use the outline tree as a way to
> display the additional properties.
I am planning to use containers on other parts, but the elements I am
concerned about have mandatory properties that I would not like the user to
remove, or even move, from the container. An example: My model describes a
computer network. I need to define a 'Machine' as a network node. A Machine
is a container that contains resources and has properties like a Machine
name, IP address and others. I would like the user to be able to review/edit
these properties in the most intuitive, direct fashion possible, but these
properties should not be deleted or moved, something that a Container/Canned
Part would allow unless I write explicit code to prohibit that (which could
probably involve more coding than the property sheet approach)
Gert van Spijker
|
|
|
Powered by
FUDForum. Page generated in 0.03925 seconds