JDT semantic tokens provider for non-eclipse clients only
This commit is contained in:
@@ -5,4 +5,4 @@ cd ../headless-services
|
||||
./mvnw clean install -Dmaven.test.skip=true
|
||||
|
||||
cd $workdir
|
||||
./mvnw -Psnapshot -Pe431 clean install -Dmaven.test.skip=true
|
||||
./mvnw -Psnapshot -Pe432 clean install -Dmaven.test.skip=true
|
||||
|
||||
@@ -10,6 +10,10 @@
|
||||
*******************************************************************************/
|
||||
package org.springframework.ide.vscode.commons.languageserver.util;
|
||||
|
||||
import org.springframework.context.annotation.Condition;
|
||||
import org.springframework.context.annotation.ConditionContext;
|
||||
import org.springframework.core.type.AnnotatedTypeMetadata;
|
||||
|
||||
/**
|
||||
* LSP Client information utilities
|
||||
*
|
||||
@@ -43,5 +47,12 @@ public class LspClient {
|
||||
}
|
||||
return client;
|
||||
}
|
||||
|
||||
public static class OnNotEclipseClient implements Condition {
|
||||
@Override
|
||||
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
|
||||
return LspClient.currentClient() != Client.ECLIPSE;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.Optional;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Conditional;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.ide.vscode.boot.java.cron.CronReconciler;
|
||||
import org.springframework.ide.vscode.boot.java.cron.CronSemanticTokens;
|
||||
@@ -51,6 +52,7 @@ import org.springframework.ide.vscode.boot.java.spel.JdtSpelReconciler;
|
||||
import org.springframework.ide.vscode.boot.java.spel.JdtSpelSemanticTokensProvider;
|
||||
import org.springframework.ide.vscode.boot.java.spel.SpelReconciler;
|
||||
import org.springframework.ide.vscode.boot.java.spel.SpelSemanticTokens;
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.LspClient;
|
||||
import org.springframework.ide.vscode.commons.languageserver.util.SimpleLanguageServer;
|
||||
|
||||
@Configuration(proxyBeanMethods = false)
|
||||
@@ -124,6 +126,7 @@ public class JdtConfig {
|
||||
return new EntityIdForRepoReconciler();
|
||||
}
|
||||
|
||||
@Conditional(LspClient.OnNotEclipseClient.class)
|
||||
@Bean JavaSemanticTokensProvider javaSemanticTokens() {
|
||||
return new JavaSemanticTokensProvider();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user