chore: LanguageServerDefinition remove ancient obsolete logic
This commit is contained in:
parent
3287051e3d
commit
8a0c862446
2 changed files with 2 additions and 18 deletions
|
@ -32,7 +32,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||||
/**
|
/**
|
||||||
* A trait representing a ServerDefinition
|
* A trait representing a ServerDefinition
|
||||||
*/
|
*/
|
||||||
public class LanguageServerDefinition {
|
public abstract class LanguageServerDefinition {
|
||||||
|
|
||||||
private static final Logger LOG = Logger.getInstance(LanguageServerDefinition.class);
|
private static final Logger LOG = Logger.getInstance(LanguageServerDefinition.class);
|
||||||
|
|
||||||
|
@ -75,18 +75,6 @@ public class LanguageServerDefinition {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the initialization options for the given uri.
|
|
||||||
*
|
|
||||||
* @param uri file URI
|
|
||||||
* @return initialization options
|
|
||||||
* @deprecated use {@link #customizeInitializeParams(InitializeParams)} instead
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public Object getInitializationOptions(URI uri) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Use this method to modify the {@link InitializeParams} that was initialized by this library. The values
|
* Use this method to modify the {@link InitializeParams} that was initialized by this library. The values
|
||||||
* assigned to the passed {@link InitializeParams} after this method ends will be the ones sent to the LSP server.
|
* assigned to the passed {@link InitializeParams} after this method ends will be the ones sent to the LSP server.
|
||||||
|
@ -107,9 +95,7 @@ public class LanguageServerDefinition {
|
||||||
* @param workingDir The root directory
|
* @param workingDir The root directory
|
||||||
* @return The stream connection provider
|
* @return The stream connection provider
|
||||||
*/
|
*/
|
||||||
public StreamConnectionProvider createConnectionProvider(String workingDir) {
|
public abstract StreamConnectionProvider createConnectionProvider(String workingDir);
|
||||||
throw new UnsupportedOperationException();
|
|
||||||
}
|
|
||||||
|
|
||||||
public ServerListener getServerListener() {
|
public ServerListener getServerListener() {
|
||||||
return ServerListener.DEFAULT;
|
return ServerListener.DEFAULT;
|
||||||
|
|
|
@ -591,8 +591,6 @@ public class LanguageServerWrapper {
|
||||||
new ClientCapabilities(workspaceClientCapabilities, textDocumentClientCapabilities, null));
|
new ClientCapabilities(workspaceClientCapabilities, textDocumentClientCapabilities, null));
|
||||||
initParams.setClientInfo(new ClientInfo(ApplicationInfo.getInstance().getVersionName(), ApplicationInfo.getInstance().getFullVersion()));
|
initParams.setClientInfo(new ClientInfo(ApplicationInfo.getInstance().getVersionName(), ApplicationInfo.getInstance().getFullVersion()));
|
||||||
|
|
||||||
// custom initialization options and initialize params provided by users
|
|
||||||
initParams.setInitializationOptions(serverDefinition.getInitializationOptions(URI.create(initParams.getWorkspaceFolders().get(0).getUri())));
|
|
||||||
serverDefinition.customizeInitializeParams(initParams);
|
serverDefinition.customizeInitializeParams(initParams);
|
||||||
return initParams;
|
return initParams;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue