Skip to content

Commit 25b9fdd

Browse files
hopehadfieldrgrunber
authored andcommitted
Always dispose AST on didClose
Signed-off-by: Hope Hadfield <[email protected]>
1 parent 365d396 commit 25b9fdd

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

org.eclipse.jdt.ls.core/src/org/eclipse/jdt/ls/core/internal/handlers/BaseDocumentLifeCycleHandler.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -532,9 +532,7 @@ public ICompilationUnit handleClosed(DidCloseTextDocumentParams params) {
532532
unit.becomeWorkingCopy(new NullProgressMonitor());
533533
publishDiagnostics(unit, new NullProgressMonitor());
534534
}
535-
if (unit.equals(sharedASTProvider.getActiveJavaElement())) {
536-
sharedASTProvider.disposeAST();
537-
}
535+
sharedASTProvider.disposeAST();
538536
unit.discardWorkingCopy();
539537
if (JDTUtils.isDefaultProject(unit)) {
540538
File f = new File(unit.getUnderlyingResource().getLocationURI());

0 commit comments

Comments
 (0)