From 09bfad33a662580cddcb9e220782494991870557 Mon Sep 17 00:00:00 2001 From: Nick Battle Date: Wed, 6 Nov 2024 11:50:56 +0000 Subject: [PATCH] Tidy AST launch codelens --- lsp/src/main/java/workspace/plugins/ASTPlugin.java | 2 +- lsp/src/main/java/workspace/plugins/ASTPluginPR.java | 3 +-- lsp/src/main/java/workspace/plugins/ASTPluginSL.java | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/lsp/src/main/java/workspace/plugins/ASTPlugin.java b/lsp/src/main/java/workspace/plugins/ASTPlugin.java index a15b6ff98..a7138b1a4 100644 --- a/lsp/src/main/java/workspace/plugins/ASTPlugin.java +++ b/lsp/src/main/java/workspace/plugins/ASTPlugin.java @@ -203,7 +203,7 @@ protected void preCheck(CheckPrepareEvent ev) * We register the launch/debug code lens here, if the tree is dirty. Else it * is registered by the TCPlugin. */ - protected List getASTCodeLenses(boolean dirty) + protected List getASTCodeLenses() { List lenses = new Vector(); diff --git a/lsp/src/main/java/workspace/plugins/ASTPluginPR.java b/lsp/src/main/java/workspace/plugins/ASTPluginPR.java index 789cd7c4d..d06a621d2 100644 --- a/lsp/src/main/java/workspace/plugins/ASTPluginPR.java +++ b/lsp/src/main/java/workspace/plugins/ASTPluginPR.java @@ -212,11 +212,10 @@ public String[] getFilenameFilters() public JSONArray getCodeLenses(File file) { JSONArray results = new JSONArray(); - ASTPlugin ast = registry.getPlugin("AST"); if (dirtyClassList != null && !dirtyClassList.isEmpty()) // May be syntax errors { - List lenses = getASTCodeLenses(ast.isDirty()); + List lenses = getASTCodeLenses(); for (ASTClassDefinition clazz: dirtyClassList) { diff --git a/lsp/src/main/java/workspace/plugins/ASTPluginSL.java b/lsp/src/main/java/workspace/plugins/ASTPluginSL.java index 1b659549e..06e318aed 100644 --- a/lsp/src/main/java/workspace/plugins/ASTPluginSL.java +++ b/lsp/src/main/java/workspace/plugins/ASTPluginSL.java @@ -160,11 +160,10 @@ public String[] getFilenameFilters() public JSONArray getCodeLenses(File file) { JSONArray results = new JSONArray(); - ASTPlugin ast = registry.getPlugin("AST"); if (dirtyModuleList != null && !dirtyModuleList.isEmpty()) { - List lenses = getASTCodeLenses(ast.isDirty()); + List lenses = getASTCodeLenses(); for (ASTModule module: dirtyModuleList) {