Bug 194899

Summary: [Scratchpad] Remove All should do a full reset of the scratchpad
Product: [Tools] Target Management Reporter: Martin Oberhuber <mober.at+eclipse>
Component: RSEAssignee: Kevin Doyle <kjdoyle>
Status: RESOLVED FIXED QA Contact: Martin Oberhuber <mober.at+eclipse>
Severity: enhancement    
Priority: P3 CC: kjdoyle
Version: 2.0Keywords: contributed
Target Milestone: 2.0.1   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 193149    
Bug Blocks:    
Attachments:
Description Flags
Reset the views input if the view's input is not SystemScratchpad mober.at+eclipse: iplog+

Description Martin Oberhuber CLA 2007-06-29 07:16:24 EDT
+++ This bug was initially created as a clone of Bug #193149 +++

As per bug #193149 comment 2, people may want to reset the scratchpad at times in order to get a fresh instance free of bugs.

We should beef up the existing scratchpad's "Remove All" toolbar action to do a full reset such that people can be sure it will work properly from that point on.
Comment 1 Kevin Doyle CLA 2007-07-25 10:54:34 EDT
Created attachment 74572 [details]
Reset the views input if the view's input is not SystemScratchpad

The Clear All Action already clears the SystemScratchpad, refresh's the view, and updates the action states.  What was missing was setting the view's input to the SystemScratchpad if it somehow was changed.

So now we do this:
1. Clear SystemScratchpad.
2. Check if the view's input needs to be changed and if it does change it to SystemScratchpad.
3. Refresh the view.
4. Set the selection to null to force a check action states update.

Legal Message: I, Kevin Doyle, declare that I developed attached code from
scratch, without referencing any 3rd party materials except material licensed
under the EPL. I am authorized by my employer, IBM Canada Ltd. to make this
contribution under the EPL.
Comment 2 David McKnight CLA 2007-07-25 11:09:43 EDT
I've committed the fix for this.