Disable "Add Starters" inlay in eclipse
This commit is contained in:
@@ -66,7 +66,6 @@ public class PomInlayHintHandler implements InlayHintHandler {
|
||||
.map(doc -> URI.create(doc.getId().getUri()))
|
||||
.filter(projectBuildFileUri::equals)
|
||||
.findFirst().ifPresent(docPath -> {
|
||||
log.info("Refresh inlays for: " + docPath);
|
||||
server.getClient().refreshInlayHints();
|
||||
});
|
||||
}
|
||||
@@ -96,8 +95,6 @@ public class PomInlayHintHandler implements InlayHintHandler {
|
||||
URI uri = URI.create(params.getTextDocument().getUri());
|
||||
if ("file".equals(uri.getScheme()) && POM_XML.equals(Paths.get(uri).getFileName().toString())) {
|
||||
|
||||
log.info("INLAY for " + uri);
|
||||
|
||||
Optional<IJavaProject> projectOpt = projectFinder.find(params.getTextDocument());
|
||||
if (projectOpt.isPresent()) {
|
||||
|
||||
@@ -140,7 +137,6 @@ public class PomInlayHintHandler implements InlayHintHandler {
|
||||
hint.setPaddingLeft(true);
|
||||
hint.setLabel(List.of(label));
|
||||
|
||||
log.info("Sending inlay for " + uri);
|
||||
return List.of(hint);
|
||||
} catch (Exception e) {
|
||||
log.error("", e);
|
||||
|
||||
@@ -18,6 +18,7 @@ import org.springframework.ide.vscode.commons.languageserver.composable.Language
|
||||
import org.springframework.ide.vscode.commons.languageserver.java.JavaProjectFinder;
|
||||
import org.springframework.ide.vscode.commons.languageserver.java.ProjectObserver;
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.InlayHintHandler;
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.LspClient;
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer;
|
||||
import org.springframework.ide.vscode.commons.util.text.LanguageId;
|
||||
|
||||
@@ -36,7 +37,7 @@ public class PomLanguageServerComponents implements LanguageServerComponents{
|
||||
|
||||
@Override
|
||||
public Optional<InlayHintHandler> getInlayHintHandler() {
|
||||
return Optional.of(inlayHintHandler);
|
||||
return LspClient.currentClient() == LspClient.Client.ECLIPSE ? Optional.empty() : Optional.of(inlayHintHandler);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user