-
Notifications
You must be signed in to change notification settings - Fork 95
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
Fix for Visual Bug in Code Folding #1939
base: master
Are you sure you want to change the base?
Conversation
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.
Add a test (you should create the class FoldingTest
from #1562 in this PR)
Change the commit text to:
Fix folding of 2 consecutive methods
If the second method starts in the same line the first one ends then there will still be 2 foldings.
Fixes https://github.com/eclipse-jdt/eclipse.jdt.ui/issues/1539
The last line is important so GH recognizes the issue and closes it automatically when you PR is merged ;-)
eba082c
to
630f26f
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.
The code does what it should and the test is appreciated.
I only have some minor comments regarding code formatting.
Maybe a committer (@jukzi?) would like to approve this PR and let it run the tests right after you process my comments ?
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/folding/FoldingTest.java
Outdated
Show resolved
Hide resolved
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/folding/FoldingTest.java
Outdated
Show resolved
Hide resolved
f1c28dd
to
bb317c4
Compare
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/folding/FoldingTest.java
Outdated
Show resolved
Hide resolved
bb317c4
to
73fa18e
Compare
i am not familiar with this code, please ask someone else for review. |
Maybe @noopur2507 / @carstenartur / @vogella ? Those are the only names I could recognize from the History view of this class. The good thing is that this PR has a proper regression test and the issue is clearly defined so manual testing seems easy enough :-) . |
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/folding/FoldingTest.java
Outdated
Show resolved
Hide resolved
I'm not a jdt committer |
73fa18e
to
b17747a
Compare
@iloveeclipse could your review this too? |
org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/folding/FoldingTest.java
Outdated
Show resolved
Hide resolved
b17747a
to
b7eb6c3
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.
This introduces (at least one) regression.
The imports section folding lost last import, so if you have N imports, it should be folded by default to 1 (first) line, but it misses to fold last line now and we have first and last line shown. Also folding indicator (bracket line shown on mouse over) on the left side is shown for only N-1 lines.
If the second method starts in the same line the first one ends then there will still be 2 foldings. Fixes eclipse-jdt#1539
b7eb6c3
to
11f8ebd
Compare
I saw in a second PR (#1562) you had lot of folding tests added. I believe what would be good if you could have a dedicated PR that adds In two other PR's you could then add dedicated tests for new or fixed functionality. |
Fix folding of 2 consecutive methods
If the second method starts in the same line the first one ends then there will still be 2 foldings.
Fixes #1539
How to test