Extracting name and type for class attributes [message #551014] |
Wed, 04 August 2010 20:27 |
Eclipse User |
|
|
|
Originally posted by: harrisb.ociweb.com
Hi,
UML2Tools allows the name of class attributes (properties) as entered by
the user to be of the form “<Name> : <Type>”. This allows the user, for
example, to name an attribute “size: Integer” and the attribute will
have name “size” and type “Integer”. This avoids the need to set the
type in the property sheet.
I'd like to find out how this is done so I can do the same thing for a
GMF diagram I'm developing. However, I'm not having much look reverse
engineering this from org.eclipse.uml2.diagram.def. The best I can tell
the GMF editor pattern in the mapping for the property node isn't being
used, nor is there a custom parser for the name label being defined in
the GMF generator model.
Could somebody point me to where “<Name> : <Type>” is parsed into the
name and the type of the attribute?
Thanks,
Byron
|
|
|
|
Re: Extracting name and type for class attributes [message #551208 is a reply to message #551080] |
Thu, 05 August 2010 14:59 |
Eclipse User |
|
|
|
Originally posted by: harrisb.ociweb.com
Hi Christian,
Thanks for pointing out the Property Parsers. This lead me to section
4.6.7 of the eclipse Modeling Project book which provides an example
that does exactly what I'm trying to do.
Thanks again,
Byron
Christian Waniek wrote:
> Hi Byron,
>
> as far as I could figure this out there's a
>
> org.eclipse.uml2.diagram.common.parser.property.PropertySema nticParser
> which delegates to a
> org.eclipse.uml2.diagram.common.parser.property.PropertyPars er.
>
> As you might have already figured out you find these classes in the
> plugin: org.eclipse.uml2.diagram.common
>
> Hope this helps
>
> Regards
> Christian Waniek
|
|
|
|
Re: Extracting name and type for class attributes [message #625885 is a reply to message #625884] |
Thu, 05 August 2010 14:59 |
Eclipse User |
|
|
|
Originally posted by: harrisb.ociweb.com
Hi Christian,
Thanks for pointing out the Property Parsers. This lead me to section
4.6.7 of the eclipse Modeling Project book which provides an example
that does exactly what I'm trying to do.
Thanks again,
Byron
Christian Waniek wrote:
> Hi Byron,
>
> as far as I could figure this out there's a
>
> org.eclipse.uml2.diagram.common.parser.property.PropertySema nticParser
> which delegates to a
> org.eclipse.uml2.diagram.common.parser.property.PropertyPars er.
>
> As you might have already figured out you find these classes in the
> plugin: org.eclipse.uml2.diagram.common
>
> Hope this helps
>
> Regards
> Christian Waniek
|
|
|
Powered by
FUDForum. Page generated in 0.04823 seconds