Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gef-dev] EDiagram model properties classes

Hi Pratik

Attached is a self-contained drop-in replacement for the entire
org.eclipse.gef.examples.ediagram.model.properties package.

In order to allow re-use of EStructuralFeature code at each end
of a reference, I had to introduce PropertyId combining a category
and display name. The two usages are then in the Ecore (Source) and
Ecore (Target) categories. This unfortunately required all property
ids to be dynamic rather than static, but there aren't that many at a time.

The PropertyId interacts with derived PropertyDescriptor classes with
a toModel/fromModel method to give consistent translation. It might be worth
moving these to a new org.eclipse.gef.examples.ediagram.model.descriptors package.
The ENamedElementPropertyDescriptor currently gives a Combo box of all valid
classifiers. This is at least alphabeticised. A smarter browser would be better.

I think the structure is about right, and the functionality much better than
nothing. All changeable Ecore attributes for the existing graphical palette are
supported. A fair number of children such as annotations, operation
parameters and exceptions still need doing. I accidentally defined a couple of
not changeable properties so I put them in the Ecore (Read-Only) category. Some
are useful, but too many will get back to the original auto-generated clutter;
references with all the volatiles etc are already large again.

Now that ECore properties are editable, the OutlinePage needs fixing so that
it publishes its selection - I'm investigating.

    Regards

        Ed Willink 

Attachment: properties.zip
Description: Zip compressed data


Back to the top