Community
Participate
Working Groups
Created attachment 251097 [details] Sample VM with tree and table Open the tree from the attached reproduction case. Select a tree item. See: org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/editor/AbstractDTableViewerManager#triggerCustomDrawingTreeItems() The code should be moved in table viewer manager as it does nothing for Tree representations. Without this listener, the selection is ok on my computer. The correction will have to be tested on a DTree with different style defined in the VSM (non white background, non black foreground/label color) too. Additional issue: the DTableEraseListener does not seem to work fine on Mac OS X. This might lead to the creation of a specific bug.
New Gerrit change created: https://git.eclipse.org/r/42661
The following UnhandledEventLoopException seems to be caused by some code removed in the proposed patch: java.lang.IllegalArgumentException: Index out of bounds at org.eclipse.swt.SWT.error(SWT.java:4462) at org.eclipse.swt.SWT.error(SWT.java:4396) at org.eclipse.swt.SWT.error(SWT.java:4367) at org.eclipse.swt.widgets.Widget.error(Widget.java:783) at org.eclipse.swt.widgets.Tree.getColumn(Tree.java:1402) at org.eclipse.sirius.tree.ui.tools.internal.editor.DTreeViewerManager$3.keyPressed(DTreeViewerManager.java:428) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:167) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4203) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1467) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1490) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1475) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1504) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1500) at org.eclipse.swt.widgets.Tree.sendKeyEvent(Tree.java:2592) at org.eclipse.swt.widgets.Control.keyDown(Control.java:2402) at org.eclipse.swt.widgets.Composite.keyDown(Composite.java:607) at org.eclipse.swt.widgets.Tree.keyDown(Tree.java:1991) at org.eclipse.swt.widgets.Display.windowProc(Display.java:5667) at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method) There is no column in a DTree viewer.
Gerrit change https://git.eclipse.org/r/42661 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=85eaa2f4e545a5dc00875e44209ad59170ea0b80
This bug occurs also on some Linux, see Bug 472020.
*** Bug 472020 has been marked as a duplicate of this bug. ***
Created attachment 255021 [details] Corrected reproduction case.
The change in DTableViewerManager.triggerColumnSelectedColumn() triggers the following exception when using left/right array keys to change of column : java.lang.IllegalArgumentException: Index out of bounds at org.eclipse.swt.SWT.error(SWT.java:4472) at org.eclipse.swt.SWT.error(SWT.java:4406) at org.eclipse.swt.SWT.error(SWT.java:4377) at org.eclipse.swt.widgets.Widget.error(Widget.java:482) at org.eclipse.swt.widgets.Tree.getColumn(Tree.java:1196) at org.eclipse.sirius.table.ui.tools.internal.editor.DTableViewerManager$4.keyPressed(DTableViewerManager.java:533) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:167) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4481) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1327) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1351) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1336) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:1363) at org.eclipse.swt.widgets.Widget.gtk_key_press_event(Widget.java:763) at org.eclipse.swt.widgets.Control.gtk_key_press_event(Control.java:3317) at org.eclipse.swt.widgets.Composite.gtk_key_press_event(Composite.java:785) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1965) at org.eclipse.swt.widgets.Control.windowProc(Control.java:5590) at org.eclipse.swt.widgets.Tree.windowProc(Tree.java:3585) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4717) at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method) at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:9272) at org.eclipse.swt.widgets.Display.eventProc(Display.java:1225) at org.eclipse.swt.internal.gtk.OS._g_main_context_iteration(Native Method) at org.eclipse.swt.internal.gtk.OS.g_main_context_iteration(OS.java:2422) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3428) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1127) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1018) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:654) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:337) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:598) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:139) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:669) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:608) at org.eclipse.equinox.launcher.Main.run(Main.java:1515) at org.eclipse.equinox.launcher.Main.main(Main.java:1488)
New Gerrit change created: https://git.eclipse.org/r/51489
Gerrit change https://git.eclipse.org/r/51489 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=218cce7defb70c65dfc044f99d7373ff5924830d
To validate this bugzilla : 1. Import the sample in attachment 2. Open the tree and test that selection of TreeItem display correctly selection, i.e. with background color and label color visible and changed. 3. Test also cell selection change using left/right arrow keys and that it doesn't throws exception when being at the left or right border.
Fixed for 3.1
About Comment 10, point 3 is on table representation : 3. Test also cell selection change using left/right arrow keys and that it doesn't throws exception when being at the left or right border.
Verified on Mac OS X 10.11 with Sirius 3.1.0-S20150930-080030
Available in Sirius 3.1.0.