Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 Tools » Extracting name and type for class attributes
Extracting name and type for class attributes [message #551014] Wed, 04 August 2010 20:27 Go to next message
Eclipse UserFriend
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 #551080 is a reply to message #551014] Thu, 05 August 2010 07:26 Go to previous messageGo to next message
Christian Waniek is currently offline Christian WaniekFriend
Messages: 50
Registered: May 2010
Member
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 #551208 is a reply to message #551080] Thu, 05 August 2010 14:59 Go to previous message
Eclipse UserFriend
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 #625884 is a reply to message #551014] Thu, 05 August 2010 07:26 Go to previous message
Christian Waniek is currently offline Christian WaniekFriend
Messages: 50
Registered: May 2010
Member
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:Extracting name and type for class attributes
Next Topic:help to extend uml2tools with new diagrams
Goto Forum:
  


Current Time: Wed Nov 26 05:58:45 GMT 2014

Powered by FUDForum. Page generated in 0.02943 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software