Community
Participate
Working Groups
I found out that when calling collapseAll() on a treeViewer, depending on the operating system the first element of the tree is selected or not. On Windows the first item in the tree is selected. On Mac the first item in the tree is not selected. So if "link with editor" is enabled and you press a "collapse all" button (f.ex. in outline view) on Windows the editor jumps to the source code position of the first element of the tree, because it is selected in the tree. On mac the editor stays where it is. In the plugin for Windows org.eclipse.swt.win32.win32.x86_64....jar in TreeItem.class (org.eclipse.swt.widgets) in method setExpanded(boolean expanded) a Selection Event is sent: parent.sendSelectionEvent (SWT.Selection, event, true); In the mac implementation the event is not sent. Why does collapseAll() work different for these operating systems? Is it intended or is it a bug?