|Re: [cdt-dev] Do we really need a refresh in Debug View?
I agree with you also that in many practical situations it's very helpful to flush the caches and refetch data.
However there is more to the refresh actions story. IRefreshAllTarget is invoked by a different action then the one in the view. It's invoked by the "Refresh Debug Views" top-level menu/toolbar action which is tied to the "Debug Update Modes" action set. This action set also enables the "Update Modes" menus in the various debug views that support them.
The refresh actions which are in the views are implemented using the org.eclipse.cdt.dsf.debug.internal.ui.viewmodel.actions.RefreshActionDelegate, and they refresh only the contents of the view in which they are registered. There is also a global command handler: RefreshHandler, which is active whenever the DSF refresh action is active in a view. This handler is tied to the top level menu File->Refresh action.
Would it be sufficient if for our users if the toolbar icon wasn't there bug the top-level handler was still available? Unfortunately the standard key binding for the refresh command (F5) is mapped to the Step Into action when debugging. But we could also create a new mapping for refresh (e.g. Shift+F5). Also, we could leave the action delegate as public API so that any product that wants it, could add it without much trouble.
John Cortell wrote:
I agree with you that the reuse of the icon is confusing and should be changed. As for whether you can submit a bugzilla/patch to remove it: absolutely; you certainly can. I can predict with high confidence, though, that it won't be accepted. Generally speaking, committers don't develop useless features. If it's in there, I assure you there's a reason for it, and probably a good one. Before considering a patch to remove an action, a good first step is to discover what the action does and why someone felt it was an important capability.
Back to the top