Why is UndoablePropertySheetEntry final? [message #185336] |
Fri, 24 June 2005 11:32  |
Eclipse User |
|
|
|
Hi,
I inspected the way how the propertyPage is implemented in the ediagram
example. I used an older example from the cvs, where P. Shah used an own
UndoablePropertySheetEntry, based on the
GEF-UndoablePropertySheetEntry to map GEF command on EMF commands (I think).
In a later version, this is not done anymore. Instead, there are now for
every modelelement an own PropertySource. Even in the small ediagramm
example there are about 20 propertySources which seem all to be
implemented by hand.
Why aren't you using the first idea? If you change the model (add a new
property), do you know have to change the propertySouce by hand, too?
To put it in a nutshell, i find that new way really circuitous.
Greets
Andreas
|
|
|
Re: Why is UndoablePropertySheetEntry final? [message #185422 is a reply to message #185336] |
Sat, 25 June 2005 00:17  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
> I inspected the way how the propertyPage is implemented in the ediagram
> example. I used an older example from the cvs, where P. Shah used an own
> UndoablePropertySheetEntry, based on the GEF-UndoablePropertySheetEntry to
> map GEF command on EMF commands (I think).
>
> In a later version, this is not done anymore. Instead, there are now for
> every modelelement an own PropertySource. Even in the small ediagramm
> example there are about 20 propertySources which seem all to be
> implemented by hand.
By writing PropertySource implementation, you get complete control over
which properties appear in the properties view. Contrast this to the
default schema editor which comes with EMF, in which you see lots of
properties that are read-only, inherited, or duplicates of other displayed
properties.
> Why aren't you using the first idea? If you change the model (add a new
> property), do you know have to change the propertySouce by hand, too?
>
> To put it in a nutshell, i find that new way really circuitous.
The propertysource API is straightforward - its just a big switch statement.
|
|
|
Powered by
FUDForum. Page generated in 0.05378 seconds