Skip to content

Commit

Permalink
SLVSCODE-846 stop using additionalAttributes map
Browse files Browse the repository at this point in the history
  • Loading branch information
sophio-japharidze-sonarsource committed Jan 2, 2025
1 parent b79a121 commit d3a8d83
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,9 @@ public CompletableFuture<InitializeResult> initialize(InitializeParams params) {
hostInfoProvider.initialize(clientVersion, workspaceName);
backendServiceFacade.setTelemetryInitParams(new TelemetryInitParams(productKey, telemetryStorage,
productName, productVersion, ideVersion, platform, architecture, additionalAttributes));
backendServiceFacade.setOmnisharpDirectory((String) additionalAttributes.get("omnisharpDirectory"));
backendServiceFacade.setCsharpOssPath((String) additionalAttributes.get("csharpOssPath"));
backendServiceFacade.setCsharpEnterprisePath((String) additionalAttributes.get("csharpEnterprisePath"));
backendServiceFacade.setOmnisharpDirectory((String) options.get("omnisharpDirectory"));
backendServiceFacade.setCsharpOssPath((String) options.get("csharpOssPath"));
backendServiceFacade.setCsharpEnterprisePath((String) options.get("csharpEnterprisePath"));

var c = new ServerCapabilities();
c.setTextDocumentSync(getTextDocumentSyncOptions());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,8 @@ private static InitializeParams getInitializeParams(Map<String, Object> initiali
initializeParams.setTrace("messages");

var actualInitOptions = new HashMap<>(initializeOptions);
if (initializeOptions.containsKey("additionalAttributes")) {
var additionalAttributes = new HashMap<>((Map<String, String>) initializeOptions.get("additionalAttributes"));
additionalAttributes.put("csharpOssPath", CSHARP_OSS_PATH);
additionalAttributes.put("csharpEnterprisePath", CSHARP_ENTERPRISE_PATH);
actualInitOptions.put("additionalAttributes", additionalAttributes);
}
actualInitOptions.put("csharpOssPath", CSHARP_OSS_PATH);
actualInitOptions.put("csharpEnterprisePath", CSHARP_ENTERPRISE_PATH);
initializeParams.setInitializationOptions(actualInitOptions);

initializeParams.setWorkspaceFolders(List.of(initFolders));
Expand Down

0 comments on commit d3a8d83

Please sign in to comment.