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

clean out-of-date fAST before updating new fActiveJavaElement #1418

Merged
merged 1 commit into from
Apr 26, 2020

Conversation

Eskibear
Copy link
Contributor

When active java element changed( e.g. did open a new file), the cached fAST was out-of-date, thus SharedASTProvider.getAST(...) would return an wrong ComplilationUnit.

@Eskibear
Copy link
Contributor Author

CodeAction also has the same issue. But since the out-of-date AST is soon updated by other handlers (e.g. publish diagnositics), in most cases users are not aware of it. See
https://github.com/eclipse/eclipse.jdt.ls/blob/4455d066530f8b7da44b48b821e64c1d33cd7748/org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/text/correction/SourceAssistProcessor.java#L457

@fbricon
Copy link
Contributor

fbricon commented Apr 26, 2020

Do you have some instructions on how to reproduce this issue?

@fbricon
Copy link
Contributor

fbricon commented Apr 26, 2020

OK I checked with the instructions from redhat-developer/vscode-java#1396 (comment).
LGTM

@fbricon fbricon merged commit e0f1c8d into eclipse-jdtls:master Apr 26, 2020
@fbricon fbricon added this to the End April 2020 milestone Apr 26, 2020
@fbricon fbricon added the bug label Apr 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants