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

Delete while typing in conditional breakpoint editor area deletes breakpoint #308

Closed
Madjosz opened this issue Sep 12, 2023 · 3 comments
Closed
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@Madjosz
Copy link

Madjosz commented Sep 12, 2023

Transfer of Bug 573604

Problem

When editing the condition of a conditional breakpoint in the editor area of the breakpoints view: If I hit Delete in an empty editor OR at the end of the input, instead of deleting nothing of your input, the breakpoint itself will be deleted from the list of all breakpoints.

This even gets worse if you hold the Delete key because you want to delete a whole bunch of characters before the caret. Once all characters are deleted and you hit the end of your input, it will start to delete all your breakpoints because after your conditional breakpoint gets deleted the next breakpoint on the list gets the focus and will also be deleted. With this it is easily possible to delete all your breakpoints at once by accident.

Can be reproduced on Mac with Fn + Delete.

If you activate "Show key binding when command is invoked" in Preferences -> General -> Keys, you will see
"Delete - Delete \n Delete the selection".

I did a little testing on older Eclipse version and this bug is present at least since 4.2.2 (Juno). It is not present in 3.7.2 (Indigo). I did not check the version chaos in between these two versions apart from 4.0 where the Breakpoint view doesn't work at all since it does not show any of my breakpoints.

This bug does not occur in other input fields like the Hit count.

Expected behaviour

Do not delete breakpoints at all when the focus is in the editor area.

Screencapture

hitting DELETE 3 times in a row

Tested with

Eclipse SDK

Working Version Build id
✔️ Version: 3.7.2 Build id: M20120208-0800
Version: 4.2.2 Build id: M20130204-1200
Version: 2023-12 (4.30) Build id: I20230911-1800

Java

openjdk version "1.8.0_382"
OpenJDK Runtime Environment (Temurin)(build 1.8.0_382-b05)
OpenJDK 64-Bit Server VM (Temurin)(build 25.382-b05, mixed mode)

openjdk version "20.0.2" 2023-07-18
OpenJDK Runtime Environment Temurin-20.0.2+9 (build 20.0.2+9)
OpenJDK 64-Bit Server VM Temurin-20.0.2+9 (build 20.0.2+9, mixed mode, sharing)

Operating System

Microsoft Windows 10 Pro 10.0.19045

@iloveeclipse iloveeclipse added the bug Something isn't working label Sep 13, 2023
@iloveeclipse
Copy link
Member

Can reproduce on latest master / Linux too. Patch is welcome.

@iloveeclipse iloveeclipse added the good first issue Good for newcomers label Sep 13, 2023
@opcoach
Copy link

opcoach commented Sep 23, 2024

Can not reproduce it on Mac Sequoia 15.0 with Eclipse 2024-09 and jdt.debug.ui 3.13.500.v20240822.

I select my breakpoint in the list, it is highlighted in blue, then I focus on the condition field, (the breakpoint selected is now highlighted in gray). Then I selected a text in the condition and hit Fn Delete (on Mac), the text is deleted, but not the breakpoint. If I select it in the list (when hightlighted in blue), and hit Fn Delete, the breakpoint is deleted, which is the nominal case...

I tried also to select the breakpoint in the list, then focus on the java editor, and then focus directly in the condition field, and hit Fn Delete, and once again only the selected text is deleted..

I would say this bug has been fixed.

@Madjosz
Copy link
Author

Madjosz commented Sep 24, 2024

Indeed this seems to be fixed in 4.33. I could not track what the actual fix was but it was introduced somwhere between 3530050 (4.32 release, not working) and 9470d2b (working). Thanks to whoever fixed it and @opcoach for testing.

@Madjosz Madjosz closed this as completed Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants