Skip to content

Commit 6c17a8b

Browse files
Merge main into feature/q-inlinechat
2 parents 2c6359a + e225cdc commit 6c17a8b

File tree

6 files changed

+15
-13
lines changed

6 files changed

+15
-13
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "feature",
3+
"description" : "Code Transform: Enable support for Java 17 projects."
4+
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ class CodeModernizerManager(private val project: Project) : PersistentStateCompo
123123
private val supportedJavaMappings = mapOf(
124124
JavaSdkVersion.JDK_1_8 to setOf(JavaSdkVersion.JDK_17),
125125
JavaSdkVersion.JDK_11 to setOf(JavaSdkVersion.JDK_17),
126+
JavaSdkVersion.JDK_17 to setOf(JavaSdkVersion.JDK_17),
126127
)
127128
init {
128129
CodeModernizerSessionState.getInstance(project).setDefaults()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ fun buildProjectValidChatContent() = CodeTransformChatMessageContent(
189189
)
190190
fun buildProjectInvalidChatContent(validationResult: ValidationResult): CodeTransformChatMessageContent {
191191
val errorMessage = when (validationResult.invalidTelemetryReason.category) {
192-
CodeTransformPreValidationError.NoPom -> message("codemodernizer.chat.message.validation.error.no_pom")
192+
CodeTransformPreValidationError.NoPom -> message("codemodernizer.chat.message.validation.error.no_pom", CODE_TRANSFORM_PREREQUISITES)
193193
CodeTransformPreValidationError.UnsupportedJavaVersion -> message("codemodernizer.chat.message.validation.error.unsupported_java_version")
194194
else -> message("codemodernizer.chat.message.validation.error.other")
195195
}

plugins/amazonq/mynah-ui/src/mynah-ui/ui/quickActions/generator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class QuickActionGenerator {
3737
? [
3838
{
3939
command: '/transform',
40-
description: 'Transform your Java 8 or 11 Maven project to Java 17',
40+
description: 'Transform your Java project',
4141
},
4242
]
4343
: []),

plugins/amazonq/mynah-ui/src/mynah-ui/ui/tabs/generator.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,7 @@ What would you like to work on?`,
5454
],
5555
[
5656
'codetransform',
57-
`Welcome to Code Transformation!
58-
59-
I can help you upgrade your Java 8 and 11 codebases to Java 17.
60-
`,
57+
`Welcome to Code Transformation!`,
6158
],
6259
])
6360

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -632,9 +632,9 @@ codemodernizer.chat.message.upload_failed_url_expired=Sorry, I couldn't upload y
632632
codemodernizer.chat.message.validation.check_eligible_projects=I'm checking for open projects that are eligible for Code Transformation.
633633
codemodernizer.chat.message.validation.check_passed=I can upgrade your Java module. To start the transformation, I need some information from you. Choose the module you want to upgrade and the target code version to upgrade to. Then, choose **Confirm**.\n\nIf you do not see the module you want to transform, you might need to configure your project so that I can find it. Go to File and choose Project Structure. In the Projects tab, set the correct project JDK and language level. In the Modules tab, set the correct module JDK and language level.
634634
codemodernizer.chat.message.validation.error.more_info=For more information, see the [Amazon Q documentation]({0}).
635-
codemodernizer.chat.message.validation.error.no_pom=Sorry, I couldn't find a module that I can upgrade. I couldn't find a pom.xml file in any of your open projects. Currently, I can only upgrade Java 8 or Java 11 projects built on Maven.
636-
codemodernizer.chat.message.validation.error.other=Sorry, I couldn't find a module that I can upgrade. Currently, I can only upgrade Java 8 or Java 11 projects built on Maven. If you have a Java 8 or Java 11 module in your workspace, you might need to configure your project 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.
637-
codemodernizer.chat.message.validation.error.unsupported_java_version=Sorry, I couldn't find a module that I can upgrade. Currently, I can only upgrade Java 8 or Java 11 modules built on Maven. If you have a Java 8 or Java 11 module in your workspace, you might need to configure your project 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.
635+
codemodernizer.chat.message.validation.error.no_pom=I couldn't find a module that I can upgrade. Your Java project must be built on Maven and contain a pom.xml file. For more information, see the [Amazon Q documentation]({0}).
636+
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 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 project 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.
637+
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 in your workspace, you might need to configure your project 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.
638638
codemodernizer.chat.message.validation.no_jdk=I couldn't build your project 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.
639639
codemodernizer.chat.prompt.label.dependency_current_version=Current version
640640
codemodernizer.chat.prompt.label.dependency_name=Dependency name
@@ -709,11 +709,11 @@ codemodernizer.notification.warn.download_failed_other.content=Amazon Q ran into
709709
codemodernizer.notification.warn.download_failed_ssl.content=Please make sure all your certificates for your proxy client have been set up correctly for your IDE.
710710
codemodernizer.notification.warn.download_failed_wildcard.content=Check your IDE proxy settings and remove any wildcard (*) references, and then try viewing the diff again.
711711
codemodernizer.notification.warn.expired_credentials.title=Your connection to Q has expired
712-
codemodernizer.notification.warn.invalid_project.description.reason.invalid_jdk_versions=None of your open modules are supported by Amazon Q Code Transformation. Currently, Amazon Q can only upgrade Java 8 or Java 11 projects built on Maven.
713-
codemodernizer.notification.warn.invalid_project.description.reason.missing_content_roots=None of your open modules are supported by Amazon Q Code Transformation. Currently, Amazon Q can only upgrade Java 8 or Java 11 projects built on Maven.
714-
codemodernizer.notification.warn.invalid_project.description.reason.no_valid_files=None of your open modules are supported by Amazon Q Code Transformation. Amazon Q could not find a pom.xml file in any of your open modules. Currently, Amazon Q can only upgrade Java 8 or Java 11 projects built on Maven.
712+
codemodernizer.notification.warn.invalid_project.description.reason.invalid_jdk_versions=None of your open modules are supported for code transformation with Amazon Q. Amazon Q can upgrade Java 8, Java 11, and Java 17 projects built on Maven.
713+
codemodernizer.notification.warn.invalid_project.description.reason.missing_content_roots=None of your open modules are supported for code transformation with Amazon Q. Amazon Q can upgrade Java 8, Java 11, and Java 17 projects built on Maven.
714+
codemodernizer.notification.warn.invalid_project.description.reason.no_valid_files=None of your open modules are supported for code transformation with Amazon Q. A pom.xml is required for transformation. Amazon Q can upgrade Java 8, Java 11, and Java 17 projects built on Maven.
715715
codemodernizer.notification.warn.invalid_project.description.reason.not_logged_in=Amazon Q cannot start the transformation as you are not logged in with Identity Center or Builder ID. Also ensure that you are not using IntelliJ version 232.8660.185 and that you are not developing on a remote host (uncommon).
716-
codemodernizer.notification.warn.invalid_project.description.reason.remote_backend=None of your open modules are supported by Amazon Q Code Transformation. Currently, Amazon Q can only upgrade Java 8 or Java 11 projects built on Maven, and cannot upgrade projects running on a remote host.
716+
codemodernizer.notification.warn.invalid_project.description.reason.remote_backend=None of your open modules are supported for code transformation with Amazon Q. Amazon Q cannot transform projects running on a remote host.
717717
codemodernizer.notification.warn.maven_failed.content=Amazon Q could not run the Maven clean install command to build your module.
718718
codemodernizer.notification.warn.maven_failed.title=Amazon Q Code Transform unable to zip dependencies
719719
codemodernizer.notification.warn.on_resume.unknown_status_response.content=We received data from Amazon Q in a format that the plugin cannot handle. You may need to update the plugin and then try again.

0 commit comments

Comments
 (0)