[frameworks] IDEA-325093 New project wizard: Add text hints in the wizard near the GroupId, ArtifactId

GitOrigin-RevId: a48cbb5c8306ee0eeffa9af07a0f2f33ff733a6b
This commit is contained in:
Yuriy Artamonov
2023-09-22 15:51:57 +00:00
committed by intellij-monorepo-bot
parent d52b3d9b7f
commit fd05b5cf7b
2 changed files with 20 additions and 4 deletions
@@ -1,6 +1,7 @@
// Copyright 2000-2022 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.ide.starters.shared
import com.intellij.icons.AllIcons
import com.intellij.ide.IdeBundle
import com.intellij.ide.JavaUiBundle
import com.intellij.ide.starters.JavaStartersBundle
@@ -12,6 +13,7 @@ import com.intellij.ide.util.projectWizard.ModuleWizardStep
import com.intellij.ide.util.projectWizard.WizardContext
import com.intellij.ide.wizard.NewProjectWizardStep.Companion.GIT_PROPERTY_NAME
import com.intellij.openapi.Disposable
import com.intellij.openapi.externalSystem.util.ExternalSystemBundle
import com.intellij.openapi.fileChooser.FileChooserDescriptorFactory
import com.intellij.openapi.module.StdModuleTypes
import com.intellij.openapi.observable.properties.GraphProperty
@@ -31,6 +33,7 @@ import com.intellij.openapi.ui.getPresentablePath
import com.intellij.openapi.util.io.FileUtil
import com.intellij.openapi.util.text.StringUtil
import com.intellij.ui.UIBundle
import com.intellij.ui.components.JBLabel
import com.intellij.ui.dsl.builder.*
import org.jetbrains.annotations.Nls
import java.io.File
@@ -137,9 +140,15 @@ abstract class CommonStarterInitialStep(
}
protected fun Panel.addGroupArtifactUi() {
row(JavaStartersBundle.message("title.project.group.label")) {
row {
groupRow = this
layout(RowLayout.LABEL_ALIGNED)
label(JavaStartersBundle.message("title.project.group.label"))
.applyToComponent { horizontalTextPosition = JBLabel.LEFT }
.applyToComponent { icon = AllIcons.General.ContextHelp }
.applyToComponent { toolTipText = ExternalSystemBundle.message("external.system.mavenized.structure.wizard.group.id.help") }
textField()
.bindText(groupIdProperty)
.columns(COLUMNS_MEDIUM)
@@ -147,9 +156,16 @@ abstract class CommonStarterInitialStep(
*getCustomValidationRules(GROUP_ID_PROPERTY))
}.bottomGap(BottomGap.SMALL)
row(JavaStartersBundle.message("title.project.artifact.label")) {
row {
artifactRow = this
layout(RowLayout.LABEL_ALIGNED)
label(JavaStartersBundle.message("title.project.artifact.label"))
.applyToComponent { horizontalTextPosition = JBLabel.LEFT }
.applyToComponent { icon = AllIcons.General.ContextHelp }
.applyToComponent { toolTipText = ExternalSystemBundle.message("external.system.mavenized.structure.wizard.artifact.id.help",
wizardContext.presentationName) }
textField()
.bindText(artifactIdProperty)
.columns(COLUMNS_MEDIUM)
@@ -138,8 +138,8 @@ external.system.mavenized.structure.wizard.group.id.label=GroupId:
external.system.mavenized.structure.wizard.artifact.id.label=ArtifactId:
external.system.mavenized.structure.wizard.version.label=Version:
external.system.mavenized.structure.wizard.group.id.help=The name of the artifact group, usually a company domain
external.system.mavenized.structure.wizard.artifact.id.help=The name of the artifact within the group, usually a {0} name
external.system.mavenized.structure.wizard.group.id.help=Uniquely identifies your project, usually starts with a reversed company domain name.
external.system.mavenized.structure.wizard.artifact.id.help=The name of the artifact within the group, usually a {0} name.
external.system.mavenized.structure.wizard.entity.coordinates.already.exists.error={0,choice,0#Module|1#Project} with coordinates ''{1}'' already exists
external.system.mavenized.structure.wizard.name.and.artifact.id.is.different.error={0,choice,0#Module|1#Project} name and artifactId must be the same