Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 156773

Summary: SelectionManager.setSelection() ignores EditPart.isSelectable()
Product: [Tools] GEF Reporter: Cherie Revells <crevells>
Component: GEF-Legacy GEF (MVC)Assignee: gef-inbox <gef-inbox>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Cherie Revells CLA 2006-09-08 17:19:23 EDT
I think SelectionManager.setSelection() should call EditPart.isSelectable() before selecting an editpart.  

GMF is overriding isSelectable() to return false in some case and I would expect a call to EditPartViewer.setSelected() with editparts that are not selectable would not result in them being selected.
Comment 1 Randy Hudson CLA 2006-09-10 18:55:04 EDT
The requested behavior could not be implemented in TreeViewer. The change could also break clients.

Whoever calls Viewer setSelection should us supposed to call isSelectable when appropriate. The method is indended for use by tools and other classes that work with viewers.

If there is a specific caller of setSelection that you think should be checking isSelectable, reopen with details. I think there is already a bug open for GraphicalViewerKeyHandler.