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

[Bug] [Folding mechanism] Method declaration on the Same Line as the Closing Bracket #1539

Open
Tracked by #1562 ...
jakub-suliga opened this issue Jul 24, 2024 · 1 comment · May be fixed by #1939
Open
Tracked by #1562 ...

[Bug] [Folding mechanism] Method declaration on the Same Line as the Closing Bracket #1539

jakub-suliga opened this issue Jul 24, 2024 · 1 comment · May be fixed by #1939

Comments

@jakub-suliga
Copy link

jakub-suliga commented Jul 24, 2024

When a method starts on the same line as the closing bracket of the previous method, the folding mechanism does not work correctly. The method declaration disappears along with the closing bracket. Ideally, only the closing bracket should disappear, not the method declaration.

Before the folding:
image

After the folding the first method:
image

How it should be:
image

The code in the example:

public class b {
	void a() {
		
	}void b() {
		
	}
}
@jakub-suliga
Copy link
Author

jakub-suliga commented Nov 6, 2024

This PR #1939 should fix it.

jakub-suliga added a commit to jakub-suliga/eclipse.jdt.ui that referenced this issue Jan 15, 2025
@jakub-suliga jakub-suliga linked a pull request Jan 15, 2025 that will close this issue
jakub-suliga added a commit to jakub-suliga/eclipse.jdt.ui that referenced this issue Jan 17, 2025
If the second method starts in the same line the first one ends then
there will still be 2 foldings.

Fixes eclipse-jdt#1539
jakub-suliga added a commit to jakub-suliga/eclipse.jdt.ui that referenced this issue Jan 17, 2025
If the second method starts in the same line the first one ends then
there will still be 2 foldings.

Fixes eclipse-jdt#1539
jakub-suliga added a commit to jakub-suliga/eclipse.jdt.ui that referenced this issue Jan 17, 2025
If the second method starts in the same line the first one ends then
there will still be 2 foldings.

Fixes eclipse-jdt#1539
jakub-suliga added a commit to jakub-suliga/eclipse.jdt.ui that referenced this issue Jan 17, 2025
If the second method starts in the same line the first one ends then
there will still be 2 foldings.

Fixes eclipse-jdt#1539
jakub-suliga added a commit to jakub-suliga/eclipse.jdt.ui that referenced this issue Jan 17, 2025
If the second method starts in the same line the first one ends then
there will still be 2 foldings.

Fixes eclipse-jdt#1539
jakub-suliga added a commit to jakub-suliga/eclipse.jdt.ui that referenced this issue Jan 17, 2025
If the second method starts in the same line the first one ends then
there will still be 2 foldings.

Fixes eclipse-jdt#1539
jakub-suliga added a commit to jakub-suliga/eclipse.jdt.ui that referenced this issue Jan 17, 2025
If the second method starts in the same line the first one ends then
there will still be 2 foldings.

Fixes eclipse-jdt#1539
jakub-suliga added a commit to jakub-suliga/eclipse.jdt.ui that referenced this issue Jan 17, 2025
If the second method starts in the same line the first one ends then
there will still be 2 foldings.

Fixes eclipse-jdt#1539
jakub-suliga added a commit to jakub-suliga/eclipse.jdt.ui that referenced this issue Jan 17, 2025
If the second method starts in the same line the first one ends then
there will still be 2 foldings.

Fixes eclipse-jdt#1539
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 a pull request may close this issue.

1 participant