Skip to content

Commit 3c3d9f3

Browse files
committed
address comments: Better GenerateUnitTest Action naming
1 parent 8b5f672 commit 3c3d9f3

File tree

5 files changed

+7
-9
lines changed

5 files changed

+7
-9
lines changed

plugins/amazonq/chat/jetbrains-community/resources/META-INF/plugin-chat.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@
7070
<keyboard-shortcut keymap="$default" first-keystroke="meta alt A" />
7171
</action>
7272

73-
<action id="aws.toolkit.jetbrains.core.services.cwc.commands.TestCodeAction"
74-
class="software.aws.toolkits.jetbrains.services.cwc.commands.TestCodeAction">
73+
<action id="aws.toolkit.jetbrains.core.services.cwc.commands.GenerateUnitTestAction"
74+
class="software.aws.toolkits.jetbrains.services.cwc.commands.GenerateUnitTestAction">
7575
<keyboard-shortcut keymap="$default" first-keystroke="meta alt T" />
7676
</action>
7777

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@ import com.intellij.openapi.actionSystem.CommonDataKeys
88
import software.aws.toolkits.jetbrains.core.credentials.AwsBearerTokenConnection
99
import software.aws.toolkits.jetbrains.core.credentials.ToolkitConnectionManager
1010
import software.aws.toolkits.jetbrains.core.credentials.pinning.QConnection
11-
import java.security.MessageDigest
12-
import kotlin.text.Charsets.UTF_8
1311

14-
class TestCodeAction : CustomAction(EditorContextCommand.Test) {
12+
class GenerateUnitTestAction : CustomAction(EditorContextCommand.GenerateUnitTest) {
1513
override fun update(e: AnActionEvent) {
1614
val project = e.getData(CommonDataKeys.PROJECT) ?: return
1715
val connection = ToolkitConnectionManager.getInstance(project).activeConnectionForFeature(QConnection.getInstance()) as? AwsBearerTokenConnection

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/controller/ChatController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ class ChatController private constructor(
334334
}
335335

336336
// Create prompt
337-
val prompt = if (EditorContextCommand.Test == message.command)
337+
val prompt = if (EditorContextCommand.GenerateUnitTest == message.command)
338338
"${message.command.verb} the following part of my code for me: $codeSelection" else
339339
"${message.command} the following part of my code for me: $codeSelection";
340340

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/cwc/controller/chat/userIntent/UserIntentRecognizer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class UserIntentRecognizer {
2020
EditorContextCommand.Fix -> UserIntent.APPLY_COMMON_BEST_PRACTICES
2121
EditorContextCommand.Optimize -> UserIntent.IMPROVE_CODE
2222
EditorContextCommand.ExplainCodeScanIssue -> UserIntent.EXPLAIN_CODE_SELECTION
23-
EditorContextCommand.Test -> UserIntent.GENERATE_UNIT_TESTS
23+
EditorContextCommand.GenerateUnitTest -> UserIntent.GENERATE_UNIT_TESTS
2424
EditorContextCommand.SendToPrompt -> null
2525
}
2626

plugins/core/resources/resources/software/aws/toolkits/resources/MessagesBundle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ action.aws.toolkit.jetbrains.core.services.cwc.commands.OptimizeCodeAction.descr
2525
action.aws.toolkit.jetbrains.core.services.cwc.commands.OptimizeCodeAction.text = Optimize Code
2626
action.aws.toolkit.jetbrains.core.services.cwc.commands.RefactorCodeAction.description = Refactors the selected code
2727
action.aws.toolkit.jetbrains.core.services.cwc.commands.RefactorCodeAction.text = Refactor Code
28-
action.aws.toolkit.jetbrains.core.services.cwc.commands.TestCodeAction.description = Generates unit tests for the selected code
29-
action.aws.toolkit.jetbrains.core.services.cwc.commands.TestCodeAction.text = Test Code (Beta)
28+
action.aws.toolkit.jetbrains.core.services.cwc.commands.GenerateUnitTestAction.description = Generates unit tests for the selected code
29+
action.aws.toolkit.jetbrains.core.services.cwc.commands.GenerateUnitTestAction.text = Generate Tests (Beta)
3030
action.aws.toolkit.jetbrains.core.services.cwc.commands.SendToPromptAction.description = Sends selected code to chat
3131
action.aws.toolkit.jetbrains.core.services.cwc.commands.SendToPromptAction.text = Send to Prompt
3232
action.aws.toolkit.open.arn.browser.text=Open ARN in AWS Console

0 commit comments

Comments
 (0)