Skip to content

Commit 368d012

Browse files
committed
fix: don't show LS editor notif when a given plugin is installed
Signed-off-by: azerr <azerr@redhat.com>
1 parent 622bd06 commit 368d012

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/main/java/com/redhat/devtools/lsp4ij/launching/templates/LanguageServerTemplate.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,22 +127,23 @@ public Set<String> getDisablePromotionFor() {
127127
* @return {@code true} if the template should be promoted; {@code false} otherwise.
128128
*/
129129
public boolean isPromotable() {
130+
if (promotable != null) {
131+
return promotable;
132+
}
130133
if (disablePromotionFor == null || disablePromotionFor.isEmpty()) {
131134
return true;
132135
}
133-
if (promotable == null) {
134-
promotable = computePromotable();
135-
}
136+
promotable = computePromotable();
136137
return promotable;
137138
}
138139

139140
private boolean computePromotable() {
140141
for (var pluginId : disablePromotionFor) {
141142
if (isPluginInstalled(pluginId)) {
142-
return true;
143+
return false;
143144
}
144145
}
145-
return false;
146+
return true;
146147
}
147148

148149
private static boolean isPluginInstalled(String pluginIdString) {

0 commit comments

Comments
 (0)