Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLVSCODE-846 stop using additionalAttributes map #432

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,8 @@ public static void initialize() throws Exception {
"productName", "SLCORE tests",
"productVersion", "0.1",
"productKey", "productKey",
"additionalAttributes", Map.of(
"omnisharpDirectory", omnisharpDir.toString()
)),
"omnisharpDirectory", omnisharpDir.toString()
),
new WorkspaceFolder(folder1BaseDir.toUri().toString(), "My Folder 1"));

var fileName1 = "analysisConnected_scan_all_hotspot_then_forget_hotspot1.py";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ static void initialize() throws Exception {
"showVerboseLogs", false,
"productKey", "productKey",
"additionalAttributes", Map.of(
"extra", "value",
"omnisharpDirectory", omnisharpDir.toString()
)
"extra", "value"
),
"omnisharpDirectory", omnisharpDir.toString()
), new WorkspaceFolder(analysisDir.toUri().toString(), "AnalysisDir"));
}

Expand Down
Loading