-
Notifications
You must be signed in to change notification settings - Fork 408
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
Code folding is buggy #1419
Comments
this is weird, as we're waiting for the document to be reconciled properly before computing folding ranges in https://github.com/eclipse/eclipse.jdt.ls/blame/1cc049e2d19bba5e31f94032c4851fd0a5840bea/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/JDTLanguageServer.java#L813 @testforstephen @jdneo @snjeza any ideas? |
More details:
|
0.60.0 as in vscode-java? |
Yes, it's vscode extension's version. More traces (not sure if they are related) Even without splitting editor foldings disappear after some edits:
|
If you can reproduce the issue reliably, do you mind recording the steps you follow to see this issue? |
Here it is: https://gist.github.com/Yanpas/7c92234ea1f2b2398dc5f6d4b94de6bf Recorded with What I was doing?
It makes whole piece of code uncompilable |
Editing only one file causes a lot of files (I guess all) to recompile for some reasong, according to inotify watcher ( |
how many files do you have open? |
2 or 3. Both from one package and project. My .classpath looks like: <classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="output" path="EclipseBuild"/>
<classpathentry kind="lib" path="tmp/release/some.jar"/>
<classpathentry kind="lib" path="tmp/release/another.jar"/>
<!--... and 300+ more lib projects-->
<classpathentry kind="src" path="projects/p1/java/src"/>
<classpathentry kind="src" path="projects/p2/java/src"/>
<!--... and 120+ more src projects-->
</classpath>
|
@Yanpas could you send us the following:
|
"[java]": {
"editor.defaultFormatter": "redhat.java"
},
"java.errors.incompleteClasspath.severity": "ignore",
"java.jdt.ls.vmargs": "-noverify -Xmx5G -XX:+UseG1GC -XX:+UseStringDeduplication",
"java.configuration.checkProjectSettingsExclusions": false,
"java.configuration.updateBuildConfiguration": "automatic",
"java.import.gradle.enabled": false,
"java.import.maven.enabled": false, 2. |
@Yanpas could you check it?
The command should return 0. |
Return code is zero. Checked env of java process, it's correct:
|
I can't reproduce the issue. |
Here is a screencast with two dummy files, one with non utf8 encoding. (Whi knows whether files with bad encoding exist in my real big project) files.tgz.zip (is not zip, but tar.gz) |
On my main project I guess it reproduces due to another issue - editing one file causes recalculation of all |
@Yanpas could you try to reproduce the issue related to code folding using https://raw.githubusercontent.com/snjeza/vscode-test/master/java-0.61.1.vsix ? |
Played for a while, seems to be fixed, thank you! Open new performance related issue #1425 |
Sometimes folding ranges are out of sync and located 1 line below or upwards. Sometimes they are completely broken with following exception:
STR:
The text was updated successfully, but these errors were encountered: