|
|
Line 1: |
Line 1: |
− | =Multiplicity Editor=
| |
− | ==Description==
| |
− | The multiplicity editor contains two modes of edition:
| |
− | * The '''simple''' mode which allows to edit the lower and the upper values from a unique editor
| |
− | * The '''advanced''' mode which allows to edit the lower and the upper values from two editors of ValueSpecification.
| |
| | | |
− | ==Usage==
| |
− | ===Simple mode===
| |
− | The simple mode is represented as the following:
| |
− |
| |
− | [[File:simpleMode.png]]
| |
− |
| |
− | This editor must be filled by the following pattern:
| |
− | {| class="wikitable" border="1" cellspacing="0"
| |
− | ! Value filled
| |
− | ! Lower value
| |
− | ! Upper value
| |
− | |-
| |
− | | 1
| |
− | | <code>null</code> (default value is '''1''')
| |
− | | <code>null</code> (default value is '''1''')
| |
− | |-
| |
− | | x..y
| |
− | | <code>LiteralInteger</code> with value '''x'''
| |
− | | <code>LiteralUnlimitedNatural</code> with value '''y'''
| |
− | |-
| |
− | | x..*
| |
− | | <code>LiteralInteger</code> with value '''x'''
| |
− | | <code>LiteralUnlimitedNatural</code> with value '''-1''' (interpreted as <code>*</code>)
| |
− | |-
| |
− | | x
| |
− | | <code>LiteralInteger</code> with value '''x'''
| |
− | | <code>LiteralUnlimitedNatural</code> with value '''x'''
| |
− | |}
| |
− |
| |
− | The values set as lower and upper are always positive (except the <code>*</code> for the upper which is valued as '''-1''').
| |
− |
| |
− | This editor is usable only when the lower ValueSpecification is a <code>LiteralInteger</code> or <code>null</code> and when the upper ValueSpecification is a <code>LiteralUnlimitedNatural</code> or <code>null</code>.
| |
− | On the other hand, this editor will be displayed like the following:
| |
− |
| |
− | [[File:simpleModeDisabled.png]]
| |
− |
| |
− | ===Advanced mode===
| |
− | ====Simple ValueSpecification editor====
| |
− | The advanced mode with simple ValueSpecificatiton editors is represented as the following:
| |
− |
| |
− | [[File:advancedMode.png]]
| |
− |
| |
− | The lower and the upper ValueSpecification can be created/edited/deleted by the buttons:
| |
− |
| |
− | [[File:buttonsEdit.png]]
| |
− |
| |
− | ====XText ValueSpecification editor====
| |
− | The advanced mode with XText ValueSpecification editors is represented as the following:
| |
− |
| |
− | [[File:advancedModeXText.png]]
| |
− |
| |
− | This editor use the XText ValueSpecification editors (explain [[Papyrus_User_Guide#UML_ValueSpecification_editor|here]]) with some specificities depending on lower or upper value edition.
| |
− |
| |
− | The specificity of the '''lower''' ValueSpecification edition is when the value filled is an integer, this one will be handled as <code>LiteralInteger</code> instead of <code>LiteralUnlimitedNatural</code> or <code>LiteralInteger</code> (the <code>*</code> value will create an <code>OpaqueExpression</code>).
| |
− |
| |
− | The specificity of the '''upper''' ValueSpecification edition is when the value filled is an integer or <code>*</code>:
| |
− | * if the integer is '''positive or -1''', a <code>LiteralUnlimitedNatural</code> will be created
| |
− | * if the integer is '''negative''', an <code>OpaqueExpression</code> will be created instead of <code>LiteralInteger</code>
| |
− |
| |
− | ===Switch modes===
| |
− | This is possible to switch between the two modes by two ways:
| |
− | * The button in the multiplicity editor:
| |
− |
| |
− | [[File:buttonSwitch.png]]
| |
− |
| |
− | * The '''multiplicity editor''' preferences in the '''property views''' preferences:
| |
− |
| |
− | [[File:preferencesMultiplicityEditor.png]]
| |
− |
| |
− | Regarless of the way used to switch modes, the mode used is saved in the preferences and will be used for each multiplicity in Papyrus.
| |