Thanks Pawel!
>Also, we could leave the
action delegate as public API so that any product that wants it, could add it
without much trouble.
I think this is the most practical option and my guess is
most debuggers wouldn’t use this. If they did, this button would be
available at the Platform layer.
I’ve filed two defects. One
against DSF and another against Platform:
Bug 299834 - [Debug View]
Remove 'refresh' button from Debug view
Bug 299835 - [Debug View]
Restart icon is easily mistaken for a refresh icon
I’ve attached a patch to bug#299834.
Please let me know if you have any questions.
Regards,
Navid
From: cdt-dev-bounces@xxxxxxxxxxx
[mailto:cdt-dev-bounces@xxxxxxxxxxx] On
Behalf Of Pawel Piech
Sent: Friday, January 15, 2010
6:06 PM
To: CDT General developers list.
Subject: Re: [cdt-dev] Do we
really need a refresh in Debug View?
Hi John,
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.
Cheers,
Pawel
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.
The action invokes the IRefrehAllTarget interface, which is documented as
follows:
A retargetable
action target which allows a debugger to refresh all of its active views with
fresh data from the debug target.
This capability is very useful. While a debugger should be
smart and try to update as much as possible automatically, coherency between
the many features/views of a debugger is never going to be 100% reliable. For
example, there will be cases where the user does something in one particular
view that affects data being displayed in another view, and because of the
complexity of the relationship, or because of performance considerations, that
second view gets out of synch with the target--perhaps others, too. For this
reason, it's important that the user have the ability to tell the debugger to
toss out all cached information and retrieve (and display) the latest target
state. In practice, the action is probably not used all that often. Certainly
not when just doing basic debugging.
This is very similar to how Refresh works in views that display workspace
resources. You can't rely on Eclipse always being in synch with the file
system, so sometimes you need to tell it to synch up.
John
At 03:54 PM 1/15/2010, Mehregani, Navid wrote:
Content-Language: en-US
Content-Type: multipart/related;
boundary="_004_496565EC904933469F292DDA3F1663E602AA311C88dlee06enttico_";
type="multipart/alternative"
Do we really need a
refresh button in Debug view? I think Debug view should automatically refresh
when need be.
To make things more confusing, this button uses the same icon as restart button. Can I submit a Bugzilla
and patch to remove this button?
If there is a good reason for this button, please enlighten us.
![[]](jpgdJ1ToyEuhU.jpg)
Thanks,
Navid
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev
_______________________________________________
cdt-dev mailing list
cdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cdt-dev