Bug 194867 - [Scratchpad] Remote Scratchpad should have Refresh Action on toolbar
Summary: [Scratchpad] Remote Scratchpad should have Refresh Action on toolbar
Status: CLOSED FIXED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 2.0.1   Edit
Assignee: Kevin Doyle CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2007-06-28 19:54 EDT by Kevin Doyle CLA
Modified: 2011-05-25 09:38 EDT (History)
2 users (show)

See Also:


Attachments
Added Refresh Action to Scratchpad toolbar (3.46 KB, patch)
2007-08-02 10:35 EDT, Kevin Doyle CLA
mober.at+eclipse: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin Doyle CLA 2007-06-28 19:54:38 EDT
The Remote Scratchpad should have a refresh action on it's toolbar like the Remote Systems View and Remote System Details view.

-----------Enter bugs above this line-----------
TM 2.0RC4 Testing
installation : eclipse-SDK-3.3RC4
RSE install  : 2.0 RC4
java.runtime : Sun 1.5.0_06-b05
os.name:     : Windows XP 5.1, Service Pack 2
------------------------------------------------
Comment 1 Martin Oberhuber CLA 2007-06-29 07:13:00 EDT
Sounds like a good suggestion to me. We could perhaps even do it for 2.0.1 if we re-use existing icons and strings.

One general related question I have is this: If I explicitly refresh an item in the scratchpad, would that same item also be refreshed in all other views where it is shown automatically? I think it should, but how do events work here?
Comment 2 Kevin Doyle CLA 2007-06-29 11:07:22 EDT
Yes, if you refresh/rename/etc from the Scratchpad all other views that show the item the action was taken on will be updated.

The Refresh/Rename/etc actions are common between the different views and fire the refresh events that each view hopefully(not usually the case for scratchpad) will handle properly to update the view.
Comment 3 Martin Oberhuber CLA 2007-06-29 11:15:10 EDT
Ok. But what I don't understand about the REFRESH event is this:

Sending a refresh event leads to querying fresh data from the remote. If Scratchpad sends the Refresh event, who queries the remote? It should be queried only once and separately by each view listening to refresh.

It was my understanding that SystemView (i.e. the tree) performs the queries, but then I'm not sure about the ordering of events for the asynchronous operation... the query may take some time, how would the scratchpad be informed when the query was complete?

It was my impression that the current REFRESH event is not sufficient, and we'd need something like REFRESH_VIEW_WITHOUT_REQUERYING_REMOTE for the case where we know the remote has already been queried, model is up to date. and just the views should update themselves. But perhaps I'm wrong?
Comment 4 Kevin Doyle CLA 2007-07-27 16:03:01 EDT
I did some looking into the refreshing with the table view, since the scratchpad doesn't implement EVENT_REFRESH_REMOTE yet.

The table view will perform it's own queries if the file is stale.  Since it's set's the folder to stale it should always be performing a query.  For myself the table was always being called before the SystemView when doing a refresh of the folder shown in the table.  The SystemView deferred query would just get the cached contents.

If it was to go the other way around though and the query took a while we would need a way to tell the table view to refresh it's view with the cached contents as you mentioned.  Well that is if the file wasn't stale, but since the table marks the file stale it should be doing it's own query as well unless a timing issue where the file is marked stale and the job finishes and marks it not stale.
Comment 5 Kevin Doyle CLA 2007-08-02 10:35:04 EDT
Created attachment 75231 [details]
Added Refresh Action to Scratchpad toolbar

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 6 David McKnight CLA 2007-08-02 12:40:33 EDT
I've committed this to cvs.
Comment 7 Kevin Doyle CLA 2007-09-13 13:44:57 EDT
Verified Refresh Action now on Scratchpad toolbar in 2.0.1 RC1.