Summary: | Crosstable editor not selecting right properties context | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [Modeling] Sirius | Reporter: | Wilbert Alberts <wilbert.alberts> | ||||||||||
Component: | Table | Assignee: | Project Inbox <sirius.table-inbox> | ||||||||||
Status: | NEW --- | QA Contact: | |||||||||||
Severity: | normal | ||||||||||||
Priority: | P3 | CC: | maxime.porhel, wilbert.alberts | ||||||||||
Version: | 1.0.0M5 | Keywords: | triaged | ||||||||||
Target Milestone: | --- | ||||||||||||
Hardware: | PC | ||||||||||||
OS: | Windows 7 | ||||||||||||
Whiteboard: | |||||||||||||
Attachments: |
|
Description
Wilbert Alberts
2014-01-29 03:59:49 EST
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. |