Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » feature label mapping
feature label mapping [message #213213] Wed, 10 December 2008 19:32 Go to next message
Pierre is currently offline PierreFriend
Messages: 27
Registered: July 2009
Junior Member
Hello every body,

I have a feature label mapping with two features "MaxCardinality" and
"MinCardinality". I want to display my cardinalities:
- On the diagram itself it should show "<MinCardinality..MaxCardinality>",
so I set the view pattern to "<{0}..{1}>"
- An exception is, when the MaxCardinality is -1, I want to display on the
diagram the character 'n'. For example: <0..n>

How can I do to express this rule? with EditorPattern, EditPattern or in
the code?

It's my currently feature label mapping:

Diagram Label: Diagram Label MyLabel
Edit Method: MESSAGE_FORMAT
Editor Pattern:
Edit Pattern:
Features: MinCardinality : EInt, MaxCardinality : EInt
Read Only: true
View Method: MESSAGE_FORMAT
View Pattern: <{0}..{1}>

Somebody can help me?

Thank you in advance.

Best Regards

Pierre
Re: feature label mapping [message #213282 is a reply to message #213213] Thu, 11 December 2008 16:43 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello pierre,

Try using view pattern like: {0}..{1,choice,-1#n|-1<{1}}

-----------------
Alex Shatalin
Re: feature label mapping [message #213537 is a reply to message #213282] Mon, 15 December 2008 09:04 Go to previous message
Pierre is currently offline PierreFriend
Messages: 27
Registered: July 2009
Junior Member
Hello Alex,

Your rule runs!

Thank you very much!

Pierre
Previous Topic:[Announce] GMF 2.2.0 I200812121720 is available
Next Topic:Problem with semantic container of a connection
Goto Forum:
  


Current Time: Thu Apr 25 15:21:31 GMT 2024

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

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

Back to the top