Skip to content
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

[Debug] Add checkbox to toggle display of shortcut numbers in breakpoint grouping types #1772

Merged
merged 1 commit into from
Mar 28, 2025

Conversation

SougandhS
Copy link
Contributor

@SougandhS SougandhS commented Mar 12, 2025

This PR introduces a new checkbox to toggle the display of shortcut numbers in the selection list for breakpoint grouping types. By default, shortcut numbers will be shown but it can be disabled for ensuring consistency with other selection lists that do not display these numbers. Users can enable the shortcut numbers by checking the new checkbox, providing more flexibility while maintaining UI consistency.

Before :
Screenshot 2025-03-12 at 5 32 49 PM

image

After :
By default it will show the shortcut numbers
image


Added a checkbox to enable or disable
image


Unchecking the option will result in list with no shortcut numbers ensuring consistency with other selection lists that do not display these numbers
image

@SougandhS SougandhS changed the title Add checkbox to toggle display of shortcut numbers in breakpoint grouping types [Debug] Add checkbox to toggle display of shortcut numbers in breakpoint grouping types Mar 12, 2025
Copy link
Contributor

github-actions bot commented Mar 12, 2025

Test Results

 1 599 files  +  385   1 599 suites  +385   1h 34m 42s ⏱️ + 29m 11s
 4 173 tests ±    0   4 150 ✅ +   23   23 💤  - 23  0 ❌ ±0 
12 001 runs  +2 460  11 835 ✅ +2 415  166 💤 +45  0 ❌ ±0 

Results for commit 75ec99f. ± Comparison against base commit e4ebf10.

♻️ This comment has been updated with latest results.

@SougandhS
Copy link
Contributor Author

Hi @merks , could you please check this small PR when you have time ?

@merks
Copy link
Contributor

merks commented Mar 12, 2025

Those numbers act as accelerators though and I think those names don't come from menu item text where an & could specify the accelerator. So I'm not sure removing them is a good idea. Even File -> Recent Files has such numbers for a similar reason...

@SougandhS
Copy link
Contributor Author

Those numbers act as accelerators though and I think those names don't come from menu item text where an & could specify the accelerator. So I'm not sure removing them is a good idea. Even File -> Recent Files has such numbers for a similar reason...

Thanks for the feedback! Just to clarify, this change does affect the functionality in that it allows users to disable the shortcut numbers (and accelerators) in the breakpoint grouping list. By default, the shortcut numbers will be enabled, but if users prefer to disable them, they can easily do so by unchecking the new option in the UI.

Copy link
Contributor

@merks merks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that you've properly tested that these changes will be preserved on restart. In particular you should look carefully at what org.eclipse.debug.internal.core.Preferences.setDefaultBoolean(String, String, boolean) does versus what org.eclipse.debug.internal.core.Preferences.setBoolean(String, String, boolean, IScopeContext) does. I don't think it's generally a good idea to call org.eclipse.debug.internal.core.Preferences.getDefaultBoolean(String, String, boolean) except to determine the default value of the preference. When saving the value, it should be saved in the instance scope so when asking for the preference value, you should look it up in instance scope.

E.g.,

image

I question whether the extra logic here will really be of benefit to a significant number of users, but that's just my sense. In any case, the current way to looking up and storing the preference when the user does change it is not correct.

@SougandhS
Copy link
Contributor Author

SougandhS commented Mar 13, 2025

I don't think that you've properly tested that these changes will be preserved on restart. In particular you should look carefully at what org.eclipse.debug.internal.core.Preferences.setDefaultBoolean(String, String, boolean) does versus what..

Thanks for checking Restart case and code suggestion. I have made the changes accordingly and tested the restart case 👍

Copy link
Contributor

@merks merks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should get at least one other committer to review this.

@iloveeclipse

Do you have an opinion about the functionality, the names, and the labels?

@iloveeclipse
Copy link
Member

Do you have an opinion about the functionality, the names, and the labels?

I'm mostly neutral here, I've never used / noticed the shortcuts shown and would not miss them if they would be hidden. But code wise looks OK and defaults are not changed, so LGTM.

@merks merks self-requested a review March 14, 2025 12:49
Copy link
Contributor

@merks merks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm fine once @iloveeclipse approves.

@SougandhS SougandhS force-pushed the GroupByChange branch 2 times, most recently from 0f9b44f to 0ae3c8d Compare March 15, 2025 05:20
@SougandhS SougandhS requested review from iloveeclipse and merks March 18, 2025 03:27
@SougandhS
Copy link
Contributor Author

Hi @iloveeclipse , I have made the changes you suggested.

grouping types

Introduced a new checkbox to control the visibility of shortcut numbers
in the selection list for breakpoint grouping types.  By default,
shortcut numbers are shown, and users can disable them using the
checkbox if desired.
@iloveeclipse iloveeclipse merged commit 661c9f5 into eclipse-platform:master Mar 28, 2025
17 of 18 checks passed
@SougandhS
Copy link
Contributor Author

Thank you @iloveeclipse & @merks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants