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

Bug 60327

Summary: Review LaunchViewContextListener multi-window behavior
Product: [Eclipse Project] Platform Reporter: Jared Burns <jared_burns>
Component: DebugAssignee: Darin Wright <darin.eclipse>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: daniel_megert, fraenkel, frederic_fusier, jean-michel_lemieux, jeffmcaffer, john.arthorne, n.a.edgar, t.s.maeder, wassim.melhem
Version: 3.0   
Target Milestone: 3.0 M9   
Hardware: PC   
OS: All   
Whiteboard:

Description Jared Burns CLA 2004-04-28 16:51:23 EDT
In Bug 54559, Nick wrote: 
While looking at bug 60039 (fixed), I noticed that LaunchViewContextListener
often calls getActiveWorkbenchWindow and getActivePage.  I'm not sure exactly
what this class does, but it seems to me that if the intent is to track
visibility of other views in the same perspective as the Launch view, then it
should just use the Launch view's page.  I did encounter one instance where it
appeared to get confused by me having two windows open (it was talking to a
different window than the one containing its Launch view).

In Eclipse >= 2.0, there is only ever one page per window, but the page may
contain multiple perspectives.

Can the calls to getActiveWorkbenchWindow and getActivePage() be eliminated?
Comment 1 Jared Burns CLA 2004-05-14 17:16:27 EDT
Reviewed the multi-window situation and made two changes. First, removed a case (in the 
constructor) where we were still accessing the active window instead of the view's window. And 
second, I noticed that LaunchView and LaunchViewContextListener were both registering as 
page and perspective listeners. I removed these from LaunchViewContextListener and moved to 
just using the LaunchView.

Please verify changes to LaunchView and LaunchViewContextListener, DarinW.
Comment 2 Darin Wright CLA 2004-05-17 11:10:05 EDT
Looks like these changes are causing an NPE.
Comment 3 Darin Wright CLA 2004-05-17 11:11:34 EDT
*** Bug 62448 has been marked as a duplicate of this bug. ***
Comment 4 Jared Burns CLA 2004-05-17 12:37:23 EDT
Fixed the NPE in LaunchView. It was occurring because the code to activate the debug action set was 
causing a perspectiveChange event to be fired while the context listener was still in its constructor.
Comment 5 Jared Burns CLA 2004-05-17 12:39:41 EDT
Please verify, DarinW.
Comment 6 Darin Wright CLA 2004-05-17 13:59:48 EDT
*** Bug 62509 has been marked as a duplicate of this bug. ***
Comment 7 Darin Wright CLA 2004-05-17 14:50:48 EDT
*** Bug 62519 has been marked as a duplicate of this bug. ***
Comment 8 Darin Wright CLA 2004-05-17 16:01:14 EDT
*** Bug 62540 has been marked as a duplicate of this bug. ***
Comment 9 Darin Swanson CLA 2004-05-17 21:29:13 EDT
*** Bug 62579 has been marked as a duplicate of this bug. ***
Comment 10 Darin Wright CLA 2004-05-17 22:02:20 EDT
Verified.
Comment 11 Jared Burns CLA 2004-05-18 03:56:45 EDT
*** Bug 62600 has been marked as a duplicate of this bug. ***
Comment 12 Darin Wright CLA 2004-05-18 09:24:11 EDT
*** Bug 62585 has been marked as a duplicate of this bug. ***
Comment 13 Darin Wright CLA 2004-05-18 09:28:32 EDT
*** Bug 62618 has been marked as a duplicate of this bug. ***
Comment 14 Darin Wright CLA 2004-05-18 14:43:04 EDT
*** Bug 62738 has been marked as a duplicate of this bug. ***