Skip to content

Commit c6660b1

Browse files
author
David Hasani
committed
fix(amazonq): show correct error message
1 parent d148b66 commit c6660b1

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/constants/CodeTransformChatItems.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,10 @@ fun buildLanguageUpgradeProjectValidChatContent() = CodeTransformChatMessageCont
279279

280280
fun buildProjectInvalidChatContent(validationResult: ValidationResult): CodeTransformChatMessageContent {
281281
val errorMessage = when (validationResult.invalidTelemetryReason.category) {
282-
CodeTransformPreValidationError.NoPom -> message("codemodernizer.chat.message.validation.error.no_pom", CODE_TRANSFORM_PREREQUISITES)
283-
CodeTransformPreValidationError.UnsupportedJavaVersion -> message("codemodernizer.chat.message.validation.error.unsupported_java_version")
282+
CodeTransformPreValidationError.UnsupportedJavaVersion, CodeTransformPreValidationError.UnsupportedBuildSystem -> message("codemodernizer.chat.message.validation.error.unsupported_module")
284283
CodeTransformPreValidationError.RemoteRunProject -> message("codemodernizer.notification.warn.invalid_project.description.reason.remote_backend")
285284
CodeTransformPreValidationError.NonSsoLogin -> message("codemodernizer.notification.warn.invalid_project.description.reason.not_logged_in")
286285
CodeTransformPreValidationError.EmptyProject -> message("codemodernizer.notification.warn.invalid_project.description.reason.missing_content_roots")
287-
CodeTransformPreValidationError.UnsupportedBuildSystem -> message("codemodernizer.chat.message.validation.error.no_pom")
288286
CodeTransformPreValidationError.NoJavaProject -> message("codemodernizer.chat.message.validation.error.no_java_project")
289287
else -> message("codemodernizer.chat.message.validation.error.other")
290288
}

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -702,9 +702,8 @@ codemodernizer.chat.message.validation.error.invalid_target_db=I can only conver
702702
codemodernizer.chat.message.validation.error.missing_sct_file=An .sct file is required for transformation. Make sure that you've uploaded the .zip file you retrieved from your schema conversion in AWS DMS.
703703
codemodernizer.chat.message.validation.error.more_info=For more information, see the [Amazon Q documentation]({0}).
704704
codemodernizer.chat.message.validation.error.no_java_project=Sorry, I could not find an open Java module with embedded Oracle SQL statements. Make sure you have a Java module open that has at least 1 content root.
705-
codemodernizer.chat.message.validation.error.no_pom=I couldn't find a module that I can upgrade. Your Java module must be built on Maven and contain a pom.xml file. For more information, see the [Amazon Q documentation]({0}).
706705
codemodernizer.chat.message.validation.error.other=I couldn't find a module that I can upgrade. Currently, I support Java 8, Java 11, and Java 17 modules built on Maven. Make sure your module is open in the IDE. If you have a Java 8, Java 11, or Java 17 module in your workspace, you might need to configure your module so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and the correct language level. In the Modules tab, set the correct module JDK and language level.
707-
codemodernizer.chat.message.validation.error.unsupported_java_version=I couldn't find a module that I can upgrade. Currently, I support Java 8, Java 11, and Java 17 projects built on Maven. Make sure your project is open in the IDE. If you have a Java 8, Java 11, or Java 17 module in your workspace, you might need to configure your module so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and the correct language level. In the Modules tab, set the correct module JDK and language level.
706+
codemodernizer.chat.message.validation.error.unsupported_module=I couldn't find a module that I can upgrade. Currently, I support Java 8, Java 11, and Java 17 projects built on Maven. Make sure your project is open in the IDE. If you have a Java 8, Java 11, or Java 17 module in your workspace, you might need to configure your module so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and the correct language level. In the Modules tab, set the correct module JDK and language level.
708707
codemodernizer.chat.message.validation.no_jdk=I couldn't build your module with your current JDK configuration. To update your JDK, go to File and choose Project Structure. In the Projects tab, set the correct project JDK in the SDK field. In the Modules tab, set the correct module JDK in the SDK field. In Maven Runner settings, set the correct JDK in the JRE field.
709708
codemodernizer.chat.prompt.label.dependency_current_version=Current version
710709
codemodernizer.chat.prompt.label.dependency_name=Dependency name

0 commit comments

Comments
 (0)