-
Notifications
You must be signed in to change notification settings - Fork 128
[Debug] Add support for custom labels on breakpoints #1803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Cool change. Just a note about the dialog: instead of a "Remove" button, I would suggest that we add a note "Leave blank to stick to default". |
A "clear" button would be useful or use a text-box with a |
Cool feature indeed. Starting the word after a comma with an upper case letter is just not proper style. I also really don't like the phrase "stick to". How about this?
|
Thanks for the suggestions, will incorporate these 👍 |
Then the dialog is opened, is the existing text selected? Because in that case one can simply hit delete or backspace to achieve what the clear button does... |
The "Clear" button is indeed redundant (so was the former "Remove" one). I understand @laeubi suggestion was not to create a new SWT button here, but instead to add the |
While this works, its not always obvious I think also one then needs to press the
versus
That would be good in any case if an "empty" textfield has a special meaning. |
Clicking "clear" or "remove" while still having the text visible can be much more confusing that just clearing the text and clicking OK. Or the button should be titled "Clear and Apply" and thus "OK" renamed to "Apply"... |
What about As an alternative, one could have a checkbox |
The more controls, the more input a user has to deal with to take their decisions, the less serene they are in their usage. Not so long ago, people where often complaining about Eclipse UI being "heavy", "overwhelming" and so on. Concretely, this was meaning there were too many dialogs with too many controls in them. We've made continuous efforts since then to keep things leans and not add extra weight were the "standard" workflow is trivial to handle. |
Well if you want to go that path then the whole dialog is useless and instead it should be able to edit the label in place by having an edit / clear button next to the label text. For me a label is also a "control" and just that we make the text longer it does not makes it more "clear" or less "heavy"... |
That's indeed better. |
I have to check on this |
this looks good approach , if user only wants to highlight the breakpoint leaving the default label as it is |
What label vs what style would IMO better be 2 different issues at the moment. I think with some usage of textual conventions (user chosen; like emojis or uppercase), it will become easy to make a breakpoint highly visible without need for extra style. |
then can we provide checkbox for both (show custom label, Highlight breakpoint ) ? that way 2 issues can be solved. Giving more control |
Why a checkbox and not a color picker? How to allow italic vs bold and so on...? What do we really need? |
Not sure this works because the way resource renaming in the Project Explorer is handled differs from how breakpoints/variables are labeled in the Breakpoints view. The initial default label isn't stored in the same way as updates are done in the Project Explorer, such as with the org.eclipse.ui.actions.RenameResourceAction.queryNewResourceNameInline(IResource) method. |
IIRC this uses a TextCellEditor and how the value is get/set is pretty flexible. |
Redesigned similar to rename in functionality |
Thanks, that looks good! |
How is this activated? On click or on Context menu? We should be carefully that people does not activate it by accident. |
d7d6ad8
to
e1eafb3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all the changes. I think it's now good enough to merge (as soon as we get a successful CI build).
Please consider preparing some changes to documentation and news to declare this new feature.
Sure 👍 Thanks a lot |
Build is green now :) |
debug/org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java
Show resolved
Hide resolved
4855a45
to
6d83e4d
Compare
debug/org.eclipse.debug.core/core/org/eclipse/debug/core/model/Breakpoint.java
Outdated
Show resolved
Hide resolved
...clipse.debug.ui/ui/org/eclipse/debug/internal/ui/model/elements/BreakpointLabelProvider.java
Outdated
Show resolved
Hide resolved
ef9763f
to
e6fc388
Compare
67673c3
to
22472e2
Compare
9a14457
to
e3778e6
Compare
Hi @mickaelistria |
This commit introduces the ability for users to set custom labels on breakpoints, making it easier to identify and differentiate them. Additionally, breakpoints with custom labels are visually highlighted, improving workflow and debugging efficiency.
When working with multiple breakpoints in a complex codebase, it can become challenging to quickly identify and focus on key lines of code, especially when dealing with 10+ breakpoints. This PR introduces the ability for users to set custom labels on breakpoints, allowing for easier identification and differentiation. With custom labels in place, users can quickly locate and highlight important breakpoints, significantly improving workflow and debugging efficiency similar to other IDEs.
Right-click on a breakpoint and choose

Label
Once removed, highlight and custom label will be removed
