DZone Forums
Go Back   DZone Forums > Community > Tools & IDEs > Eclipse
Reload this Page Bug in PageBookView???
Notices
Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
epz epz is offline
Member
 
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Join Date: Jul 2009
Default Bug in PageBookView??? - 10-07-2009, 05:41 PM

Here's a snippet from the org.eclipse.ui.part.PageBookView Javadoc:

* <code>PageBookView</code>s provide an <code>IPageSite</code> for each of
* their pages. This site is supplied during the page's initialization. The page
* may supply a selection provider for this site. <code>PageBookView</code>s
* deal with these selection providers in a similar way to a workbench page's
* <code>SelectionService</code>. When a page is made visible, if its site
* has a selection provider, then changes in the selection are listened for and
* the current selection is obtained and fired as a selection change event.
* Selection changes are no longer listened for when a page is made invisible.

And indeed PageBookView's SelectionProvider redirects calls to getSelection() and setSelection() to the SelectionProvider of the current (visible) page's site. However, calls to addSelectionChangedListener() and removeSelectionChangedListener() only add listeners to, and remove from, PageBookView's own SelectionManager and no listeners are added to the current page's SelectionProvider. Consequently, the page's SelectionProvider cannot generate selection events (no listeners to notify of selection changes).

Is this a bug or am I missing something? How can the "changes in the selection be listened for" if there is no listeners to listen for them?

Thanks!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Copyright 1997-2009, DZone, Inc.
vBulletin Skin developed by: vBStyles.com