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

Bug 15214

Summary: Debug View runs actions on creation of toolbar
Product: [Eclipse Project] Platform Reporter: Tod Creasey <Tod_Creasey>
Component: DebugAssignee: Darin Wright <darin.eclipse>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: Darin_Swanson, Kevin_Haaland, n.a.edgar
Version: 2.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Bug Depends on:    
Bug Blocks: 12533, 12621    

Description Tod Creasey CLA 2002-05-03 13:14:09 EDT
The Debug View will run actions on toolbar creation when the view is 
instantiated.

The method AbstractDebugView.initializeToolbar() executes arunnable when it 
starts up with the following code.

if (action.isChecked())
    action.run();

As a result this will run an action without the user knowing (problematic for 
actions contributed by a plug-in) and will also cause activation of a plugin if 
it contributes to the Debug tool bar.
Comment 1 Darin Wright CLA 2002-05-03 14:27:35 EDT
We persist toggle action states. On startup, we must re-invoke actions in order 
to restore state. For example, the "static/final" variable filters in the 
varibles view are contributed by the Java debugger. These actions must be run 
in order to contribute a filter to the viewer.

Comment 2 Darin Swanson CLA 2002-05-03 14:47:10 EDT
And the user has explictly asked for these actions to be run by having the 
action in the toggle state.
Comment 3 Tod Creasey CLA 2002-05-06 11:27:51 EDT
This is one of the main causes of plug in activation on startup as anyone who 
has contributed an enabled action to the debug view will startup. If this 
behaviour is going to remain the consequences of not initally disabling the 
action should be made clear and the method of disabling it (via enablesFor) 
should be pointed out in the doc.
Comment 4 Darin Wright CLA 2002-05-13 23:31:24 EDT
We intend to leave this as is. We had the same/similar code in 1.0. If we turn 
if off, we get complaints that the debugger does not persist filter settings 
(and most users filter statics and finals from the variables view).