Community
Participate
Working Groups
I tried to change the properties of an edge based relation represented in a crosstable cell. Given the meta model and viewpoint specification model, when selecting a cell from the crosstable, properties of the selected line element are shown instead of the element representing the cell. When selecting a cell defined by 'Paris' and 'Amsterdam', I expected to be able to change the distance in the properties view. However, it shows the properties of Amsterdam in stead of the corresponding Connection entity.
Created attachment 239416 [details] Crosstable after selecting Connection
Created attachment 239418 [details] Metamodel
Created attachment 239419 [details] Viewpoint specification project defining crosstable.
Reported bug based on question in Sirius forum: http://www.eclipse.org/forums/index.php/mv/msg/641736/1236939/#msg_1236939
I proposed a workaround in http://www.eclipse.org/forums/index.php/mv/msg/641736/1237276/#msg_1237276 to set this distance value with a direct edit.
Created attachment 239422 [details] A reproduction case with a VSM based on Ecore The new attached reproduction case is based on Ecore. It contains a VSM with a Cross Table description on EPackage, line and column mappings on EClass and an IntersectionMapping on EReference. Steps to reproduce: * Unzip the attached 426863.zip project in your workspace/runtime * Open the 426863.aird and the 426863 cross table. * Try to display the reference cell property through keyboard navigation or mouse selection/double click * It always fails and the line properties are shown.
See org.eclipse.sirius.table.ui.tools.internal.editor.DTableTreeViewer.triggerEditorActivationEvent(ColumnViewerEditorActivationEvent) l:156 It tries to detect the selected cell when the user use left and right keyboard arrows. We might detect up and down and mouse clic and double clic too: boolean keyBoardNav = event.eventType == ColumnViewerEditorActivationEvent.KEY_PRESSED && (event.keyCode == SWT.ARROW_LEFT || event.keyCode == SWT.ARROW_RIGHT || event.keyCode == SWT.ARROW_DOWN || event.keyCode == SWT.ARROW_UP); boolean mouseNav = event.eventType == ColumnViewerEditorActivationEvent.MOUSE_CLICK_SELECTION || event.eventType == ColumnViewerEditorActivationEvent.MOUSE_DOUBLE_CLICK_SELECTION; if (mouseNav || keyBoardNav) { ... See org.eclipse.sirius.table.ui.tools.internal.editor.DTableTreeViewer.updateSelection(ISelection), if the selectedCell is known, fireSelectionChanged is called with the cell in a new StructuredSelection, but the property page is a post listener and so it is not notified. We will have another issue with mouse clic/double clic: even if we detect the selected cell and call firePostSelection in updateSelection, the OpenStrategy which detects the selection change will call the firePostSelectionEvent with the initial selection: the line. We will have to analyze more deeply the selection mecanism to see how we can manage the cell selection in a better way.