Bug 40348 - [ViewMgmt] PageBook does not support IPostSelectionProvider (was: JavaDoc & Declaration view and fast selection changes)
Summary: [ViewMgmt] PageBook does not support IPostSelectionProvider (was: JavaDoc & D...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.0   Edit
Hardware: All All
: P2 enhancement (vote)
Target Milestone: 3.2   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2003-07-17 09:06 EDT by Andre Weinand CLA
Modified: 2006-05-19 09:44 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andre Weinand CLA 2003-07-17 09:06:04 EDT
I20030716 + ZRH M2 plugin export

- open JavaDoc view and Declaration view
- open Java CU with many members in Editor
- in Outline select first member
- with the cursor down key step through all members
Observe: both the JavaDoc as well as the Declaration update with every selection change (and are 
hardly able to keep up). The editor only updates after some timeout. I think the JavaDoc and the 
declaration view should use the same strategy.
Comment 1 Dani Megert CLA 2003-07-25 12:19:06 EDT
Looks like a platform bug since the info views listen to post selection changes.
Needs investigation.
Comment 2 Dani Megert CLA 2003-07-28 05:04:35 EDT
The page book view does not respect IPostSelectionProvider.
Comment 3 Simon Arsenault CLA 2003-07-29 12:14:59 EDT
Daniel, what do you mean "does not respect IPostSelectionProvider"?
Comment 4 Dani Megert CLA 2003-07-29 12:29:49 EDT
There is a new IPostSelectionProvider interface which is implemented by
structured viewers, text viewers and Java outline page. Parts that act as
selection provider for other parts (like page book for Java outline page) should
implement that interface. PageBook and MultiPage editors are such parts. If they
don't then the benfit of implementing IPostSelectionProvider gets lost for
children/clients of such grouping parts.
Comment 5 Nick Edgar CLA 2005-04-28 14:20:01 EDT
This is still an issue in 3.1.

PageBookView's selection provider should implement IPostSelectionProvider.
If the active page supports IPostSelectionProvider, then its selection and
postSelection events will get mapped directly.  If not, then PageBookView should
fire both a selection and postSelection event for a selection event from the page.



Comment 6 Nick Edgar CLA 2005-05-27 10:06:34 EDT
I'm going to have to defer this one to 3.2.
Comment 7 Paul Webster CLA 2006-01-30 21:11:23 EST
I think the PageBookView can follow the same pattern as the MultiPageEditorPart, and have it's SelectionProvider be an IPostSelectionProvider.

I'll have a trial patch soon.

PW
Comment 8 Paul Webster CLA 2006-02-01 15:14:58 EST
The PageBookView SelectionProvider now implements IPostSelectionProvider.  Where before a selection change would notify an selection change listeners, it now also notifies any registered post selection change listeners.

Please comment on this update.

Released into HEAD >20060131.

PW
Comment 9 Nick Edgar CLA 2006-02-01 15:39:52 EST
The superclass of JavadocView, AbstractInfoView, already hook themselves as post selection listeners on the part service (it should listen on the page's part service, not the window's).

So with your change, we should be able to see a direct performance improvement, as long as PageBookView's SelectionProvider actually fires post selection events in response to the viewer's post selection event.

Comment 10 Dani Megert CLA 2006-02-02 02:50:26 EST
>it should listen on the page's part service, not the window's.
Why? Isn't the current code more general and also handles the case where a window has more than one page (I know I know the current IDE layout doesn't do so but still)?
Comment 11 Nick Edgar CLA 2006-02-02 10:15:42 EST
For things that are within a page, such as parts or actions within them, they should look up only to the page's part service (and selection service) because parts are not shared between pages.  For example, it wouldn't make sense for a Javadoc view in page 1 to show info for code selected in an editor in page 2 because the two will never be shown together.  For parts that live at window level outside the page, such as action set actions, they should use the window services.

But admittedly this is a bit of a fine point, since there's only 0 or 1 pages in the current implementation.
Comment 12 Dani Megert CLA 2006-02-02 10:25:17 EST
Changed AbstractInfoView. Fixed in HEAD.
Comment 13 Paul Webster CLA 2006-02-07 07:14:02 EST
fixed
Comment 14 Paul Webster CLA 2006-05-19 09:44:28 EDT
verified in RC5
PW