Skip to main content

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.

Jump to: navigation, search

Difference between revisions of "Papyrus/Papyrus User Guide/Table Documentation"

(Filter)
(31 intermediate revisions by 3 users not shown)
Line 44: Line 44:
 
** It contains the editable cells of the table
 
** It contains the editable cells of the table
 
** It can't be hidden
 
** It can't be hidden
[[File:tableAreas.png|frame|none| the areas in a tree table]]
+
[[File:tableAreas.png|frame|none|The areas in a tree table]]
  
 
= General presentation=
 
= General presentation=
Line 156: Line 156:
 
::*## clickling a third time, the rows return to the default sort
 
::*## clickling a third time, the rows return to the default sort
 
::*# Pressing MAJ + ALT allows to sort rows using several columns. The last selected column is the first one used to do the sort
 
::*# Pressing MAJ + ALT allows to sort rows using several columns. The last selected column is the first one used to do the sort
 +
::* Update of the sorted state
 +
::*# new row added to the table will be sorted
 +
::*# modifying a value is a sorted column (from the table or another Papyrus View) doesn't change the sort of the rows for 2 reasons
 +
::*## performance: technically we probably need to redo the sort after each model modification
 +
::*## usability: the edited row will change of location, so the table will blink and scroll)
 +
::*# destroying a sorted column will not update the sort, to avoid to disturb the user
 +
::*# Invert Axis in a sorted state will clear the sort
  
 
; Remove Column/Row<br>  
 
; Remove Column/Row<br>  
Line 176: Line 183:
 
[[File:PopupStereotypeColumns.PNG|frame|none|Menu to Create/Destroy quickly stereotype properties]]
 
[[File:PopupStereotypeColumns.PNG|frame|none|Menu to Create/Destroy quickly stereotype properties]]
 
; Paste Columns/Rows From External Spreadsheet<br>  
 
; Paste Columns/Rows From External Spreadsheet<br>  
[[#Paste From Spreadsheet in a Table]]<br />
+
[[#Paste From Spreadsheet in a Table]]<br/>
  
 
; Display Index Column/Row Header<br>  
 
; Display Index Column/Row Header<br>  
Line 201: Line 208:
 
; Merge Cell
 
; Merge Cell
 
; Resize Axis
 
; Resize Axis
 +
; Unset cell value (reset to default value)
 +
: Selecting a cell in the table and doing "Delete" unset the cell value. That is to say, than the value is set to the default value (which is often null). It works only for editeable feature.
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
 +
  
 
===The list of available features for tables===
 
===The list of available features for tables===
This table lists all feature available for Tabular editors provided by Papyrus (the 17th of December 2014). This list could be considered as representative of tables capabilities '''assuming 3 points''':
+
This table lists all feature available for Tabular editors provided by Papyrus (the 1st of September 2017). This list could be considered as representative of tables capabilities '''assuming 3 points''':
 
# The table is not inverted
 
# The table is not inverted
 
# Elements are on rows
 
# Elements are on rows
 
# Features are on columns
 
# Features are on columns
  
{| class="wikitable"
+
{| class="wikitable"  border="1"
 
!  
 
!  
 
! style="text-align: center;" | UML
 
! style="text-align: center;" | UML
Line 346: Line 367:
 
| Merged All Body Cells for a Column
 
| Merged All Body Cells for a Column
 
(cells must contains the same values)
 
(cells must contains the same values)
| colspan="5" style="text-align: center;" | Yes (action provided by a poopup menu of the body)
+
| colspan="5" style="text-align: center;" | Yes (action provided by a popup menu of the body)
 
|-
 
|-
 
| Merged All Body Cells for a Row
 
| Merged All Body Cells for a Row
 
(cells must contains the same values)
 
(cells must contains the same values)
| colspan="5" style="text-align: center;" | Yes (action provided by a poopup menu of the body)
+
| colspan="5" style="text-align: center;" | Yes (action provided by a popup menu of the body)
 
|-
 
|-
 
| Merge Column./Row Header Cells
 
| Merge Column./Row Header Cells
Line 376: Line 397:
 
| Filter Rows
 
| Filter Rows
 
| colspan="5" style="text-align: center;" | Yes
 
| colspan="5" style="text-align: center;" | Yes
 +
|-
 +
| Unset cell value
 +
| colspan="3" style="text-align: center;" | Yes
 +
| style="text-align: center;" | No
 +
| style="text-align: center;" | Yes
 +
|-
 +
| Display Validation Marker in Row and Column Label Header
 +
| colspan="5" style="text-align: center;" | Yes
 +
|-
 +
| Display Validation Marker in Row and Column Label Header
 +
| colspan="5" style="text-align: center;" | Yes
 +
|-
 +
| Wrap Text for String cell
 +
| colspan="5" style="text-align: center;" | Yes (action provided by a popup menu of the body)
 +
|-
 +
| Automatic Resize Cell Height for String cell
 +
| colspan="5" style="text-align: center;" | Yes (action provided by a popup menu of the body)
 +
|-
 +
| Configure unsupported cell content
 +
| colspan="5" style="text-align: center;" | Yes (action provided by Preferences/Papyrus/NatTable/Cell Preferences)
 +
|-
 +
| Display List on Separated Rows for a fully selected column of multiple values
 +
| style="text-align: center;" | Yes
 +
| style="text-align: center;" | Yes
 +
| style="text-align: center;" | Yes
 +
| style="text-align: center;" | No
 +
| style="text-align: center;" | Yes
 +
|-
 
|}
 
|}
 +
 +
== Fill cells ==
 +
 +
The fill action is available in tables and can be used by clicking on the right bottom corner and drop until release. <br/>
 +
 +
This action is available for 2 types:
 +
*numbers
 +
*string
 +
 +
===Fill number values===
 +
It is possible to '''copy''' the initial value.
 +
[[File:FillCopyNumber.png|none|Fill Copy Number]]
 +
 +
When the initial selection before the fill is a single cell, it is possible to '''increment''' or '''decrement''' values from the initial value by adding or removing 1 to the initial value.
 +
[[File:FillIncrementNumberOneCellSelected.png|none|Fill Increment Number when one selected cell]] <br/>
 +
 +
When two cells are selected before filling the selection, it is possible to '''increment''' or '''decrement''' values from the initial value by adding or removing the initial values difference.
 +
[[File:FillIncrementNumberTwoCellsSelected.png|none|Fill Increment Number when two selected cells]]
 +
 +
===Fill string values===
 +
As number fill action, it is possible to '''copy''' the initial value.
 +
[[File:FillCopyString.png|none|Fill Copy String]]
 +
 +
When an integer is available at the beginning or at the ending of the value, it is possible to '''increment''' or '''decrement''' integer '''prefix''' or '''suffix''' values depending of the integer position.
 +
[[File:FillIncrementPrefixString.png|none|Fill Increment prefix String]] <br/>
 +
[[File:FillIncrementSuffixString.png|none|Fill Increment suffix String]] <br/>
 +
 +
The filled integer values are calculated by the same way than the fill numbers.
 +
 +
Warning: the minus sign is used as minus and not as a separator. So when you have Class-01 and you decide to Increment to name the next one, you get Class00, then Class01. In order to get Class-02 and Class-02, you must use Decrement.
  
 
==Tree Table Features==
 
==Tree Table Features==
Line 438: Line 517:
 
*Select the table in the ModelExplorer View in order to display its Property View
 
*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:  
 
*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.
+
**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>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.
 
***if <code>true</code>, stereotype required by the element id will be ignored.
Line 446: Line 525:
 
**ContainementFeature : the feature owning the pasted elements
 
**ContainementFeature : the feature owning the pasted elements
 
**Post Actions : a way to define 2 kinds of actions:
 
**Post Actions : a way to define 2 kinds of actions:
***actions done just after the element creation
+
***actions done just after the element creation, using the paste action
 
***actions done after have pasting all cell values
 
***actions done after have pasting all cell values
 
***currently, Papyrus provides Post Action only for stereotype application
 
***currently, Papyrus provides Post Action only for stereotype application
Line 485: Line 564:
  
 
===Filter Strategy===
 
===Filter Strategy===
By default, the row with a cell contains is inconsistent with the column are hidden. There is 2 main cases in Papyrus:
+
* By default, the row with a cell contains is inconsistent with the column are hidden. There is 2 main cases in Papyrus:
*the cell display N/A for a value which is not a string
+
** the cell display N/A for a value which is not a string
*the user uses <code>num:</code> (see below) in the string editor, all values which are not numerical values will be hidden
+
** the user uses <code>num:</code> (see below) in the string editor, all values which are not numerical values will be hidden
 +
* In case of filtering on several column in the same time, we will display only the rows matching all applied filters
 +
* In case of collection in a cell, the row matches if the collection contains the wanted element
  
 
===Available Cell Editors for Filter Row===
 
===Available Cell Editors for Filter Row===
Line 504: Line 585:
 
Some options are available:
 
Some options are available:
 
*<code>contains:</code>: it is the default behavior, you should not have to add this keyword before the type your text.
 
*<code>contains:</code>: it is the default behavior, you should not have to add this keyword before the type your text.
*<code>num:</code>: This mode will allow you to use comparison operator : <code><</code>, <code>></code>, <code><=</code>, <code>>=</code> and <code>=</code>
+
*<code>num:</code>: This mode will allow you to use comparison operators : <code><</code>, <code>></code>, <code><=</code>, <code>>=</code>, <code>=</code> and <code><></code> for not equals.
 
*<code>=</code>: This mode allow you to find only the cell with this value
 
*<code>=</code>: This mode allow you to find only the cell with this value
 
*<code>regex:</code>: This mode allow you to type a regex. The result will be all rows where we found a substring matching the regex
 
*<code>regex:</code>: This mode allow you to type a regex. The result will be all rows where we found a substring matching the regex
Line 532: Line 613:
 
=== Generalities ===
 
=== Generalities ===
 
   
 
   
As illustrated below this feature is enabled when the <I>Link With Editor</I> button is activated : <br />
+
As illustrated below this feature is enabled when the <I>Link With Editor</I> button is activated : <br/>
  
[[File:ModelExplorerLinkWithEditor.png|thumb|center|350px|ModelExplorerLinkWithEditor]] <br />
+
[[File:ModelExplorerLinkWithEditor.png|center|ModelExplorerLinkWithEditor]] <br/>
  
This link the active diagram, in the multi editor view, with the model explorer view. This link works bidirectionally. <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 />
+
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|center|SelectionWithDiagram|thumb|350px]] <br />
+
[[File:SelectionWithDiagram.png|center|SelectionWithDiagram|]] <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 />
+
<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 ===
 
=== 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 />
+
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|none| frame| GenericSelection]]
  
{{multiple image
+
 
| width = 250
+
[[File:RequirementSelection.png|none| frame |RequirementSelection]]
| align = center
+
 
| direction = horizontal
+
 
| image1 = GenericSelection.png
+
[[File:AllocationSelection.png|none|frame| AllocationSelection]]
| caption1 = GenericSelection
+
 
| image2 = RequirementSelection.png
+
 
| caption2 = RequirementSelection
+
[[File:ViewsSelection.png|none|frame| ViewsSelection]]
| image3 = AllocationSelection.png
+
| caption3 = AllocationSelection
+
| image4 = ViewsSelection.png
+
| caption4 = ViewsSelection
+
}}
+
{{clear}} <br />
+
  
 
=== Column selections ===
 
=== Column selections ===
  
The axis of the table can also be inverted and the elements represented as columns with their properties as rows : <br />
+
The axis of the table can also be inverted and the elements represented as columns with their properties as rows : <br/>
  
[[File:ColumnSelection.png|center|ColumnSelection|thumb|350px]]  <br />
+
[[File:ColumnSelection.png|none | frame|ColumnSelection]]  <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 />
+
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 ===
 
=== 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 />
+
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/ >
 
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/ >
  
{{multiple image
+
[[File:CellSelection.png|none|frame|CellSelection]] <br/>
| width = 350
+
[[File:CellSelectionInvertAxis.png|none|frame|CellSelectionInvertAxis]] <br/>
| align = center
+
| direction = horizontal
+
| image1 = CellSelection.png
+
| caption1 = CellSelection
+
| image2 = CellSelectionInvertAxis.png
+
| caption2 = CellSelectionInvertAxis
+
}}
+
{{clear}} <br />
+
  
 
=== Mixed Selections ===
 
=== 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 />
+
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/>
  
{{multiple image
+
[[File:MixedSelection.png|none|frame|MixedSelection]] <br/>
| width = 350
+
[[File:MixedSelectionReq.png|none|frame|MixedSelectionReq]] <br/>
| align = center
+
| direction = horizontal
+
| image1 = MixedSelection.png
+
| caption1 = MixedSelection
+
| image2 = MixedSelectionReq.png
+
| caption2 = MixedSelectionReq
+
}}
+
{{clear}} <br />
+
  
 
=== From the model explorer ===
 
=== From the model explorer ===
  
As a reminder, selections initiated by the model explorer will only result in column or row selections as the table has no means of knowing what type of selection is required by the user. <br />
+
As a reminder, selections initiated by the model explorer will only result in column or row selections as the table has no means of knowing what type of selection is required by the user. <br/>
  
  
 
== Styles in Papyrus' tables ==
 
== Styles in Papyrus' tables ==
  
It is important to note that the changes below are coming into eclipse Mars as they are dependant on a modification of the model. <br />
+
It is important to note that the changes below are coming into eclipse Mars as they are dependant on a modification of the model. <br/>
  
 
=== Styles in the resize of a table's components ===
 
=== Styles in the resize of a table's components ===
  
NamedStyles are used to introduce those changes and intValues ares used to mark the resizing of table elements. <br />
+
NamedStyles are used to introduce those changes and intValues ares used to mark the resizing of table elements. <br/>
Below is the default model used for the table used to demonstrate the changes when styles are written and/or applied in a table. <br />
+
Below is the default model used for the table used to demonstrate the changes when styles are written and/or applied in a table. <br/>
  
[[File:defaultTable.png|center|defaultTable|thumb|350px]] <br />
+
[[File:defaultTable.png|none|frame|Default Table]] <br/>
  
 
==== Resize of the Headers ====
 
==== Resize of the Headers ====
  
Sliding the header's cell frontier will result in the creation of a <I> localHeaderAxisConfiguration </I> and to it will be add the new values of the header's width and/or height. Both sets of headers can have stored values for heoght and width as the table can be inverted and if so the row and the column headers will be too. <br />
+
Sliding the header's cell frontier will result in the creation of a <I> localHeaderAxisConfiguration </I> and to it will be add the new values of the header's width and/or height. Both sets of headers can have stored values for heoght and width as the table can be inverted and if so the row and the column headers will be too. <br/>
Below is the state of the model during the first change: resizing the row headers' index and label. <br />
+
Below is the state of the model during the first change: resizing the row headers' index and label. <br/>
  
In this case the local header created is the RowHeader but if the column headers are changed the model gets a ColumnHeader as illustrated by the image below. <br />
+
In this case the local header created is the RowHeader but if the column headers are changed the model gets a ColumnHeader as illustrated by the image below. <br/>
 +
 
 +
[[File:resizeRowHeaders.png|none|frame|Mixed Selection Req]] <br/>
 +
[[File:resizeAllHeaders.png|none|frame|Resize All Headers]] <br/>
  
{{multiple image
 
| width = 350
 
| align = center
 
| direction = horizontal
 
| image1 = resizeRowHeaders.png
 
| caption1 = resizeRowHeaders
 
| image2 = resizeAllHeaders.png
 
| caption2 = resizeAllHeaders
 
}}
 
{{clear}} <br />
 
  
 
==== Resize of the Axis ====
 
==== Resize of the Axis ====
  
The values carried by the localHeaders only affect the headerLayer of the table and therefore the height or width of the Axis (columns and/or rows) will not be affected by them. For those to change, new values will be carried by the Axis themselves as can be seen in the following image. Of course, the method used to change the values is the same sliding of the frontier used when resizing the headers. <br />
+
The values carried by the localHeaders only affect the headerLayer of the table and therefore the height or width of the Axis (columns and/or rows) will not be affected by them. For those to change, new values will be carried by the Axis themselves as can be seen in the following image. Of course, the method used to change the values is the same sliding of the frontier used when resizing the headers. <br/>
  
[[File:resizeAxis.png|center|resizeAxis|thumb|350px]]  <br />
+
[[File:resizeAxis.png|center|resizeAxis]]  <br/>
  
In this example one row and two columns were changed and they all bear the corresponding value in their Axis element. <br /> <br />
+
In this example one row and two columns were changed and they all bear the corresponding value in their Axis element. <br/> <br/>
  
 
=== Styles in the merge of Axis elements ===
 
=== Styles in the merge of Axis elements ===
  
For this type of change the NamedStyles used are booleanValues, indicating if the Axis are to be merged or not.  <br />
+
For this type of change the NamedStyles used are booleanValues, indicating if the Axis are to be merged or not.  <br/>
The behavior has been copied from the previous one and the booleans will be caried by the Axis, in case of a user selecting the axis to be merged, or the localHeaders if the user chooses to merge all the rows or columns of the table in one go. <br />
+
The behavior has been copied from the previous one and the booleans will be caried by the Axis, in case of a user selecting the axis to be merged, or the localHeaders if the user chooses to merge all the rows or columns of the table in one go. <br/>
To initiate the merge, the user has access to a merge menu and chooses between the four types of merge the one best suited to the task (as illustrated below). The programm then proceeds to merge the cells of same value inside the selection. <br />
+
To initiate the merge, the user has access to a merge menu and chooses between the four types of merge the one best suited to the task (as illustrated below). The programm then proceeds to merge the cells of same value inside the selection. <br/>
  
[[File:mergeOptions.png|center|mergeOptions|thumb|350px]] <br />
+
[[File:mergeOptions.png|center|Merge Options]] <br/>
  
 
==== Merge selected Axis ====
 
==== Merge selected Axis ====
  
As mentionned above, in case of a merge of a selected axis, the boolean will be caried by the Axis element in the model. <br />
+
As mentionned above, in case of a merge of a selected axis, the boolean will be caried by the Axis element in the model. <br/>
  
[[File:booleanMergeSelectedColumn.png|center|booleanMergeSelectedColumn|thumb|350px]] <br />
 
  
The other choices will then be greyed-out and a toggle will be displayed on the selected option to notify the user that this is (or these are) the axis merge. <br />
+
[[File:booleanMergeSelectedColumn.png|center|Boolean Merge Selected Column]] <br/>
  
[[File:mergeSelectedColumns2.png|center|mergeSelectedColumns2|thumb|350px]] <br />
+
The other choices will then be greyed-out and a toggle will be displayed on the selected option to notify the user that this is (or these are) the axis merge. <br/>
  
If the user selects a cell or an axis that has not been part of the previously merged selection, the toggle will not be displayed but the option will still be visible as the other will still be greyed-out. <br />
+
[[File:mergeSelectedColumns2.png|center|Merge Selected Columns]] <br/>
It is important to note that, if the user so chooses, the merge option can be reapplied to the new selection and the merge span will consist of the newly selected axis. A cautionary note however as only full rows or columns will be merged. <br />
+
 
 +
If the user selects a cell or an axis that has not been part of the previously merged selection, the toggle will not be displayed but the option will still be visible as the other will still be greyed-out. <br/>
 +
It is important to note that, if the user so chooses, the merge option can be reapplied to the new selection and the merge span will consist of the newly selected axis. A cautionary note however as only full rows or columns will be merged. <br/>
 +
 
 +
[[File:mergeSelectedColumns.png|none|frame|Merge Selected Columns]] <br/>
 +
[[File:mergeSelectedRow.png|none|frame|Merge Selected Row]] <br/>
 +
[[File:mergeSelectedRows2.png|none|frame|Merge Selected Rows]] <br/>
 +
[[File:mergeSelectedRows3.png|none|frame|Merge Selected Rows]] <br/>
  
{{multiple image
 
| width = 250
 
| align    = center
 
| direction = horizontal
 
| image1    = mergeSelectedColumns.png
 
| caption1  = mergeSelectedColumns
 
| image2    = mergeSelectedRow.png
 
| caption2  = mergeSelectedRow
 
| image3    = mergeSelectedRows2.png
 
| caption3  = mergeSelectedRows2
 
| image4    = mergeSelectedRows3.png
 
| caption4  = mergeSelectedRows3
 
}}
 
{{clear}} <br />
 
  
 
==== Merge All row/column Axis ====
 
==== Merge All row/column Axis ====
  
The user can merge all the rows in the table and the result will look like this. <br />
+
The user can merge all the rows in the table and the result will look like this. <br/>
 +
[[File:booleanMergeAllRows.png|none|frame|booleanMergeAllRows]] <br/>
  
{{multiple image
+
  [[File:mergeAllRows2.png|none|frame|Merge All Rows]] <br/>
| width = 350
+
| align    = center
+
| direction = horizontal
+
| image1    = booleanMergeAllRows.png
+
| caption1 = booleanMergeAllRows
+
| image2    = mergeAllRows2.png
+
| caption2  = mergeAllRows2
+
}}
+
{{clear}} <br />
+
  
 
== Edition of merged Cells ==
 
== Edition of merged Cells ==
  
Once the cells are merged, the user might want to edit them. This edition can be problematic as the merge only takes into account the values of the cells and not their types when applying the merge option. This is shown in the example below asa classifier can be an activity but not the other way around. <br />
+
Once the cells are merged, the user might want to edit them. This edition can be problematic as the merge only takes into account the values of the cells and not their types when applying the merge option. This is shown in the example below asa classifier can be an activity but not the other way around. <br/>
The first image illustrates the model and the profile's stereotype, applied on both classes, containing the three attributes activity and classifiers. <br />
+
The first image illustrates the model and the profile's stereotype, applied on both classes, containing the three attributes activity and classifiers. <br/>
 +
 
 +
[[File:tableProfileElements.png|center|Table Profile Elements|]] <br/>
 +
 
 +
When the user clicks on the left most part of the merged area, under the activity label, the editing tool only shows activity1 as a possible choice. But if the user selects the right side, under the classifier label, then the choices are many. In this example the choice is to apply the interface type to the merged cells and handle the editing behavior as illustrated by the three next images. <br/>
 +
 
 +
[[File:activityEdition.png|none|frame|Activity edition]] <br/>
 +
 
 +
[[File:classifierEdition.png|none|frame|Classifier edition]] <br/>
 +
 
 +
[[File:editedTable.png|none|frame|Edition's result]] <br/>
 +
 
 +
 
 +
The tool will then automatically detect the possibility, or impossibility, of the edition and split the merge accordingly. <br/>
 +
Please note that the merge selection will not be changed and the selected axis will still carry their merge booleans as other values might still be equal and therefore the user might still want those merged. <br/>
 +
 
 +
=Existing Cell Editors=
 +
Several kind of cell editors are available in Papyrus Table. Currently, the user can't choose himself the cell editor to use for a cell/row/column.
 +
==DialogCellEditor==
 +
 
 +
==TextualCellEditor==
 +
Several kind of cell editors are available:
 +
===String cell editor===
 +
===String with completion cell editor===
 +
*UML ValueSpecification Cell Editor: This editor allows to edit and create ValueSpecification from a text field. Description is available [[Papyrus_Developer_Guide/Papyrus_Embedded_Editors_Documentation/Value_Specification_Xtext_editor|here]]
 +
*UML Reference Cell Editor: This editor allows to edit reference (single or multi valued) using a text field. This editor provides a completion mechanism (using CTRL+SPACE) and validate the string (the string is valid when we are able to find element from the text typed by the user). For further information, please see the page [[Papyrus_Developer_Guide/Papyrus_Embedded_Editors_Documentation/Textual_Editor_For_NamedElement]]
 +
but not the other way around. <br/>
 +
The first image illustrates the model and the profile's stereotype, applied on both classes, containing the three attributes activity and classifiers. <br/>
 +
 
 +
[[File:tableProfileElements.png|center|Table Profile Elements|]] <br/>
 +
 
 +
When the user clicks on the left most part of the merged area, under the activity label, the editing tool only shows activity1 as a possible choice. But if the user selects the right side, under the classifier label, then the choices are many. In this example the choice is to apply the interface type to the merged cells and handle the editing behavior as illustrated by the three next images. <br/>
 +
 
 +
[[File:activityEdition.png|none|frame|Activity edition]] <br/>
 +
 
 +
[[File:classifierEdition.png|none|frame|Classifier edition]] <br/>
 +
 
 +
[[File:editedTable.png|none|frame|Edition's result]] <br/>
 +
 
 +
 
 +
The tool will then automatically detect the possibility, or impossibility, of the edition and split the merge accordingly. <br/>
 +
Please note that the merge selection will not be changed and the selected axis will still carry their merge booleans as other values might still be equal and therefore the user might still want those merged. <br/>
 +
 
 +
=Paste and insert=
 +
==Video==
 +
A video is available [[https://youtu.be/WGrr_LGy3sg  here]].
 +
 
 +
==Description==
 +
 
 +
The paste and the insert work differently (create new objects or update existing ones) depending on the selection in the table as following:
 +
 
 +
{| class="wikitable"  border="1"
 +
!
 +
! style="text-align: center;" | Paste ( 1 )
 +
! style="text-align: center;" | Insert ( 2 )
 +
|-
 +
| No selection ( A )
 +
| style="text-align: center;" | Create
 +
| style="text-align: center;" | Create
 +
|-
 +
| Cells ( B )
 +
| style="text-align: center;" | Update
 +
| style="text-align: center;" | X
 +
|-
 +
| Rows Header ( C )
 +
| style="text-align: center;" | Update
 +
| style="text-align: center;" | Create
 +
|-
 +
| Columns Header ( D )
 +
| style="text-align: center;" | Update
 +
| style="text-align: center;" | X
 +
|}
 +
 
 +
Actions:
 +
*<u>'''Create'''</u>: It shall imply first the check of the elements' existence in the table (or selection), then eventual creation of new elements at a given position or at the end of the table
 +
*<u>'''Update'''</u>: It shall only imply the update of existing elements
 +
 
 +
 
 +
In details:
 +
*<u>'''A1'''</u>: Two differents possible "paste" types :
 +
**Number of columns pasted equals to the number of columns in table (including rows header): The objects pasted must be created according to the rows header in the clipboard.
 +
**Else (The result will be the same for '''A2'''): The existence of the pasted objects must be checked (depending on the axis identifier):
 +
***Object exists: The user can choose the action to do in this case:
 +
****<u>Replace</u>: The values must be overwritten
 +
****<u>Add</u>: A row must be added at the end of the table (for the tree table, if this is a sub-element of the first row selected, the row will be added to the end of the sub category) corresponding to the created object
 +
****<u>Skip</u>: No modification for this object
 +
****<u>Cancel</u>: Cancel all the actions
 +
***Object doesn't exist: A row must be added at the end of the table corresponding to the created object
 +
 
 +
*<u>'''B1'''</u>: Only the update of the cells must be applied:
 +
**Depending on the selection, values must be overwritten (for the following table, selection must be represented as following: ''[NumberOfRows, NumberOfColumn]''):
 +
{| class="wikitable"  border="1"
 +
! style="text-align: center;" | Selection
 +
! style="text-align: center;" | Paste
 +
! style="text-align: center;" | Action
 +
|-
 +
| style="text-align: center;" | [X, Y]
 +
| style="text-align: center;" | [X, Y]
 +
| Values in the selection must be updated.
 +
|-
 +
| style="text-align: center;" | [X, Y]
 +
| style="text-align: center;" | [1, Y]
 +
| The values pasted must be updated for all selected rows (by repeat of the pasted row values).
 +
|-
 +
| style="text-align: center;" | |X, Y]
 +
| style="text-align: center;" | [Z, Y]
 +
| An error message will be displayed.
 +
|-
 +
| style="text-align: center;" | [X, Y]
 +
| style="text-align: center;" | [X, Z]
 +
| An error message will be displayed.
 +
|}
 +
 
 +
*<u>'''C1'''</u>: The existence of the pasted objects must be checked into the selection (depending on the axis identifier):
 +
**Object exists: the values of the corresponding row must be updated
 +
**Object doesn't exist: No modification
 +
 
 +
*<u>'''C2'''</u>: The existence of the pasted objects must be checked into the selection (depending on the axis identifier):
 +
**Object exists: The user can choose the action to add in this case:
 +
***<u>Replace</u>: The values must be overwritten
 +
***<u>Add</u>: A row must be added before the selection (for the tree table, if this is a sub-element of the first row selected, the row will be added to the end of the sub category) of the table corresponding to the created object
 +
***<u>Skip</u>: No modification for this row
 +
***<u>Cancel</u>: Cancel all the action
 +
**Object doesn't exist: A row must be added before the selection (if the first element selected is a category, the row will be added as first child of this category) of the table corresponding to the created object
 +
 
 +
*<u>'''D1'''</u>: Only the update of the columns must be applied:
 +
**Depending on the selection, values must be overwritten (for the following table, selection must be represented as following: ''[NumberOfRows, NumberOfColumn]''):
 +
{| class="wikitable"  border="1"
 +
! style="text-align: center;" | Selection
 +
! style="text-align: center;" | Paste
 +
! style="text-align: center;" | Action
 +
|-
 +
| style="text-align: center;" | [X, Y]
 +
| style="text-align: center;" | [X, Y]
 +
| Values in the selection must be updated.
 +
|-
 +
| style="text-align: center;" | [X, Y]
 +
| style="text-align: center;" | [X, 1]
 +
| The values pasted must be updated for all selected columns (by repeat of the pasted column values).
 +
|-
 +
| style="text-align: center;" | |X, Y]
 +
| style="text-align: center;" | [Z, Y]
 +
| An error message will be displayed.
 +
|-
 +
| style="text-align: center;" | [X, Y]
 +
| style="text-align: center;" | [X, Z]
 +
| An error message will be displayed.
 +
|}
 +
 
 +
==How axis identifier comparison works==
 +
 
 +
In some cases (A1, A2 and C2), the existence of the pasted or inserted objects must be checked. This is done by comparison between pasted object axis identifier and the existing axis identifier values.
 +
To define this axis identifier, just select the column (available in the table) from the paste configuration:
 +
[[File:ManageAxisIdentifier.jpg|none|frame]]
 +
 
 +
 
 +
==Warnings and errors==
 +
===Warnings===
 +
Here, you will find the possible warning messages at the end of the paste/insert (if no modification is applied during the paste/insert and a warning message was caught, the warning message must be displayed as error):
 +
*When an identifier is not found in the selection:
 +
[[File:WarningNotFound.jpg|none|frame]]
 +
*When an identifier is not found in the selection but is created:
 +
[[File:WarningNotFoundButCreated.jpg|none|frame]]
 +
*When a non-editable value tried to be updated, this type of warning will appear:
 +
[[File:WarningNonEditableValue.jpg|none|frame]]
 +
 
 +
===Errors===
 +
Two types of error can be displayed while the paste/insert:
 +
*PasteConfiguration definition error
 +
*Error during the process of the paste/insert
 +
 
 +
 
 +
====PasteConfiguration errors====
 +
Here, you will find the possible paste configuration error messages at the end of the paste/insert:
 +
*When the element id is not defined:
 +
[[File:ErrorPCElementIdNull.jpg|none|frame]]
 +
*When the containment feature is not defined:
 +
[[File:ErrorPCContainmentFeatureNull.jpg|none|frame]]
 +
*When the axis identifier is not defined (and when it is necessary):
 +
[[File:ErrorPCAxisIdentifierNull.jpg|none|frame]]
 +
*When the element type cannot be found:
 +
[[File:ErrorPCElementTypeCantBeFound.jpg|none|frame]]
 +
*When the feature is not containment:
 +
[[File:ErrorPCFeatureNotContainment.jpg|none|frame]]
 +
*When the feature is not compatible:
 +
[[File:ErrorPCFeatureNotCompatible.jpg|none|frame]]
 +
*When the context of the table does not have the declared containment feature:
 +
[[File:ErrorPCContextDoesNotHaveFeature.jpg|none|frame]]
 +
*When a TreeFillingConfiguration does not have paste configuration:
 +
[[File:ErrorPCTreeFillingNoPasteConfiguration.jpg|none|frame]]
 +
*When more than 1 category is defined for a depth and when the table has hidden categories:
 +
[[File:ErrorPCMoreThan1Category.jpg|none|frame]]
 +
 
 +
 +
====Errors during the process====
 +
Here, you will find the possible error messages at the end of the paste/insert:
 +
*When the axis identifier was not found in the table:
 +
[[File:ErrorAxisIdentifierNotFound.jpg|none|frame]]
 +
*When the number of rows pasted is not equals to the number of rows in the table:
 +
[[File:ErrorRowsNotEquals.jpg|none|frame]]
 +
*When the number of columns pasted is not equals to the number of columns in the table:
 +
[[File:ErrorColumnsNotEquals.jpg|none|frame]]
 +
*When the 'Replace' action is wanted by the user but more than one object correspond to the identifier:
 +
[[File:ErrorCorrespondingMultipleRows.jpg|none|frame]]
 +
*When an invalid value tried to be set in a new object in attached mode or during the update:
 +
[[File:ErrorInvalidValueAttachedModeOrUpdate.jpg|none|frame]]
 +
*When an invalid value tried to be set in a new object in detached mode:
 +
[[File:ErrorInvalidValueDetachedModeAndCreation.jpg|none|frame]]
 +
*When an unknown exception occured:
 +
[[File:ErrorUnknownExceptionOccurred.jpg|none|frame]]
 +
 
 +
==Details and Example==
 +
===Paste with rows header===
 +
The paste with rows header in the clipboard must respect the number of columns in the target table.
 +
The hierarchy of the rows header must be respected, i.e. when the categories are hidden or shown.
 +
 
 +
When the categories are hidden, the number of defined categories by depth must be equals to 1 if you want to paste.
 +
 
 +
<u>N.B:</u> The undo/redo is not implemented for this paste.
 +
 
 +
====Examples====
 +
=====Visible categories=====
 +
Get the following current table:
 +
[[File:PasteWithRowsHeaderVisibleCategoriesInitial.jpg|none|frame]]
 +
 
 +
And this copied text:
 +
[[File:PasteWithRowsHeaderVisibleCategoriesToCopy.jpg|none|frame]]
 +
 
 +
 
 +
The objects are created with the correct values:
 +
[[File:PasteWithRowsHeaderVisibleCategoriesResult.jpg|none|frame]]
 +
 
 +
 
 +
=====Hidden categories=====
 +
Get the following current table:
 +
[[File:PasteWithRowsHeaderHiddenCategoriesInitial.jpg|none|frame]]
 +
 
 +
With this following categories configuration:
 +
[[File:PasteWithRowsHeaderHiddenCategoriesConfiguration.jpg|none|frame]]
 +
 
 +
And this copied text:
 +
[[File:PasteWithRowsHeaderHiddenCategoriesToCopy.jpg|none|frame]]
 +
 
 +
 
 +
The objects are created with the correct values:
 +
[[File:PasteWithRowsHeaderHiddenCategoriesResult.jpg|none|frame]]
 +
 
 +
 
 +
===Paste and insert without selection (A1 and A2)===
 +
This paste or insert allows to replace, add or skip the existing objects and allows to create the non-existing objects. The 'Replace' action allows to update the values of the existing object, the 'Skip' action does nothing on it and the 'Add' action allows to create an object on the same depth of the existing one.
 +
The created objects must be at the end of the table.
 +
 
 +
For the TreeTable, some specifications exist:
 +
*if no object was found for the identifier, the created object must be a depth 0 object because we can't defined the depth of the paste object
 +
*if an existing object is found for the identifier and the user wants its creation, an object with the same depth will be created depending on the paste configuration of the existing object
 +
*the non first level created object won't be at the end of the table but at the end of the feature which it is associated
 +
 
 +
====Example====
 +
Get the following current table:
 +
[[File:PasteWithoutSelectionInitial.jpg|none|frame]]
 +
 
 +
And this copied text:
 +
[[File:PasteWithoutSelectionToCopy.jpg|none|frame]]
 +
 
 +
 
 +
Depending on the previous specifications explained, the result is the following:
 +
[[File:PasteWithoutSelectionResult.jpg|none|frame]]
 +
 
 +
 
 +
===Paste with cells selection (B1)===
 +
Depending on the selection and to the clipboard, differents actions are possible:
 +
*if only one cell is selected, the cells corresponding to rectangular width and height of clipboard must be overwritten
 +
*if some rows are selected and only one is available in the clipboard, the selected rows must be updated with the values of the single row of the clipboard
 +
*else the width and height of the selection must be equals respectively to the width and height from the clipboard, the selected cells will be modified
 +
 
 +
====Examples====
 +
=====Cells with some rows and columns=====
 +
Get the following current table and selection:
 +
[[File:PasteSomeRowsInitial.jpg|none|frame]]
 +
 
 +
And this copied text:
 +
[[File:PasteCellsSelectedToCopy.jpg|none|frame]]
 +
 
 +
 
 +
The result of the paste is selected and is this following:
 +
[[File:PasteCellsSelectedResult.jpg|none|frame]]
 +
 
 +
 
 +
=====One cell selected=====
 +
Get the following current table and selection:
 +
[[File:PasteOneCellSelectedInitial.jpg|none|frame]]
 +
 
 +
And this copied text:
 +
[[File:PasteCellsSelectedToCopy.jpg|none|frame]]
 +
 
 +
 
 +
The result of the paste is selected and is this following:
 +
[[File:PasteCellsSelectedResult.jpg|none|frame]]
 +
 
 +
 
 +
=====One row in clipboard=====
 +
Get the following current table and selection:
 +
[[File:PasteOneRowClipboardInitial.jpg|none|frame]]
 +
 
 +
And this copied text:
 +
[[File:PasteOneRowClipboardToCopy.jpg|none|frame]]
 +
 
 +
 
 +
The result of the paste is selected and is this following:
 +
[[File:PasteOneRowClipboardResult.jpg|none|frame]]
 +
 
 +
 
 +
===Paste with rows header selection (C1)===
 +
This paste allows to update the selected existing rows when the rows header height selected is equals to the height of rows in the clipboard.
 +
 
 +
====Example====
 +
Get the following current table and selection:
 +
[[File:PasteRowsSelectionInitial.jpg|none|frame]]
 +
 
 +
And this copied text:
 +
[[File:PasteRowsSelectionToCopy.jpg|none|frame]]
 +
 
 +
 
 +
The result of the paste is selected and is like following (the first class is not modified because it does not exist):
 +
[[File:PasteRowsSelectionResult.jpg|none|frame]]
 +
 
 +
 
 +
===Insert with rows header selection (C2)===
 +
This paste or insert allows to replace, add, skip the existing objects and allows to create the non-existing objects. The 'Replace' action allows to update the values of the existing object, the 'Skip' action does nothing on it and the 'Add' action allows to create an object on the same depth of the existing one.
 +
The created objects must be inserted before the selection.
 +
 
 +
For the TreeTable, some specifications exist (in addition of specifications of the paste/insert without selection ([[#Paste and insert without selection (A1 and A2)|A1 and A2]]):
 +
*if a paste is realised with a selected category , an object will be created and added to this feature at the first position
 +
*the created objects must be inserted before the first selected row for the depth 0 but must be added at the last position for others depths because it is not possible to define the position to be used
 +
 
 +
====Examples====
 +
=====Insert on object=====
 +
Get the following current table and selection:
 +
[[File:InsertRowSelectionInitial.jpg|none|frame]]
 +
 
 +
And this copied text:
 +
[[File:InsertRowSelectionToCopy.jpg|none|frame]]
 +
 
 +
 
 +
The result is the following:
 +
[[File:InsertRowSelectionResult.jpg|none|frame]]
 +
 
 +
 
 +
=====Insert on category=====
 +
Get the following current table and selection:
 +
[[File:InsertOnCategorySelectionInitial.jpg|none|frame]]
 +
 
 +
And this copied text:
 +
[[File:InsertOnCategorySelectionToCopy.jpg|none|frame]]
 +
 
 +
 
 +
The result is the following:
 +
[[File:InsertOnCategorySelectionResult.jpg|none|frame]]
 +
 
 +
 
 +
===Paste with columns header selection (D2)===
 +
Depending on the selection and to the clipboard, different actions are possible:
 +
*if some columns are selected and only one column is available in the clipboard, the selected columns must be updated with the values of the single column of the clipboard
 +
*if some columns are selected and only one row is available in the clipboard, the selected columns must be updated with the rows' values repeated for each rows
 +
*else the width of the selection must be equals to the width from the clipboard, the selected columns will be modified
 +
 
 +
====Examples====
 +
=====Some column selected=====
 +
Get the following current table and selection:
 +
[[File:PasteSomeColumnsSelectionInitial.jpg|none|frame]]
 +
 
 +
And this copied text:
 +
[[File:PasteSomeColumnsSelectionToCopy.jpg|none|frame]]
 +
 
 +
 
 +
The result is the following:
 +
[[File:PasteSomeColumnsSelectionResult.jpg|none|frame]]
 +
 
 +
 
 +
=====One column in clipboard=====
 +
Get the following current table and selection:
 +
[[File:PasteOneColumnClipboardInitial.jpg|none|frame]]
 +
 
 +
And this copied text:
 +
[[File:PasteOneColumnClipboardToCopy.jpg|none|frame]]
 +
 
 +
 
 +
The result is the following:
 +
[[File:PasteOneColumnClipboardResult.jpg|none|frame]]
 +
 
 +
 
 +
=====One row in clipboard=====
 +
Get the following current table and selection:
 +
[[File:PasteOneRowInColumnSelectionClipboardInitial.jpg|none|frame]]
 +
 
 +
And this copied text:
 +
[[File:PasteOneRowInColumnSelectionClipboardToCopy.jpg|none|frame]]
  
[[File:tableProfileElements.png|center|tableProfileElements|thumb|350px]] <br />
 
  
When the user clicks on the left most part of the merged area, under the activity label, the editing tool only shows activity1 as a possible choice. But if the user selects the right side, under the classifier label, then the choices are many. In this example the choice is to apply the interface type to the merged cells and handle the editing behavior as illustrated by the three next images. <br />
+
The result is the following:
 +
[[File:PasteOneRowInColumnSelectionClipboardResult.jpg|none|frame]]
  
{{multiple image
+
=Import from file (CSV)=
| width = 300
+
The import from file (CSV) works like [[#Paste with rows header|paste with rows header]] when the rows header are available in the CSV.
| align = center
+
| direction = horizontal
+
<!-- | footer = edition of the row cells -->
+
| image1 = activityEdition.png
+
| caption1 = activity edition
+
| image2 = classifierEdition.png
+
| caption2 = classifier edition
+
| image3 = editedTable.png
+
| caption3 = edition's result
+
}}
+
{{clear}} <br />
+
  
The tool will then automatically detect the possibility, or impossibility, of the edition and split the merge accordingly. <br />
+
If the rows header are not available, the rows works like [[#Paste and insert without selection (A1 and A2)|insert without selection]] or [[#Insert with rows header selection (C2)|insert with rows header selection]] depending to the selection.
Please note that the merge selection will not be changed and the selected axis will still carry their merge booleans as other values might still be equal and therefore the user might still want those merged. <br />
+

Revision as of 09:36, 11 September 2019

Since Papyrus 0.10 (Eclipse Kepler), Papyrus provides a new version of the tabular editors. This version replaces the previous version in Eclipse Luna.
Since Papyrus 1.1.0 (Eclipse Mars), Papyrus provides hierarchical table too.

Contents

Glossary

  • category : in tree table, a category is a feature to listen : ownedAttributes for example.
  • context : the element on which the table is created. Thhis word is used in this documentation and in the table metamodel
    • The context will often be used as parent element in case of creation of a new element inside a table.
    • The context is used in synchronized table to provide the rows, according to the implementation of the table
  • depth : word used for tree table, its means the distance between the context of the table and the showed element. It starts to 0 with direct children's context.
  • Drag and Drop (DnD) : the action to select an element with the mouse and to move it to another located, could be done in the same Eclipse View or from an Eclipse View to another one. Always inside the same instance of Eclipse
  • DnD : see Drag And Drop
  • owner : the graphical parent of the table. it is used in the Model Explorer View to display the table to the wanted location. After creating a new table, in the general case, the owner field has the same value than the root field. This word is used in the Property View of the table (see Viewpoint documentation for further information)
  • root : the same thing than the context. This word is used in the Property View of the Table (see Viewpoint documentation for further information)
  • type : the type of the table is given a a field string owned by the object TableConfiguration. This field is used by the Tabular editors to know how to open and manage the instance of the tables. The type of a table can't be changed by the user. Example of known types :
    • PapyrusGenericTable : the type of UML Generic Table. This table is filled by DnD and accepts all UML Elements
    • PapyrusSysMLRequirementTable : the type of the Table used to edit Requirement. This table is synchronized and shows only Class stereotyped by Requirements directly owned by the context of the table.
    • PapyrusClassTreeTable : the type of the Class Tree Table. In this provided configuration, this table is fully synchronized. Its shows :
      • on first level (depth=0), the classes directly owned by the context of the table
      • on the second level (depth=1), the owned attributes, the owned operations and the nested classes of the classes displayed on the first level.
      • on the third level (depth=2), the parameters of the operations dsiplay on the the second level

Table areas

A table can be divided in several areas

  • Corner : the top left corner. Clicking on this area provides the action "Select All"
  • Row Header :
    • Index Row Header
      • It can be hidden
      • The index style can be changed, we can use letters : A,B...Z, AA, AB ... ZZ or numbers : 1, 2, 3...
    • Label Row Header
      • It can be hidden
      • It is a single column in flat table
      • It is composed by a single or by several columns in tree table
      • The "name" shown in the label can be changed. The user can change the name of the element or create an alias in case of read-only element.
      • The label's style can be changed by the user. The configuration feature depends on the kind of represented element. (name, icon, multiplicity, isDerived, type, ...)
  • Column Header
    • Index Column Header
      • It can be hidden
      • The index style can be changed, we can use letters : A,B...Z, AA, AB ... ZZ or numbers : 1, 2, 3...
    • Label Column Header
      • It can be hidden
      • The "name" shown in the label can be changed. The user can change the name of the element or create an alias in case of read-only element.
      • The label's style can be changed by the user. The configuration feature depends on the kind of represented element. (name, icon, multiplicity, isDerived, type, ...)
  • Body
    • It contains the editable cells of the table
    • It can't be hidden
The areas in a tree table

General presentation

Papyrus provides tabular editors to allow to the user to edit their models with a new way as well than the Diagram editors and the Property View. So, in the table, the user can create/destroy model's element and edit their features.

Papyrus provides to main kinds of tabular editors :

  1. normal table (also called flat table)
  2. tree table (also called hierarchical table)

Moreover the contents (most often the rows) of the table, can be synchronized on the context of the table.

Normal table and synchronization

  1. Normal table can be synchronized or not, it depends of the type of the table. The switch between synchronization and no synchronization is not allowed.
  2. if the table is not synchronized, it is filled by the user using Drag and Drop. The user selects an element displayed in the Model Explorer and drop it into an opened table (in the row header area).

This action will create a new row, if the dropped element is allowed by the table implementation.

  1. if the table is synchronized, the user can't drop element to add rows. The rows are calculated according to the table context and the table implementation. The user can't change the allowed context of the rows.

Tree Table and synchronization

The contents of the tree table is always synchronized, excepted for the first level (depth=0), which can be synchronized of filled by the user by Drag and Drop from the ModelExplorer, as for normal table. The Tree Table provides a way to choose :

  • the filling of the first level (DnD or synchronization)
  • the number of levels (depths) to listen and what to listen

Some table snapshots

an example of normal table (UML Generic table)

an example of tree table, with the hierarchy displayed on several columns, and categories visible (UML Tree Class table)

an example of tree table, with the hierarchy displayed on several columns, and categories hidden (UML Tree Class table)

an example of tree table, with the hierarchy displayed on one column, and categories visible (UML Tree Class table)


Existing Tables in small words

  • UML Generic Table
  • SysML Allocation Table
  • SysML Requirement Table
  • Views Table
  • UML Class Tree Table


UML Generic Table

  • This table is a flat table.
  • Elements Accepted : UML Element only (all of them)
  • Filling Way : User, by Drag&Drop from the Model Explorer
  • Possible Context : all UML Element.
  • Save : All rows displayed in the table are saved in the model
  • Element Creation : All UML Elements


SysML Allocation Table

  • This table is a flat table.
  • Elements Accepted : SysML Allocation only
  • Filling Way : Automatic, by Synchronization on the context of the model. Only the Allocation directly owned by the context of the table are displayed.
  • Possible Context : UML Package, with the SysML Profile Allocations applied.
  • Save : The Rows are not serialized in the model, because they are derived of the UML Model.
  • Element Creation : SysML Allocation

SysML Requirement Table

  • This table is a flat 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.
  • Possible Context : UML Package, with the SysML Profile Requirement applied.
  • Save : The Rows are not serialized in the model, because they are derived of the UML Model.
  • Element Creation : SysML Requirement

Views Table

  • This table is a flat table.
  • Elements Accepted : Papyrus Views (Table/Diagram/...) only
  • Filling Way : Automatic, by Synchronization on the context of the model.
  • Possible Context : All UML Elements
  • Save : The Rows are not serialized in the model, because they are derived of the notation Model.
  • Element Creation : None

UML Class Tree Table

  • This table is a tree table
  • Element accepted : Classes (depth=0 and depth=1), Properties (depth=1), Operations (depth=1), Parameters (depth=2)
  • Filling way : Automatic, synchronized on the context of the table
  • Possible context : Package or Class
  • Save : The rows are not serialized in the model, because they are derivied from the context of the classes
  • Element Creation : Classes (depth=0 and depth=1), Properties (depth=1), Operations (depth=1), Parameters (depth=2)

Table Features

The table framework provides a large number of features. Here we will describe all existing features supported by the framework, but not necessarily by all the tables. The main part of the features supported by flat tables are supported by tree table too. Moreover Tree table provides some specific features

Flat Table Features

Supported features

Edit Cell Values
Double Click on a cell or selecting a cell then pressing F2, excepted for derived features. This action opens a specific editors for each kind of features, according to the table configuration. These editor are available
  • Inline string editor for string, integer, real, .... with a specific validator according the type of the edited feature
  • Combo box, for enumeration, boolean and single reference
  • Dialog for single and multi references
  • Checkbox directly editable without double clicking or pressing F2
  • XText editors
Change Axis (Columns/Rows) Order
  • Click on the axis to move and drop it to its new location.
Invert Axis (Exchange Columns And Rows)
  • Select the action Invert Axis in the popup menu or change it into the Table Property View.
Invert Axis in the Table Property View
Add Axis (Column/Row) Element by Drag&Drop from another view (ModelExplorer)
  • Select your element and drop it into the table, in the column region or in the row region to add it.
Sort rows clicking on column header
  • Row axis can be sorted by clicking on column header.
    1. Press ALT
      1. , then left click on the wanted column header : the rows are sorted ascending,
      2. clicking a second time, the rows are sorted descending
      3. clickling a third time, the rows return to the default sort
    2. Pressing MAJ + ALT allows to sort rows using several columns. The last selected column is the first one used to do the sort
  • Update of the sorted state
    1. new row added to the table will be sorted
    2. modifying a value is a sorted column (from the table or another Papyrus View) doesn't change the sort of the rows for 2 reasons
      1. performance: technically we probably need to redo the sort after each model modification
      2. usability: the edited row will change of location, so the table will blink and scroll)
    3. destroying a sorted column will not update the sort, to avoid to disturb the user
    4. Invert Axis in a sorted state will clear the sort
Remove Column/Row
  • 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.
Destroy Column/Row Element
  • 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.
Rename Column/Row Header
This function can do 2 things according to the usecase :
  • Rename the element represented by the axis, when the element is owned by your model
  • Define an alias to the axis, when the element is not owned by your model (UML Feature for example)
Choose the Displayed Columns/Rows
Right click in the table (not in the header) and select Columns ->  Create/Destroy Columns. (the same thing for rows
Menu to Create/Destroy Columns
Dialog to Create/Destroy Columns
Choose the Displayed Columns/Rows for Stereotype Property in the popup menu
Right click in the table (not in the header) and select Select Stereotype Properties Columns (or Rows)
Menu to Create/Destroy quickly stereotype properties
Paste Columns/Rows From External Spreadsheet

#Paste From Spreadsheet in a Table

Display Index Column/Row Header
Menu to Show/Hide Row Index
Display Label Column/Row Header
Menu to Show/Hide Row Label
Configure Index Header Style (A, B, C...Z, AA, AB, ... or 0,1,2,3)
Menu To Select Index Style


Configure Label Header Style 
select the information to Display in the Header Label (Name, Multiplicity, Type, Icon, isDerived)
Menu to configure label style
Export table into the Excel Format
Print table
Sort Column/Row Axis by Alphabetic order
Sort Rows selecting one or several column header
Save and restore Table Axis Configuration
Select All
There are 3 ways to do this action
CTRL+A
Clicking on the top left corner of the table
In the popup menu, action Select All
AutoResize axis
Merge Cell
Resize Axis
Unset cell value (reset to default value)
Selecting a cell in the table and doing "Delete" unset the cell value. That is to say, than the value is set to the default value (which is often null). It works only for editeable feature.







The list of available features for tables

This table lists all feature available for Tabular editors provided by Papyrus (the 1st of September 2017). This list could be considered as representative of tables capabilities assuming 3 points:

  1. The table is not inverted
  2. Elements are on rows
  3. Features are on columns
UML

Generic Table

SysML Allocation Table SysML Requirement Table Views Table UML

Class Tree Table

Invert Axis (exchange Rows And Columns) Yes No
Content synchronized on table context No, filled by DnD Yes Yes Yes No in provided configuration

Yes for depth=0, if the user changed the provided configuration

Edit Cell Values (excepted if cell read-only) Yes (F2, or Double click on a cell)
Sort Row Axis clicking on column header Yes (ALT-Click on column header, or MAJ-ALT-Click to sort on several columns)
Change Columns Order Yes
Change Rows Order No (not yet implemented)
Add Column Axis By Drag And Drop No (Not yet implemented)
Add Row Axis By Drag And Drop Yes (all UML Elements) No (synchronized table) No in provided configuration,

but possible (only classes for depth=0), if the user changed the configuration

Remove Column Axis Yes
Remove Row Axis Yes No (synchronized table) No in default configuration, Yes (only classes for depth=0),

if the user changed the configuration

Destroy Column Element Yes
Destroy Row Element Yes No, (too dangerous to remove an editor) Yes
Rename column header Yes, but we create a column alias, features are not editable
Resize Axis Yes
Rename row header Yes, we change the name of the represented element (if it has a feature called "name") Yes, UML Named Element are renamed, and an alias if created for categories
Choose the Displayed Columns (Dialog) Yes
Choose the Displayed Columns for Stereotype Property in the popup menu Yes No (not a UML Table) Yes
Choose the Displayed Rows (Dialog) No Partially Yes, thanks to the Wizard to choose the listen categories
Choose the Displayed Rows for Stereotype Property in the popup menu No (no sense in provided tables)
Paste Column From Spreadsheet No (not yet implemented)
Export to Excel (in fact html) Yes
Paste Row From Spreadsheet Yes No Yes
Display Index Column/Row Header Yes
Display Label Column/Row Header Yes
Configure Index Header Style Yes
Configure Label Header Style Yes
Print table Yes
Sort Column Axis By Name Yes
Sort Row Axis By Name Yes No (not yet implemented)
Save and Restore Several Columns Axis Configuration Yes (but, this feature has not really been tested)
Save and Restore Several Columns Axis Configuration No
Select All Yes (CTRL + A or clicking on the corner)
AutoResize Row/Column axis Yes (with an action in the popup menu of the header)
Merge Selected Body Cells

(cells must displayed the same values)

Not supported (and probably will never been supported)
Merged All Body Cells for a Column

(cells must contains the same values)

Yes (action provided by a popup menu of the body)
Merged All Body Cells for a Row

(cells must contains the same values)

Yes (action provided by a popup menu of the body)
Merge Column./Row Header Cells

(cells must contains the same values)

No (not yet implemented)
Merge All Body Cells for Rows AND Columns No (not yet supported), you only can merge on rows OR in columns, but not on rows and on columns inside the same table
Collapse/Expand No Yes
Choose the categories (features) to fill the table No

(it is not a synchronized table)

No, but it could be interesting to allow it No Yes
Hide categories No Yes
Filter Rows Yes
Unset cell value Yes No Yes
Display Validation Marker in Row and Column Label Header Yes
Display Validation Marker in Row and Column Label Header Yes
Wrap Text for String cell Yes (action provided by a popup menu of the body)
Automatic Resize Cell Height for String cell Yes (action provided by a popup menu of the body)
Configure unsupported cell content Yes (action provided by Preferences/Papyrus/NatTable/Cell Preferences)
Display List on Separated Rows for a fully selected column of multiple values Yes Yes Yes No Yes

Fill cells

The fill action is available in tables and can be used by clicking on the right bottom corner and drop until release.

This action is available for 2 types:

  • numbers
  • string

Fill number values

It is possible to copy the initial value.

Fill Copy Number

When the initial selection before the fill is a single cell, it is possible to increment or decrement values from the initial value by adding or removing 1 to the initial value.

Fill Increment Number when one selected cell

When two cells are selected before filling the selection, it is possible to increment or decrement values from the initial value by adding or removing the initial values difference.

Fill Increment Number when two selected cells

Fill string values

As number fill action, it is possible to copy the initial value.

Fill Copy String

When an integer is available at the beginning or at the ending of the value, it is possible to increment or decrement integer prefix or suffix values depending of the integer position.

Fill Increment prefix String

Fill Increment suffix String

The filled integer values are calculated by the same way than the fill numbers.

Warning: the minus sign is used as minus and not as a separator. So when you have Class-01 and you decide to Increment to name the next one, you get Class00, then Class01. In order to get Class-02 and Class-02, you must use Decrement.

Tree Table Features

The feature of the tree table are mostly the same than for the flat table.

Features not supported by Tree Table

  • Invert Axis

Specific features for the Tree Table

  • Expand/Collapse feature : These actions are available in the popup menu of the row header. Several expand/Collapse actions are provided:
    • Collapse All : collapse the whole Tree
    • Collapse All for selection : collapse all for selected rows
    • Expand All : expand the whole Tree
    • Expand All For Selection : expand all for selected rows
    • Expand Selection on 2 levels : expand the selected rows on 2 levels
  • Choose categories to listen : This action is available in the popup menu of the row header

This action open a Wizard Dialog, when you can choose add/remove depth and edit the categories (features) to listen for each depth.

Default configuration used by the UML Class Tree Table

Default configuration used by the UML Class Tree Table, modified in order to allow to the user to fill the first level by DnD

Illustration used to explain the categories wizard

    • 1: Buttons to add/remove categories to/from the right side of the wizard. It work only if a depth is selected, or if the root of the model is selected. In this last case, the categories is added for all depths.
    • 2: Checkbox to display all possible values in the left part of the wizard. if it is unchecked, the displayed categories are deduce from the current context of the table.
    • 3: Checkbox to choose how to display the categories (flat or tree view)
    • 4: move up a selected category for a given depth. It doesn't allow to change the depth of the selected categories
    • 5: move down a selected category for a given depth. It doesn't allow to change the depth of the selected categories
    • 6: create a new depth (according to the snapshot, the next created depth will be depth 3.
    • 7: destroy a selected depth or remove a selected feature
    • 8: edit an alias for a category
    • A: the context of the table
    • B: a depth, here depth 0. Categories are not mandatory for depth 0. Categories are mandatory for others depth
    • C: the listen categories for depth 1
  • Show/Hide depth: These actions are available in the popup menu of the row header. you can choose to show/hide categories for a given depth, or hide categories for all the depths
Popup menu available on the row header region

Generic feature with specific behavior

  • Paste Rows


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 true), paste is faster but actions done by service edit will be ignored.
      • if false, Paste action uses the service edit (initialize default values, apply stereotypes required by element id).
      • if true, 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, using the paste action
      • 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=false

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. Import Dialog - Configuring Import

Table Property View

The Property View of the table is accessible selecting the table in the ModelExplorer.


Filter

Since Eclipse Mars, Papyrus Table provides a Filter Row in the Column Header. This row can be shown or hidden.

Filter Feature

  • the filter row can be shown or hidden by the user
  • the contains of the filter cells is saved in the model, and the user can do Undo/Redo after a filter action
  • the filter action is a "one shot", so modifying cells values doesn't reapply the filter
  • for tree table
    • element which don't match the filter, but which have matching children are shown
    • only node already expanded are found by the filter

How to Show/Hide Filter Row

To Show/Hide the filter row, do a right click in the body of the table, then choose Select the Column Menu, then Display Row Filter.

Show Hide Filter Row Menu

Now, the filter row is visible.

Filter Row Visible

Filter Strategy

  • By default, the row with a cell contains is inconsistent with the column are hidden. There is 2 main cases in Papyrus:
    • the cell display N/A for a value which is not a string
    • the user uses num: (see below) in the string editor, all values which are not numerical values will be hidden
  • In case of filtering on several column in the same time, we will display only the rows matching all applied filters
  • In case of collection in a cell, the row matches if the collection contains the wanted element

Available Cell Editors for Filter Row

By default, Papyrus provides 2 kinds of editors for filters:

  • a combo with checkboxes allowing multi selection, that we use for
    • enumeration
    • boolean

ComboWithCheckboxExample.png

  • a string editor used to filter all others kinds of values.
    • string
    • references
    • numeric (integer, real, ...)

String editor usages

Filter String or references: Papyrus provides several keyword to define how to filter the rows. By default, we check than the text displayed in the cells of the column contains the string typed in the filter editor. Some options are available:

  • contains:: it is the default behavior, you should not have to add this keyword before the type your text.
  • num:: This mode will allow you to use comparison operators : <, >, <=, >=, = and <> for not equals.
  • =: This mode allow you to find only the cell with this value
  • regex:: This mode allow you to type a regex. The result will be all rows where we found a substring matching the regex
  • regex_m:: This mode allow you to type a regex. The result will be all rows where the regex match the full label
  • start:: This mode allow you to find all rows where the label displayed for the filter column start by your string

Regex

Starting with this initial state:

Initial State

regex:.C will give you this result: all strings owning a C in upper case, preceded by one other character have been found

Regex find

and regex_m:.C will give you this result: all string owning only 2 characters, where the second one in a C in upper case have been found

Regex match

Numeric

For the column representing a numeric type, the string editor is already configured, so don't need (and you can't!) to prefix your search with num:

Synchronization between tables and model explorer

Generalities

As illustrated below this feature is enabled when the Link With Editor button is activated :

ModelExplorerLinkWithEditor

This link the active diagram, in the multi editor view, with the model explorer view. This link works bidirectionally.
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.

SelectionWithDiagram.png

It is to be noted that, when changing pages, the selection for each of them remain in memory and handled by setInput in tabbedPropertySheetPage

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.

GenericSelection


RequirementSelection


AllocationSelection


ViewsSelection

Column selections

The axis of the table can also be inverted and the elements represented as columns with their properties as rows :

ColumnSelection

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.

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.
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.

CellSelection

CellSelectionInvertAxis

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.

MixedSelection

MixedSelectionReq

From the model explorer

As a reminder, selections initiated by the model explorer will only result in column or row selections as the table has no means of knowing what type of selection is required by the user.


Styles in Papyrus' tables

It is important to note that the changes below are coming into eclipse Mars as they are dependant on a modification of the model.

Styles in the resize of a table's components

NamedStyles are used to introduce those changes and intValues ares used to mark the resizing of table elements.
Below is the default model used for the table used to demonstrate the changes when styles are written and/or applied in a table.

Default Table

Resize of the Headers

Sliding the header's cell frontier will result in the creation of a localHeaderAxisConfiguration and to it will be add the new values of the header's width and/or height. Both sets of headers can have stored values for heoght and width as the table can be inverted and if so the row and the column headers will be too.
Below is the state of the model during the first change: resizing the row headers' index and label.

In this case the local header created is the RowHeader but if the column headers are changed the model gets a ColumnHeader as illustrated by the image below.

Mixed Selection Req

Resize All Headers


Resize of the Axis

The values carried by the localHeaders only affect the headerLayer of the table and therefore the height or width of the Axis (columns and/or rows) will not be affected by them. For those to change, new values will be carried by the Axis themselves as can be seen in the following image. Of course, the method used to change the values is the same sliding of the frontier used when resizing the headers.

resizeAxis

In this example one row and two columns were changed and they all bear the corresponding value in their Axis element.

Styles in the merge of Axis elements

For this type of change the NamedStyles used are booleanValues, indicating if the Axis are to be merged or not.
The behavior has been copied from the previous one and the booleans will be caried by the Axis, in case of a user selecting the axis to be merged, or the localHeaders if the user chooses to merge all the rows or columns of the table in one go.
To initiate the merge, the user has access to a merge menu and chooses between the four types of merge the one best suited to the task (as illustrated below). The programm then proceeds to merge the cells of same value inside the selection.

Merge Options

Merge selected Axis

As mentionned above, in case of a merge of a selected axis, the boolean will be caried by the Axis element in the model.


Boolean Merge Selected Column

The other choices will then be greyed-out and a toggle will be displayed on the selected option to notify the user that this is (or these are) the axis merge.

Merge Selected Columns

If the user selects a cell or an axis that has not been part of the previously merged selection, the toggle will not be displayed but the option will still be visible as the other will still be greyed-out.
It is important to note that, if the user so chooses, the merge option can be reapplied to the new selection and the merge span will consist of the newly selected axis. A cautionary note however as only full rows or columns will be merged.

Merge Selected Columns

Merge Selected Row

Merge Selected Rows

Merge Selected Rows


Merge All row/column Axis

The user can merge all the rows in the table and the result will look like this.

booleanMergeAllRows

Merge All Rows

Edition of merged Cells

Once the cells are merged, the user might want to edit them. This edition can be problematic as the merge only takes into account the values of the cells and not their types when applying the merge option. This is shown in the example below asa classifier can be an activity but not the other way around.
The first image illustrates the model and the profile's stereotype, applied on both classes, containing the three attributes activity and classifiers.

TableProfileElements.png

When the user clicks on the left most part of the merged area, under the activity label, the editing tool only shows activity1 as a possible choice. But if the user selects the right side, under the classifier label, then the choices are many. In this example the choice is to apply the interface type to the merged cells and handle the editing behavior as illustrated by the three next images.

Activity edition

Classifier edition

Edition's result


The tool will then automatically detect the possibility, or impossibility, of the edition and split the merge accordingly.
Please note that the merge selection will not be changed and the selected axis will still carry their merge booleans as other values might still be equal and therefore the user might still want those merged.

Existing Cell Editors

Several kind of cell editors are available in Papyrus Table. Currently, the user can't choose himself the cell editor to use for a cell/row/column.

DialogCellEditor

TextualCellEditor

Several kind of cell editors are available:

String cell editor

String with completion cell editor

  • UML ValueSpecification Cell Editor: This editor allows to edit and create ValueSpecification from a text field. Description is available here
  • UML Reference Cell Editor: This editor allows to edit reference (single or multi valued) using a text field. This editor provides a completion mechanism (using CTRL+SPACE) and validate the string (the string is valid when we are able to find element from the text typed by the user). For further information, please see the page Papyrus_Developer_Guide/Papyrus_Embedded_Editors_Documentation/Textual_Editor_For_NamedElement
but not the other way around. 

The first image illustrates the model and the profile's stereotype, applied on both classes, containing the three attributes activity and classifiers.

TableProfileElements.png

When the user clicks on the left most part of the merged area, under the activity label, the editing tool only shows activity1 as a possible choice. But if the user selects the right side, under the classifier label, then the choices are many. In this example the choice is to apply the interface type to the merged cells and handle the editing behavior as illustrated by the three next images.

Activity edition

Classifier edition

Edition's result


The tool will then automatically detect the possibility, or impossibility, of the edition and split the merge accordingly.
Please note that the merge selection will not be changed and the selected axis will still carry their merge booleans as other values might still be equal and therefore the user might still want those merged.

Paste and insert

Video

A video is available [here].

Description

The paste and the insert work differently (create new objects or update existing ones) depending on the selection in the table as following:

Paste ( 1 ) Insert ( 2 )
No selection ( A ) Create Create
Cells ( B ) Update X
Rows Header ( C ) Update Create
Columns Header ( D ) Update X

Actions:

  • Create: It shall imply first the check of the elements' existence in the table (or selection), then eventual creation of new elements at a given position or at the end of the table
  • Update: It shall only imply the update of existing elements


In details:

  • A1: Two differents possible "paste" types :
    • Number of columns pasted equals to the number of columns in table (including rows header): The objects pasted must be created according to the rows header in the clipboard.
    • Else (The result will be the same for A2): The existence of the pasted objects must be checked (depending on the axis identifier):
      • Object exists: The user can choose the action to do in this case:
        • Replace: The values must be overwritten
        • Add: A row must be added at the end of the table (for the tree table, if this is a sub-element of the first row selected, the row will be added to the end of the sub category) corresponding to the created object
        • Skip: No modification for this object
        • Cancel: Cancel all the actions
      • Object doesn't exist: A row must be added at the end of the table corresponding to the created object
  • B1: Only the update of the cells must be applied:
    • Depending on the selection, values must be overwritten (for the following table, selection must be represented as following: [NumberOfRows, NumberOfColumn]):
Selection Paste Action
[X, Y] [X, Y] Values in the selection must be updated.
[X, Y] [1, Y] The values pasted must be updated for all selected rows (by repeat of the pasted row values).
|X, Y] [Z, Y] An error message will be displayed.
[X, Y] [X, Z] An error message will be displayed.
  • C1: The existence of the pasted objects must be checked into the selection (depending on the axis identifier):
    • Object exists: the values of the corresponding row must be updated
    • Object doesn't exist: No modification
  • C2: The existence of the pasted objects must be checked into the selection (depending on the axis identifier):
    • Object exists: The user can choose the action to add in this case:
      • Replace: The values must be overwritten
      • Add: A row must be added before the selection (for the tree table, if this is a sub-element of the first row selected, the row will be added to the end of the sub category) of the table corresponding to the created object
      • Skip: No modification for this row
      • Cancel: Cancel all the action
    • Object doesn't exist: A row must be added before the selection (if the first element selected is a category, the row will be added as first child of this category) of the table corresponding to the created object
  • D1: Only the update of the columns must be applied:
    • Depending on the selection, values must be overwritten (for the following table, selection must be represented as following: [NumberOfRows, NumberOfColumn]):
Selection Paste Action
[X, Y] [X, Y] Values in the selection must be updated.
[X, Y] [X, 1] The values pasted must be updated for all selected columns (by repeat of the pasted column values).
|X, Y] [Z, Y] An error message will be displayed.
[X, Y] [X, Z] An error message will be displayed.

How axis identifier comparison works

In some cases (A1, A2 and C2), the existence of the pasted or inserted objects must be checked. This is done by comparison between pasted object axis identifier and the existing axis identifier values. To define this axis identifier, just select the column (available in the table) from the paste configuration:

ManageAxisIdentifier.jpg


Warnings and errors

Warnings

Here, you will find the possible warning messages at the end of the paste/insert (if no modification is applied during the paste/insert and a warning message was caught, the warning message must be displayed as error):

  • When an identifier is not found in the selection:
WarningNotFound.jpg
  • When an identifier is not found in the selection but is created:
WarningNotFoundButCreated.jpg
  • When a non-editable value tried to be updated, this type of warning will appear:
WarningNonEditableValue.jpg

Errors

Two types of error can be displayed while the paste/insert:

  • PasteConfiguration definition error
  • Error during the process of the paste/insert


PasteConfiguration errors

Here, you will find the possible paste configuration error messages at the end of the paste/insert:

  • When the element id is not defined:
ErrorPCElementIdNull.jpg
  • When the containment feature is not defined:
ErrorPCContainmentFeatureNull.jpg
  • When the axis identifier is not defined (and when it is necessary):
ErrorPCAxisIdentifierNull.jpg
  • When the element type cannot be found:
ErrorPCElementTypeCantBeFound.jpg
  • When the feature is not containment:
ErrorPCFeatureNotContainment.jpg
  • When the feature is not compatible:
ErrorPCFeatureNotCompatible.jpg
  • When the context of the table does not have the declared containment feature:
ErrorPCContextDoesNotHaveFeature.jpg
  • When a TreeFillingConfiguration does not have paste configuration:
ErrorPCTreeFillingNoPasteConfiguration.jpg
  • When more than 1 category is defined for a depth and when the table has hidden categories:
ErrorPCMoreThan1Category.jpg


Errors during the process

Here, you will find the possible error messages at the end of the paste/insert:

  • When the axis identifier was not found in the table:
ErrorAxisIdentifierNotFound.jpg
  • When the number of rows pasted is not equals to the number of rows in the table:
ErrorRowsNotEquals.jpg
  • When the number of columns pasted is not equals to the number of columns in the table:
ErrorColumnsNotEquals.jpg
  • When the 'Replace' action is wanted by the user but more than one object correspond to the identifier:
ErrorCorrespondingMultipleRows.jpg
  • When an invalid value tried to be set in a new object in attached mode or during the update:
ErrorInvalidValueAttachedModeOrUpdate.jpg
  • When an invalid value tried to be set in a new object in detached mode:
ErrorInvalidValueDetachedModeAndCreation.jpg
  • When an unknown exception occured:
ErrorUnknownExceptionOccurred.jpg

Details and Example

Paste with rows header

The paste with rows header in the clipboard must respect the number of columns in the target table. The hierarchy of the rows header must be respected, i.e. when the categories are hidden or shown.

When the categories are hidden, the number of defined categories by depth must be equals to 1 if you want to paste.

N.B: The undo/redo is not implemented for this paste.

Examples

Visible categories

Get the following current table:

PasteWithRowsHeaderVisibleCategoriesInitial.jpg

And this copied text:

PasteWithRowsHeaderVisibleCategoriesToCopy.jpg


The objects are created with the correct values:

PasteWithRowsHeaderVisibleCategoriesResult.jpg


Hidden categories

Get the following current table:

PasteWithRowsHeaderHiddenCategoriesInitial.jpg

With this following categories configuration:

PasteWithRowsHeaderHiddenCategoriesConfiguration.jpg

And this copied text:

PasteWithRowsHeaderHiddenCategoriesToCopy.jpg


The objects are created with the correct values:

PasteWithRowsHeaderHiddenCategoriesResult.jpg


Paste and insert without selection (A1 and A2)

This paste or insert allows to replace, add or skip the existing objects and allows to create the non-existing objects. The 'Replace' action allows to update the values of the existing object, the 'Skip' action does nothing on it and the 'Add' action allows to create an object on the same depth of the existing one. The created objects must be at the end of the table.

For the TreeTable, some specifications exist:

  • if no object was found for the identifier, the created object must be a depth 0 object because we can't defined the depth of the paste object
  • if an existing object is found for the identifier and the user wants its creation, an object with the same depth will be created depending on the paste configuration of the existing object
  • the non first level created object won't be at the end of the table but at the end of the feature which it is associated

Example

Get the following current table:

PasteWithoutSelectionInitial.jpg

And this copied text:

PasteWithoutSelectionToCopy.jpg


Depending on the previous specifications explained, the result is the following:

PasteWithoutSelectionResult.jpg


Paste with cells selection (B1)

Depending on the selection and to the clipboard, differents actions are possible:

  • if only one cell is selected, the cells corresponding to rectangular width and height of clipboard must be overwritten
  • if some rows are selected and only one is available in the clipboard, the selected rows must be updated with the values of the single row of the clipboard
  • else the width and height of the selection must be equals respectively to the width and height from the clipboard, the selected cells will be modified

Examples

Cells with some rows and columns

Get the following current table and selection:

PasteSomeRowsInitial.jpg

And this copied text:

PasteCellsSelectedToCopy.jpg


The result of the paste is selected and is this following:

PasteCellsSelectedResult.jpg


One cell selected

Get the following current table and selection:

PasteOneCellSelectedInitial.jpg

And this copied text:

PasteCellsSelectedToCopy.jpg


The result of the paste is selected and is this following:

PasteCellsSelectedResult.jpg


One row in clipboard

Get the following current table and selection:

PasteOneRowClipboardInitial.jpg

And this copied text:

PasteOneRowClipboardToCopy.jpg


The result of the paste is selected and is this following:

PasteOneRowClipboardResult.jpg


Paste with rows header selection (C1)

This paste allows to update the selected existing rows when the rows header height selected is equals to the height of rows in the clipboard.

Example

Get the following current table and selection:

PasteRowsSelectionInitial.jpg

And this copied text:

PasteRowsSelectionToCopy.jpg


The result of the paste is selected and is like following (the first class is not modified because it does not exist):

PasteRowsSelectionResult.jpg


Insert with rows header selection (C2)

This paste or insert allows to replace, add, skip the existing objects and allows to create the non-existing objects. The 'Replace' action allows to update the values of the existing object, the 'Skip' action does nothing on it and the 'Add' action allows to create an object on the same depth of the existing one. The created objects must be inserted before the selection.

For the TreeTable, some specifications exist (in addition of specifications of the paste/insert without selection (A1 and A2):

  • if a paste is realised with a selected category , an object will be created and added to this feature at the first position
  • the created objects must be inserted before the first selected row for the depth 0 but must be added at the last position for others depths because it is not possible to define the position to be used

Examples

Insert on object

Get the following current table and selection:

InsertRowSelectionInitial.jpg

And this copied text:

InsertRowSelectionToCopy.jpg


The result is the following:

InsertRowSelectionResult.jpg


Insert on category

Get the following current table and selection:

InsertOnCategorySelectionInitial.jpg

And this copied text:

InsertOnCategorySelectionToCopy.jpg


The result is the following:

InsertOnCategorySelectionResult.jpg


Paste with columns header selection (D2)

Depending on the selection and to the clipboard, different actions are possible:

  • if some columns are selected and only one column is available in the clipboard, the selected columns must be updated with the values of the single column of the clipboard
  • if some columns are selected and only one row is available in the clipboard, the selected columns must be updated with the rows' values repeated for each rows
  • else the width of the selection must be equals to the width from the clipboard, the selected columns will be modified

Examples

Some column selected

Get the following current table and selection:

PasteSomeColumnsSelectionInitial.jpg

And this copied text:

PasteSomeColumnsSelectionToCopy.jpg


The result is the following:

PasteSomeColumnsSelectionResult.jpg


One column in clipboard

Get the following current table and selection:

PasteOneColumnClipboardInitial.jpg

And this copied text:

PasteOneColumnClipboardToCopy.jpg


The result is the following:

PasteOneColumnClipboardResult.jpg


One row in clipboard

Get the following current table and selection:

PasteOneRowInColumnSelectionClipboardInitial.jpg

And this copied text:

PasteOneRowInColumnSelectionClipboardToCopy.jpg


The result is the following:

PasteOneRowInColumnSelectionClipboardResult.jpg

Import from file (CSV)

The import from file (CSV) works like paste with rows header when the rows header are available in the CSV.

If the rows header are not available, the rows works like insert without selection or insert with rows header selection depending to the selection.

Back to the top