Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Papyrus/Papyrus Developer Guide/Papyrus Embedded Editors Documentation/Textual Editor For NamedElement"
(→Textual Editor For Named Element) |
|||
Line 1: | Line 1: | ||
=Textual Editor For Named Element= | =Textual Editor For Named Element= | ||
− | |||
− | |||
− | |||
Since Papyrus 1.1.0 (Eclipse Mars), Papyrus provides a new texutal editor to edit references to UML NamedElement. This editor works only for references which are not in containment. | Since Papyrus 1.1.0 (Eclipse Mars), Papyrus provides a new texutal editor to edit references to UML NamedElement. This editor works only for references which are not in containment. | ||
This editor has not been developed using XText. it use a custom string parser and the class NameResolutionHelper to find named elements from their name. | This editor has not been developed using XText. it use a custom string parser and the class NameResolutionHelper to find named elements from their name. |
Revision as of 06:05, 18 March 2015
Contents
Textual Editor For Named Element
Since Papyrus 1.1.0 (Eclipse Mars), Papyrus provides a new texutal editor to edit references to UML NamedElement. This editor works only for references which are not in containment. This editor has not been developed using XText. it use a custom string parser and the class NameResolutionHelper to find named elements from their name. This string editor works for all references multiplicities.
Grammar
- in case of multivalued references, the separator between the name of the element is the comma,
- if the name contains a comma, the string typed by the user must be prefixed and suffixed by a single quote
'
.
Generic Behavior
- the value typed by the user are checked and the value is not committed if the named element is not found (an error message is displayed to the user)
- completion
- CTRL-SPACE opens a popup providing an helper for the completion
- if the text field is empty, the completion provides only the
null
value and display...
to prevent the user than it should type more text. - if more than 15 elements are found to match the string, we display only the 15 first values +
null
+...
to prevent the user than more values are available, opening the dialog
- if the text field is empty, the completion provides only the
- CTRL-SPACE opens a popup providing an helper for the completion
Integration
Property View
This editor has been added to the list of available editors for the property view.
-
CompletionStyledTextReferenceDialog
to edit single reference value- This editor is integrated as a textfield, with additional button to its right
-
CompletionStyledTextMultiReference
to edit multi references values- This editor is the
MultiReference
editor, and we added it the text field for completion
- This editor is the
Table
Papyrus provide an integration of this editor for Papyrus NatTable. This is the same editor for single and multi references. It is a textfield, with a button displayed to its right. This button allows to the user to open the dialog to choose the reference too. It allows to the user to edit the cell as text or selected the new value directly in the model tree with the dialog
org.eclipse.papyrus.uml.nattable.manager.cell.editor.UMLReferenceTextWithCompletionCellEditor
- The editor itself for single and multi values
org.eclipse.papyrus.uml.nattable.config.UMLSingleReferenceTextualCellEditorWithButtonConfiguration
- The configuration to use to edit single value. Currently, this editor is not used by default in Papyrus.
org.eclipse.papyrus.uml.nattable.manager.cell.editor.UMLReferenceTextWithCompletionCellEditor
- The configuration to use to edit multi value. Currently, this editor is not used by default in Papyrus.