-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into breedloj/telemetryTypes
- Loading branch information
Showing
5 changed files
with
85 additions
and
5 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
plugin/src/software/aws/toolkits/eclipse/amazonq/customization/CustomizationUtil.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package software.aws.toolkits.eclipse.amazonq.customization; | ||
|
||
import java.util.Map; | ||
import org.eclipse.lsp4j.DidChangeConfigurationParams; | ||
import software.aws.toolkits.eclipse.amazonq.exception.AmazonQPluginException; | ||
import software.aws.toolkits.eclipse.amazonq.providers.LspProvider; | ||
import software.aws.toolkits.eclipse.amazonq.util.PluginLogger; | ||
|
||
public final class CustomizationUtil { | ||
|
||
private CustomizationUtil() { | ||
// to avoid initiation | ||
} | ||
|
||
public static void triggerChangeConfigurationNotification(final Map<String, Object> settings) { | ||
try { | ||
PluginLogger.info("Sending configuration update notification to Amazon Q LSP server"); | ||
LspProvider.getAmazonQServer() | ||
.thenAccept(server -> server.getWorkspaceService().didChangeConfiguration(new DidChangeConfigurationParams(settings))); | ||
} catch (Exception e) { | ||
PluginLogger.error("Error occurred while sending change configuration notification to Amazon Q LSP server", e); | ||
throw new AmazonQPluginException(e); | ||
} | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
plugin/src/software/aws/toolkits/eclipse/amazonq/util/Constants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package software.aws.toolkits.eclipse.amazonq.util; | ||
|
||
public final class Constants { | ||
|
||
private Constants() { | ||
// to avoid initiation | ||
} | ||
|
||
public static final String CUSTOMIZATION_STORAGE_INTERNAL_KEY = "aws.q.customization.eclipse"; | ||
public static final String LSP_CUSTOMIZATION_CONFIGURATION_KEY = "customization"; | ||
public static final String LSP_CONFIGURATION_KEY = "aws.q"; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters