From 7c19adfa35894630d321600a60c8160f895c5386 Mon Sep 17 00:00:00 2001 From: Nieraj Singh Date: Thu, 9 Jul 2020 16:44:49 -0700 Subject: [PATCH] PT 173267278 - Fix issue when boot LS does not shut down When symbols view is open and a file editor is also open, boot LS does not shut down when the editor is closed. This fixes the issue. --- .../eclipse/gotosymbol/dialogs/InFileSymbolsProvider.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/eclipse-language-servers/org.springframework.tooling.ls.eclipse.gotosymbol/src/org/springframework/tooling/ls/eclipse/gotosymbol/dialogs/InFileSymbolsProvider.java b/eclipse-language-servers/org.springframework.tooling.ls.eclipse.gotosymbol/src/org/springframework/tooling/ls/eclipse/gotosymbol/dialogs/InFileSymbolsProvider.java index e1596ab3c..ce5916d71 100644 --- a/eclipse-language-servers/org.springframework.tooling.ls.eclipse.gotosymbol/src/org/springframework/tooling/ls/eclipse/gotosymbol/dialogs/InFileSymbolsProvider.java +++ b/eclipse-language-servers/org.springframework.tooling.ls.eclipse.gotosymbol/src/org/springframework/tooling/ls/eclipse/gotosymbol/dialogs/InFileSymbolsProvider.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2017, 2018 Pivotal, Inc. + * Copyright (c) 2017, 2020 Pivotal, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -61,7 +61,10 @@ public class InFileSymbolsProvider implements SymbolsProvider { public static SymbolsProvider createFor(LiveExpression rsrc) { LiveExpression target = rsrc.apply(r -> { - IDocument document = LSPEclipseUtils.getDocument(r); + // Get the existing document rather than request a document that may result + // in a connection to the associated file buffer. The reason for this is + // described in https://www.pivotaltracker.com/story/show/173267278 + IDocument document = LSPEclipseUtils.getExistingDocument(r); return getLSPDocumentInfo(document); }); return new InFileSymbolsProvider(target::getValue);