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.

Glossary

Table areas

A table can be divided in several areas

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 :

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

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
Change Axis (Columns/Rows) Order
Invert Axis (Exchange Columns And Rows)

Invert Axis in the Table Property View

Add Axis (Column/Row) Element by Drag&Drop from another view (ModelExplorer)
Sort rows clicking on column header
Remove Column/Row
Destroy Column/Row Element
Rename Column/Row Header
This function can do 2 things according to the usecase :
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

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:

  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 poopup menu of the body)
Merged All Body Cells for a Row

(cells must contains the same values)

Yes (action provided by a poopup 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

Tree Table Features

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

Features not supported by Tree Table

Specific features for the Tree Table

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

Popup menu available on the row header region

Generic feature with specific behavior

Paste From Spreadsheet in a Table

General

Steps to paste in a Generic Table

We assume that the user wants to paste rows (and not columns).

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

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

Available Cell Editors for Filter Row

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

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:

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 <I>Link With Editor</I> 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

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

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

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.

defaultTable

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

MixedSelectionReq
resizeAllHeaders

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.

mergeOptions

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.

booleanMergeSelectedColumn

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.

mergeSelectedColumns2

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.

mergeSelectedColumns 
mergeSelectedRow
mergeSelectedRows2
mergeSelectedRows3

Merge All row/column Axis

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

booleanMergeAllRows 
mergeAllRows2 

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

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 
dition'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

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

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 
dition'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