Open digital-ember opened 5 years ago
Here is a SSCCE for reference: AttributeInTable.zip
We can't change the behavior as it would be breaking but there is a workaround that we also added in another project. Surround the table with a custom factory cell from de.slisson.mps.richtext.customcell
and add the following content:
TreeIterator<EditorCell> iterator = CellTraversalUtil.iterateTree(cell, cell, true).iterator();
while (iterator.hasNext()) {
EditorCell nextCell = iterator.next();
if (nextCell instanceof EditorCell_GridCell) {
nextCell.getStyle().set(StyleAttributes.SELECTABLE, false);
}
}
cell;
We could add a flag to the table editor to allow switching to this behavior.
Imagine the following structure:
and an instance like so, using slisson.Table as Editor:
Having the cursor within a value cell, pressing CTRL+UP once selects the complete cell property, as expected:
Pressing CTRL+UP once more, selects the Grid_Cell representing the node of concept "Cell", but as node context (see inspector), it holds the node of concept Table, which we consider unexpected:
Pressing CTRL+UP once more, the node of concept Row is considered the node context.
This is bad for invoking actions / intentions in the context where the complete Table is the node context, whilst the editor suggests the cell is selected.