[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.platform.rcp] how can a change to a viewer's content be picked up via the selection service?
|
- From: pete@xxxxxxxxx (Pete WIlliams)
- Date: Fri, 5 Jan 2007 14:59:51 +0000 (UTC)
- Newsgroups: eclipse.platform.rcp
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
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().addPostSelectionListener(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