-
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 folding of 2 consecutive methods #2014
Conversation
If the second method starts in the same line the first one ends then there will still be 2 foldings. Fixes eclipse-jdt#1992
eb0709b
to
3d9a5fd
Compare
@fedejeanne @iloveeclipse @jjohnstn could someone of you look over the code |
I tested the case described in #1992 and this PR makes no difference in the behavior. Can you add a test case to it and also explain how to test it manually? |
What happens when you fold the method? Because when I am testing it, everything works. I added how to test it and there is a test case for it, but currently it tests only when the new folding is activated. I am rewritting the test, so it tests both cases. There will be soon a PR for it. |
Thank you @jakub-suliga, I was able to reproduce it and I can confirm that this PR fixes the bug.
Why not in this PR? If it the tests is improved so it can test this corner case then it belongs here :-) |
I am currently working on refactoring the test class, not just the one test case. Therefore it should be in a separate PR. |
Finish the refactoring in another PR (merge it first if you want) and then add the test to this one. If you end up decoupling the fix from the test for that very same fix then commits can not be reverted without breaking tests, which is kind of confusing. |
Just a heads up: |
Merged. Thanks. |
For eclipse-jdt#2014. I modified an existing test to also cover the issue that was fixed by that PR. Contributes to eclipse-jdt#1992
If the second method starts on the same line where the first one ends, there will still be two foldings. (I accidentally set includeLastLine to true a second time, which caused the issue).
Fixes #1992
Testing: