[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] feature label mapping

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