Community
Participate
Working Groups
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 ------------------------------------------------
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?
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.
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?
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.
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.
I've committed this to cvs.
Verified Refresh Action now on Scratchpad toolbar in 2.0.1 RC1.