how can a change to a viewer's content be picked up via the selection service? [message #461137] |
Fri, 05 January 2007 09:59 |
Eclipse User |
|
|
|
Originally posted by: pete.powan.com
I have two views, A and B. B shows detail of an item selected in a tree
displayed in A. This is done via the selection service, as described in
Eclipse Workbench: Using the Selection Service
( http://www.eclipse.org/articles/Article-WorkbenchSelections/ article.html)
So, A registers as a provider using...
getSite().setSelectionProvider(treeviewer);
And B listens using...
getSite().getWorkbenchWindow().getSelectionService().addPost SelectionListener(listener);
This works fine until the content of the tree displayed in A is updated,
resulting
in a selected item no longer being selected. If A is the currently
selected part, the deselection is propigated via the selection service,
and B can update accordingly, which is what I would expect. However, if A
is not the currently selected part, the deselection is not propigated, and
B is displaying detail that is no longer valid.
Does anybody know of a way of ensuring that this deselection is always
propigated?
Thanks, Pete
|
|
|
Powered by
FUDForum. Page generated in 0.03063 seconds