|
|
(89 intermediate revisions by 6 users not shown) |
Line 1: |
Line 1: |
− | Since Papyrus 0.10 (Eclipse Kepler), Papyrus provides a new version of the tabular editors. This version will replace the previous version in Eclipse Luna.
| + | [https://help.eclipse.org/2020-09/nav/73_1_1_0 General Table Documentation (2020-09)] |
| | | |
− | = Existing Tables =
| + | [[Category:Papyrus]] |
− | | + | |
− | *UML Generic Table<br>
| + | |
− | *SysML Allocation Table<br>
| + | |
− | *SysML Requirement Table<br>
| + | |
− | *Views Table<br>
| + | |
− | | + | |
− | <br>
| + | |
− | | + | |
− | == UML Generic Table<br> ==
| + | |
− | | + | |
− | Elements Accepted : UML Element only (all of them)<br>
| + | |
− | | + | |
− | Filling Way : User, by Drag&Drop from the Model Explorer<br>
| + | |
− | | + | |
− | Possible Context : all UML Element.<br>
| + | |
− | | + | |
− | Save : All rows displayed in the table are saved in the model<br>
| + | |
− | | + | |
− | Element Creation : All UML Elements<br>
| + | |
− | | + | |
− | <br>
| + | |
− | | + | |
− | == SysML Allocation Table<br> ==
| + | |
− | | + | |
− | Elements Accepted : SysML Allocation only<br>
| + | |
− | | + | |
− | Filling Way : Automatic, by Synchronization on the context of the model. Only the Allocation directly owned by the context of the table are displayed.<br>
| + | |
− | | + | |
− | Possible Context : UML Package, with the SysML Profile Allocations applied.<br>
| + | |
− | | + | |
− | Save : The Rows are not serialized in the model, because they are derived of the UML Model.<br>
| + | |
− | | + | |
− | Element Creation : SysML Allocation<br>
| + | |
− | | + | |
− | <br>
| + | |
− | | + | |
− | == SysML Requirement Table ==
| + | |
− | | + | |
− | Elements Accepted : SysML Requirement only
| + | |
− | | + | |
− | Filling Way : Automatic, by Synchronization on the context of the model. Only the Requirements directly owned by the context of the table are displayed.<br>
| + | |
− | | + | |
− | Possible Context : UML Package, with the SysML Profile Requirement applied.<br>
| + | |
− | | + | |
− | Save : The Rows are not serialized in the model, because they are derived of the UML Model.
| + | |
− | | + | |
− | Element Creation : SysML Requirement<br>
| + | |
− | | + | |
− | <br>
| + | |
− | | + | |
− | == Views Table<br> ==
| + | |
− | | + | |
− | Elements Accepted : Papyrus Views (Table/Diagram/...) only
| + | |
− | | + | |
− | Filling Way : Automatic, by Synchronization on the context of the model. <br>
| + | |
− | | + | |
− | Possible Context : All UML Elements<br>
| + | |
− | | + | |
− | Save : The Rows are not serialized in the model, because they are derived of the notation Model.<br>
| + | |
− | | + | |
− | None<br>
| + | |
− | | + | |
− | <br>
| + | |
− | | + | |
− | = Table Features<br> =
| + | |
− | | + | |
− | The table framework provides a large number of features. Here we will describe all existing features supported by the framework, but not necessarly by all the tables.<br>
| + | |
− | | + | |
− | #Edit Cell Values<br>
| + | |
− | #Change Axis (Columns/Row) Order<br>
| + | |
− | #Invert Axis (Exchange Column And Row)<br>
| + | |
− | #Add Axis (Column/Row) Element by Drag&Drop from another view (ModelExplorer)<br>
| + | |
− | #Remove Column/Row<br>
| + | |
− | #Destroy Column/Row Element<br>
| + | |
− | #Rename Column/Row Header<br>
| + | |
− | #Choose the Displayed Columns/Rows<br>
| + | |
− | #Choose the Displayed Columns/Rows for Stereotype Property in the popup menu<br>
| + | |
− | #Paste Columns/Rows From External Spreadsheet<br>
| + | |
− | #Display Index Column/Row Header<br>
| + | |
− | #Display Label Column/Row Header<br>
| + | |
− | #Configure Index Header Style (A, B, C...Z, AA, AB, ... or 0,1,2,3)<br>
| + | |
− | #Configure Label Header Style : select the information to Display in the Header Label (Name, Multiplicity, Type, Icon, isDerived)<br>
| + | |
− | #Export table into the Excel Format<br>
| + | |
− | #Print table<br>
| + | |
− | #Sort Column/Row Axis by Alphabetic order<br>
| + | |
− | #Sort Rows selecting one or several column header<br>
| + | |
− | #Save and restore Table Axis Configuration<br>
| + | |
− | #Select All
| + | |
− | #AutoResize axis<br>
| + | |
− | | + | |
− | === <br> ===
| + | |
− | | + | |
− | === Edit Cell Values ===
| + | |
− | | + | |
− | Double Click on a cell or selecting a cell then pressing F2, excepted for derived features<br>
| + | |
− | | + | |
− | === Change Axis Order<br> ===
| + | |
− | | + | |
− | Click on the axis to move and drop it to its new location.<br>
| + | |
− | | + | |
− | === Invert Axis<br> ===
| + | |
− | | + | |
− | Select the action Invert Axis in the popup menu or change it into the Table Property View.
| + | |
− | | + | |
− | === Add Axis (Column/Row) Element by Drag&Drop<br> ===
| + | |
− | | + | |
− | Select your element and drop it into the table, in the column region or in the row region to add it.<br>
| + | |
− | | + | |
− | === Remove Column/Row<br> ===
| + | |
− | | + | |
− | Select the header of the axis to remove then right click and select Remove Column/Row. The axis will be remove of the table, but the represented element will continue to be in the model.<br>
| + | |
− | | + | |
− | === Destroy Column/Row Element<br> ===
| + | |
− | | + | |
− | Select the header of the axis element to destroy then right click and select Destroy Column/Row Element. The represented element will be destroyed and its axis will be removed from the table.<br>
| + | |
− | | + | |
− | === Rename Column/Row Header<br> ===
| + | |
− | | + | |
− | This function can do 2 things according to the usecase : <br>
| + | |
− | | + | |
− | *Rename the element represented by the axis, when the element is owned by your model<br>
| + | |
− | *Define an alias to the axis, when the element is not owned by your model (UML Feature for example)<br>
| + | |
− | | + | |
− | Select the header of the axis element to rename then right click and select Rename Header.<br>
| + | |
− | | + | |
− | === Choose the Displayed Columns/Rows<br> ===
| + | |
− | | + | |
− | Right click in the table (not in the header) and select Columns -> Create/Destroy Columns. (the same thing for rows<br>
| + | |
− | | + | |
− | === Choose the Displayed Columns/Rows for Stereotype Property in the popup menu<br> ===
| + | |
− | | + | |
− | Right click in the table (not in the header) and select Select Stereotype Properties Columns (or Rows)<br>
| + | |
− | | + | |
− | | + | |
− | | + | |
− | {| width="1007" cellspacing="1" cellpadding="1" border="1" align="center" summary="This table describes the feature of the table when the axis are NOT inverted."
| + | |
− | |+
| + | |
− | === Features/Tables, when the Axis are NOT inverted. ===
| + | |
− | | + | |
− | | + | |
− | | + | |
− | |-
| + | |
− | | <br>
| + | |
− | | valign="middle" align="center" | UML Generic Table<br>
| + | |
− | | valign="middle" align="center" | SysML Allocation Table<br>
| + | |
− | | valign="middle" align="center" | SysML Requirement Table<br>
| + | |
− | | valign="middle" align="center" | Views Table<br>
| + | |
− | |-
| + | |
− | | Content synchronized on table context<br>
| + | |
− | | valign="middle" align="center" | No<br>
| + | |
− | | valign="middle" align="center" | Yes<br>
| + | |
− | | valign="middle" align="center" | Yes<br>
| + | |
− | | valign="middle" align="center" | Yes<br>
| + | |
− | |-
| + | |
− | | Edit Cell Value<br>
| + | |
− | | valign="middle" align="center" rowspan="2" colspan="4" | Yes<br>
| + | |
− | |-
| + | |
− | | Change Axis Order<br>
| + | |
− | |-
| + | |
− | | Add Column Axis By Drag & Drop
| + | |
− | | valign="middle" align="center" colspan="4" | No<br>
| + | |
− | |-
| + | |
− | | Add Row Axis By Drag & Drop
| + | |
− | | valign="middle" align="center" | All UML Elements<br>
| + | |
− | | valign="middle" align="center" rowspan="3" colspan="3" | No (Synchronized table)
| + | |
− | |-
| + | |
− | | Remove Column<br>
| + | |
− | | valign="middle" align="center" | Yes<br>
| + | |
− | |-
| + | |
− | | Remove Row<br>
| + | |
− | | valign="middle" align="center" | Yes<br>
| + | |
− | |-
| + | |
− | | Destroy Column Element<br>
| + | |
− | | valign="middle" align="center" | Yes<br>
| + | |
− | | valign="middle" align="center" | Yes<br>
| + | |
− | | valign="middle" align="center" | Yes<br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | |-
| + | |
− | | Destroy Row Element<br>
| + | |
− | | valign="middle" align="center" | Yes<br>
| + | |
− | | valign="middle" align="center" | Yes<br>
| + | |
− | | valign="middle" align="center" | Yes<br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | |-
| + | |
− | | Rename Column Header<br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | |-
| + | |
− | | Rename Row Header<br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | |-
| + | |
− | | Choose the Displayed Columns<br>
| + | |
− | | valign="middle" align="center" rowspan="2" colspan="3" | Yes
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | |-
| + | |
− | | Choose the Displayed Columns for Stereotype Property in the popup menu<br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | |-
| + | |
− | | Choose the Displayed Rows<br>
| + | |
− | | valign="middle" align="center" | No<br>
| + | |
− | | valign="middle" align="center" | No<br>
| + | |
− | | valign="middle" align="center" | No<br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | |-
| + | |
− | | Choose the Displayed Rows for Stereotype Property in the popup menu<br>
| + | |
− | | valign="middle" align="center" colspan="3" | No
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | |-
| + | |
− | | Paste Column From Spreadsheet<br>
| + | |
− | | valign="middle" align="center" | No<br>
| + | |
− | | valign="middle" align="center" | No<br>
| + | |
− | | valign="middle" align="center" | No<br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | |-
| + | |
− | | Paste Row From Spreadsheet<br>
| + | |
− | | valign="middle" align="center" colspan="4" rowspan="8" | Yes
| + | |
− | |-
| + | |
− | | Display Index Column/Row Header<br>
| + | |
− | |-
| + | |
− | | Display Label Column/Row Header<br>
| + | |
− | |-
| + | |
− | | Configure Index Header Style <br>
| + | |
− | |-
| + | |
− | | Configure Label Header Style<br>
| + | |
− | |-
| + | |
− | | Export to Excel<br>
| + | |
− | |-
| + | |
− | | Print table<br>
| + | |
− | |-
| + | |
− | | Sort Column Axis By Name<br>
| + | |
− | |-
| + | |
− | | Sort Row Axis By Name<br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | |-
| + | |
− | | Save and restore Table Axis Configuration<br>
| + | |
− | | valign="middle" align="center" colspan="4" rowspan="2" | Yes
| + | |
− | |-
| + | |
− | | Select All <br>
| + | |
− | |-
| + | |
− | | AutoResize axis<br>
| + | |
− | | valign="middle" align="center" colspan="4" | Yes<br>
| + | |
− | |-
| + | |
− | | <br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | | valign="middle" align="center" | <br>
| + | |
− | |}
| + | |
− | | + | |
− | <br>
| + | |
− | | + | |
− | <br>
| + | |
− | | + | |
− | <br>
| + | |
− | | + | |
− | == Paste From Spreadsheet in a Table ==
| + | |
− | === General===
| + | |
− | *Tables support the paste from Spreadsheet (Excel for example).
| + | |
− | *This feature is already configured for SysML Requirements Table and SysML Allocations Table.
| + | |
− | *For Generic Table, the user must configure the paste himself.
| + | |
− | *Stereotype application :
| + | |
− | **If your table displays columns representing stereotype's properties, the required stereotypes will be applied if there is a value to paste in the cell.
| + | |
− | **If you want force stereotype application on all pasted elements, you must use post-actions
| + | |
− | *Name Resolution
| + | |
− | ***Papyrus table tries to resolve the text pasted from the external spreadsheet. That is to say if the text is pasted in a column representing a boolean, text will be converted in boolean value, if the text is pasted in a column representing a UML NamedElement, we try to find this NamedElement in the exising model to set the value.
| + | |
− | ***if the resolution of the pasted text failed, we create a CellProblem, to store the pasted value. This value is displayed in the table, underlined in red.
| + | |
− | *If the pasted spreadsheet as more columns than the current table, the too many columns will be ignored.
| + | |
− | *If the pasted spreadsheet as less columns than the current table there is no problem to do the paste.
| + | |
− | *In the mixed case, some rows have too many columns and others not enough, there is no problem to do the paste.
| + | |
− | | + | |
− | ===Steps to paste in a Generic Table===
| + | |
− | We assume that the user wants to paste rows (and not columns).
| + | |
− | *Create a new Generic table
| + | |
− | *Select the columns to display in your table.
| + | |
− | *Select the table in the ModelExplorer View in order to display its Property View
| + | |
− | *In the Property View goes into the Paste Tab. 4 informations must be completed by the user:
| + | |
− | **Detached Mode (when <code>true</code>, paste is faster but actions done by service edit will be ignored.
| + | |
− | ***if <code>false</code>, Paste action uses the service edit (initialize default values, apply stereotypes required by element id).
| + | |
− | ***if <code>true</code>, stereotype required by the element id will be ignored.
| + | |
− | **Pasted Element Id : defines the pasted element: org.eclipse.papyrus.uml.Class will create a UML Class
| + | |
− | ***org.eclipse.papyrus.sysml.Requirement will create a uml.Class stereotyped Requirement, called Requirement0 if Detached mode=false.
| + | |
− | ***org.eclipse.papyrus.sysml.Requirement will create a uml.Class the name will be initialized only if the user pastes a name value and the steroetype will be applied only if a column requires it or if it is defined by opst actions)
| + | |
− | **ContainementFeature : the feature owning the pasted elements
| + | |
− | **Post Actions : a way to define 2 kinds of actions:
| + | |
− | ***actions done just after the element creation
| + | |
− | ***actions done after have pasting all cell values
| + | |
− | ***currently, Papyrus provides Post Action only for stereotype application
| + | |
− | ***currently, Post Actions are ignored when detached mode=<code>false</code>
| + | |
− | | + | |
− | [[File:PasteInTablePropertyView.jpg |Paste In Table Configuration Property View]] | + | |
− | | + | |
− | == Import From Spreadsheet in a Table (CSV File)==
| + | |
− | The mecanism used for import in the same than for the Paste, so previous rules are always available.
| + | |
− | In the popup menu of the table, you will find a menu called "Import From File". This menu allows to import a CSV file, managing the columns separators and the text delimiter.
| + | |
− | [[File:ImportCSVDialog.jpg |Import Dialog - Configuring Import]]
| + | |
− | | + | |
− | == Table Property View<br> ==
| + | |
− | | + | |
− | The Property View of the table is accessible selecting the table in the ModelExplorer.<br>
| + | |
− | | + | |
− | <br>
| + | |
− | | + | |
− | == Synchronization between tables and model explorer ==
| + | |
− |
| + | |
− | === Generalities ===
| + | |
− |
| + | |
− | As illustrated below this feature is enabled when the <I>Link With Editor</I> button is activated : <br />
| + | |
− | | + | |
− | [[File:ModelExplorerLinkWithEditor.png]] <br /> <br />
| + | |
− | | + | |
− | This link the active diagram, in the multi editor view, with the model explorer view. This link works bidirectionally. <br />
| + | |
− | As shown below, more than one element can be selected in one view and their counterparts, if present in the other, will be automatically selected as well. <br />
| + | |
− | | + | |
− | [[File:SelectionWithDiagram.png]] <br /> <br />
| + | |
− | | + | |
− | <I>It is to be noted that, when changing pages, the selection for each of them remain in memory and handled by setInput in tabbedPropertySheetPage</I> <br /> <br />
| + | |
− | | + | |
− | === Row selections ===
| + | |
− | | + | |
− | The default behavior of the tables, and their representation, is to list the appropriate elements as rows with each property indicated by a column as illustrated below. <br />
| + | |
− | | + | |
− | [[File:GenericSelection.png]] <br /> <br />
| + | |
− | [[File:RequirementSelection.png]] <br /> <br />
| + | |
− | [[File:AllocationSelection.png]] <br /> <br />
| + | |
− | [[File:ViewsSelection.png]] <br /> <br /> <br />
| + | |
− | | + | |
− | === Column selections ===
| + | |
− | | + | |
− | The axis of the table can also be inverted and the elements represented as columns with their properties as rows : <br />
| + | |
− | | + | |
− | [[File:ColumnSelection.png]] <br /> <br />
| + | |
− | | + | |
− | Both those selections are achieved either by clicking on the element in the model explorer or the element's row or Column tag in the table. <br />
| + | |
− | | + | |
− | === Cell selections ===
| + | |
− | | + | |
− | Wether the axis of the table is inverted or not, the user can select elements represented as cells inside a row or column of the table and see its counterpart selected as well. <br />
| + | |
− | It is important to remember that the cell selection is a one way behavior, from cell to model explorer, as the table cannot know what the user wants to select, row or cell, based on a selection in the model explorer.<br/ >
| + | |
− | | + | |
− | [[File:CellSelection.png]] <br /> <br />
| + | |
− | [[File:CellSelectionInvertAxis.png]] <br /> <br /> <br />
| + | |
− | | + | |
− | === Mixed Selections ===
| + | |
− | | + | |
− | A behavior worthy of notice is that elements represented as cells, for example elements owned, if selected in conjunction with a row or a column, in the event of an inverted axis, produces a mixed selection of all the elements in the model explorer. <br />
| + | |
− | | + | |
− | [[File:MixedSelection.png]] <br /> <br />
| + | |
− | [[File:MixedSelectionReq.png]] <br /> <br /> <br />
| + | |
− | | + | |
− | === From the model explorer ===
| + | |
− | | + | |
− | As a reminder, selections initiated by the model explorer wil only result in a column or row selection as the table has no means to know what type of selection is wanted by the user. <br />
| + | |