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

Bug 50171

Summary: [EditorMgmt] No part listener notifications sent for some views
Product: [Eclipse Project] Platform Reporter: Jared Burns <jared_burns>
Component: UIAssignee: Stefan Xenos <sxenos>
Status: RESOLVED DUPLICATE QA Contact:
Severity: major    
Priority: P2 CC: douglas.pollock, for.work.things, n.a.edgar
Version: 3.0   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Jared Burns CLA 2004-01-16 17:56:40 EST
Build 20040113

I could be crazy, but it looks like IPartListeners aren't being notified of part open/close events. I 
registered my own listener and the code didn't seem to be getting called, so I set a breakpoint and 
it's not being hit.

I have a page listener that *is* being called which registers the part listener when a page is 
activated. Using a breakpoint, I've verified that my listener is being registered. But opening and 
closing views has no effect. I've also tried putting breakpoints in other partOpened/partClosed 
methods and these aren't getting hit either.

I find it hard to believe that this would be busted since the tests pass, but I'm stumped.
Comment 1 Debbie Wilson CLA 2004-01-19 11:32:25 EST
Nick,  Not sure if this is the right assignment for this PR.  Please reassign 
if necessary.
Comment 2 Nick Edgar CLA 2004-01-19 18:38:43 EST
Tod, could you have a look at this please?
Comment 3 Tod Creasey CLA 2004-01-21 12:00:52 EST
I have just added the following printlns to NavigationHistory and it works 
fine for me so there appears to be no current problem.

Please reopen if you have a steps for it

public void partOpened(IWorkbenchPart part) {
			System.out.println("Opened");}
		
		public void partClosed(IWorkbenchPart part) {
			System.out.println("Closed");
Comment 4 Jared Burns CLA 2004-01-26 18:24:22 EST
After testing a bit more, I see that notifications are sent for some views, but not others. If I open 
and close the Display view, I get notifications at both ends. If I open and close the Package 
Exporer, I get none.
Comment 5 Jared Burns CLA 2004-01-26 18:41:05 EST
I closed all views, then opened them all at once with a breakpoint in my partOpened method. The 
method was correctly called for all views except the Console, Navigator, Outline, Tasks, 
Hierarchy, and Package Explorer. No notifications are sent for these views.
Comment 6 Nick Edgar CLA 2004-02-09 10:58:05 EST
Do you get the same behaviour if you do this in a new window with only one 
perspective opened?  Sounds like it may be related to views being shared across 
perspectives in the same window.
Comment 7 Nick Edgar CLA 2004-03-31 09:32:51 EST
Closing as a dup of the more recent bug 54559, as it has more details.


*** This bug has been marked as a duplicate of 54559 ***