Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 94357 - breakpoints view not auto-opened on second launch
Summary: breakpoints view not auto-opened on second launch
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P2 normal (vote)
Target Milestone: 3.1 RC1   Edit
Assignee: Darin Wright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-10 10:58 EDT by Darin Wright CLA
Modified: 2005-05-17 16:57 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Wright CLA 2005-05-10 10:58:20 EDT
I20050509-2010

* turn "activate debug view when breakpoint hit" on
* reset view management settings
* select to show views in the Java perspective
* select "switch to associated perspective when application suspends" to NEVER

Debug to a breakpoint, in the Java perspective
> the debug view opens
> the variables view opens
> the breakpoint view opens

Terminate the app
> var view closes
> breakpoints view closes

Debug to a breakpoint again
> only the var view opens

The breakpoints view should also auto-open. I found that by pressing "reset" 
on the view management page, it opened again. However, only on the first 
launch again. On subsequent launches, it did not appear.
Comment 1 Darin Wright CLA 2005-05-10 12:09:59 EDT
After re-starting my workspace, I was unable to reproduce this problem.
Comment 2 Darin Wright CLA 2005-05-10 12:18:56 EDT
.. and then it started happening again, so it appears to be a transient 
problem.
Comment 3 Jared Burns CLA 2005-05-10 13:06:47 EDT
To me knowledge, our code in this area hasn't changed in a long time. And this
is a common test case that should work fine. The last few times view management
has broken it's turned out to be a problem with the platform's notification of
view open/close events. So that's the first route I'd investigate.
Comment 4 Samantha Chan CLA 2005-05-16 17:05:17 EDT
When LaunchViewContextListener get the contextDisabled event, it turns off 
fIsTrackingPartChanges.  This is done to ensure that views that are closed as a 
result of context disablement does not get added to viewIdsToNotOpen when the 
listener receives a perspective changed event.

As a result of closing the views, LaunchViewContextListener gets contextEnabled 
events while it is still handling the disable event.  At the end of 
contextEnabled, the listener loads the fIsTrackingPartChanges preference 
again.  This overwrites fIsTrackingPartChanges set by #contextDisabled(...) 
accidentally and would turn this flag back on.

In this case,when the variables view was closed by #contextDisabled(...), 
#contextEnabled(...) gets called as a result of closing the view.  
#contextEnabled(...) turns fIsTrackingPartChanges back on.  When the 
breakpoints view is closed, because this flag is on, the view gets added to the 
list of views not to be opened automatically.  As a result, the view would not 
get opened again in the next launch.
Comment 5 Samantha Chan CLA 2005-05-17 13:38:41 EDT
Fix included in patch from Bug 87586.

The fix is in #contextEnabled(...) and #contextDisabled(...) from 
LaunchViewContextListener.  Those methods will only turn fTrackingPartChanges 
off if the listener is currently tracking part changes.  When the methods 
finish, the methods will only reload the setting from the preference store if 
it has changed the setting in the same method.

The idea is that when #contextDiabled(...) turn fTrackingPartChanges off, 
#contextEnabled(...) will not set fTrackingPartChanges off because the setting 
is already off.  When #contextEnabled(...) is completed, since it hasn't 
changed the flag, the method will not overwrite the setting.  The setting will 
remain off until #contextDisabled(...) has finished closing all the views.
Comment 6 Darin Wright CLA 2005-05-17 16:29:29 EDT
Will verify.
Comment 7 Darin Wright CLA 2005-05-17 16:57:05 EDT
Applied patch from bug 87586.
Comment 8 Darin Wright CLA 2005-05-17 16:57:13 EDT
Verified.