gradle.kts: update notification messages after proofreading
This commit is contained in:
@@ -1,40 +1,56 @@
|
||||
notification.oldGradle.firstLoad=Code insight is disabled to avoid Gradle build configuration
|
||||
notification.oldGradle.firstLoad.info=<div width=400>\
|
||||
<p>The Gradle configuration phase is required to be run to get the Script Configuration \
|
||||
It is disabled by default since it can be expensive for large Gradle projects.</p>\
|
||||
<br/>\
|
||||
<p>Click "Load Configuration" to evaluate Gradle build scripts.</p>\
|
||||
<br/>\
|
||||
<p>Alternatively, you can "Enable auto-reload" for all files to automatically load \
|
||||
configuration on the first opening and reload it on each change of build script configuration blocks. \
|
||||
This option is not recommended for a big Gradle project with a long configuration time.</p>\
|
||||
gradle.script.configurations.importing.feature=Load Gradle Kotlin DSL script configurations during Gradle project import
|
||||
notification.gradle.legacy.firstLoad=Code insight is disabled to avoid the Gradle build configuration.
|
||||
notification.gradle.legacy.firstLoad.info=<div width=400><p>The Gradle configuration phase needs to be run to get the Script Configuration. \
|
||||
Loading the script configuration is disabled by default, since it can be resource-intensive for large Gradle projects.</p>\
|
||||
<p>Click "Load Configuration" to evaluate the Gradle Kotlin DSL script.</p>\
|
||||
<p>Alternatively, to automatically load the configuration when the script first opens \
|
||||
and reload it each time build script configuration blocks are changed, you can enable "auto-reload" for all scripts. \
|
||||
This option is not recommended for large Gradle projects with long configuration times.</p>\
|
||||
</div>
|
||||
notification.gradle.legacy.outsideProject=Code insight unavailable (related Gradle project not linked).
|
||||
notification.gradle.legacy.outsideProject.addToStandaloneHelp=<div width=400>\
|
||||
<p>The Gradle project that evaluates this script needs to be imported to have it analyzed by the IDE. \
|
||||
Try re-importing the linked Gradle project or link a new Gradle project that evaluates this script.</p>\
|
||||
<p>Alternatively, you can add it to standalone scripts, and its configuration will be loaded automatically.</p>\
|
||||
<p><b>NOTE:</b> Each standalone script requires a separate Gradle configuration phase to be executed on update. \
|
||||
This can be resource intensive for large Gradle projects.</p>\
|
||||
</div>
|
||||
gradle.script.configurations.importing.feature=Load gradle kotlin scripts configuration from project importing
|
||||
notification.outsideAnything.text=Code insight unavailable (related Gradle project not linked)
|
||||
notification.gradle.legacy.standalone.info=<div width=400>\
|
||||
<p>The Gradle project that evaluates this script isn't imported in IDE. \
|
||||
<br/>\
|
||||
<p><b>NOTE:</b> Each standalone script requires a separate Gradle configuration phase to be executed on update. \
|
||||
This can be resource intensive for large Gradle projects.</p>\
|
||||
</div>
|
||||
notification.outsideAnything.text=Code insight unavailable (related Gradle project not linked).
|
||||
notification.outsideAnything.linkAction=Link Gradle project
|
||||
notification.wasNotImportedAfterCreation.text=Code insight unavailable (Gradle project not imported)
|
||||
notification.wasNotImportedAfterCreation.193.text=Code insight unavailable (Gradle project not imported).
|
||||
notification.wasNotImportedAfterCreation.text=Code insight unavailable (Script Configurations not loaded).
|
||||
notification.wasNotImportedAfterCreation.help=<div width=400>\
|
||||
<p>The Gradle Kotlin DSL script configurations are missing. \
|
||||
Import the external Gradle project or load the configurations \
|
||||
to get script code insight.</p>\
|
||||
</div>
|
||||
action.label.import.project=Import Project
|
||||
action.text.load.script.configurations=Load Script Configurations
|
||||
action.description.load.script.configurations=Gradle Kotlin DSL script configuration has been changed. Load changes to get script code insight without loading the external Gradle project.
|
||||
action.description.load.script.configurations=The Gradle Kotlin DSL script configuration has been changed. Load the changes to get code insight without importing the external Gradle project.
|
||||
action.label.enable.auto.import=Enable Auto-Import
|
||||
notification.notEvaluatedInLastImport.text=Code insight unavailable (configuration for this script wasn't received during last import)
|
||||
notification.notEvaluatedInLastImport.addAsStandaloneAction=Add as standalone script
|
||||
notification.notEvaluatedInLastImport.text=Code insight unavailable (configuration for this script wasn't received during the last Gradle project import).
|
||||
notification.notEvaluatedInLastImport.addAsStandaloneAction=Add to standalone scripts
|
||||
notification.notEvaluatedInLastImport.info=<div width=400>\
|
||||
<p>The Gradle project that evaluates this script needs to be imported to get it analyzed by the IDE.\
|
||||
Try reimport linked Gradle project or link a new Gradle project that evaluates this script.</p>\
|
||||
<br/>\
|
||||
<p>Alternatively, you can mark this script as standalone and its configuration will be loaded separately.</p>\
|
||||
<br/> \
|
||||
<p><b>NOTE:</b> Each standalone script requires separate Gradle configuration phase to be executed on update. \
|
||||
This can be expensive for large Gradle projects.</p>\
|
||||
</div>
|
||||
<p>The Gradle project that evaluates this script needs to be imported to have it analyzed by the IDE. \
|
||||
Try re-importing the linked Gradle project or link a new Gradle project that evaluates this script.</p>\
|
||||
<p>Alternatively, you can add it to standalone scripts, and its configuration will be loaded separately.</p>\
|
||||
<p><b>NOTE:</b> Each standalone script requires a separate Gradle configuration phase to be executed on update. \
|
||||
This can be resource intensive for large Gradle projects.</p>\
|
||||
</div>
|
||||
notification.standalone.text=Standalone script
|
||||
notification.standalone.disableScriptAction=Disable script
|
||||
notification.standalone.disableScriptAction=Remove from standalone scripts
|
||||
notification.standalone.info=<div width=400>\
|
||||
<p>Configuration for this script will be loaded separately from Gradle project Sync. \
|
||||
<br/>\
|
||||
<p>This can be expensive for large Gradle projects.</p>\
|
||||
</div>
|
||||
<p>The configuration for this script will be loaded separately from Gradle project sync.\
|
||||
<br/>\
|
||||
<p><b>NOTE:</b> Each standalone script requires a separate Gradle configuration phase to be executed on update. \
|
||||
This can be resource intensive for large Gradle projects.</p>\
|
||||
</div>
|
||||
action.text.install=Install
|
||||
action.text.show.kotlin.gradle.dsl.logs.in=Show Kotlin Gradle DSL Logs in {0}
|
||||
build.0.project=Build {0}
|
||||
|
||||
@@ -53,7 +53,9 @@ fun runPartialGradleImport(project: Project, root: GradleBuildRoot) {
|
||||
)
|
||||
}
|
||||
|
||||
fun getMissingConfigurationsDescription() = KotlinIdeaGradleBundle.message("notification.wasNotImportedAfterCreation.text")
|
||||
fun getMissingConfigurationActionText() = KotlinIdeaGradleBundle.message("action.text.load.script.configurations")
|
||||
fun getMissingConfigurationsHelp(): String? = KotlinIdeaGradleBundle.message("notification.wasNotImportedAfterCreation.help")
|
||||
|
||||
fun autoReloadScriptConfigurations(project: Project, file: VirtualFile): Boolean {
|
||||
val definition = file.findScriptDefinition(project) ?: return false
|
||||
|
||||
+2
@@ -49,7 +49,9 @@ fun runPartialGradleImport(project: Project, root: GradleBuildRoot) {
|
||||
)
|
||||
}
|
||||
|
||||
fun getMissingConfigurationsDescription() = KotlinIdeaGradleBundle.message("notification.wasNotImportedAfterCreation.193.text")
|
||||
fun getMissingConfigurationActionText() = KotlinIdeaGradleBundle.message("action.label.import.project")
|
||||
fun getMissingConfigurationsHelp(): String? = null
|
||||
|
||||
fun autoReloadScriptConfigurations(project: Project, root: GradleBuildRoot): Boolean {
|
||||
return ExternalSystemApiUtil
|
||||
|
||||
+16
-6
@@ -66,11 +66,11 @@ class GradleScriptNotificationProvider(private val project: Project) :
|
||||
if (actions == null) null
|
||||
else {
|
||||
object : EditorNotificationPanel() {
|
||||
val contextHelp = KotlinIdeaGradleBundle.message("notification.oldGradle.firstLoad.info")
|
||||
val contextHelp = KotlinIdeaGradleBundle.message("notification.gradle.legacy.firstLoad.info")
|
||||
|
||||
init {
|
||||
if (actions.isFirstLoad) {
|
||||
text(KotlinIdeaGradleBundle.message("notification.oldGradle.firstLoad"))
|
||||
text(KotlinIdeaGradleBundle.message("notification.gradle.legacy.firstLoad"))
|
||||
toolTipText = contextHelp
|
||||
} else {
|
||||
text(KotlinIdeaCoreBundle.message("notification.text.script.configuration.has.been.changed"))
|
||||
@@ -92,12 +92,13 @@ class GradleScriptNotificationProvider(private val project: Project) :
|
||||
}
|
||||
}
|
||||
legacyOutside -> EditorNotificationPanel().apply {
|
||||
text("Out of project script")
|
||||
text(KotlinIdeaGradleBundle.message("notification.gradle.legacy.outsideProject"))
|
||||
createActionLabel(KotlinIdeaGradleBundle.message("notification.notEvaluatedInLastImport.addAsStandaloneAction")) {
|
||||
rootsManager.updateStandaloneScripts {
|
||||
addStandaloneScript(file.path)
|
||||
}
|
||||
}
|
||||
contextHelp(KotlinIdeaGradleBundle.message("notification.gradle.legacy.outsideProject.addToStandaloneHelp"))
|
||||
}
|
||||
outsideAnything -> EditorNotificationPanel().apply {
|
||||
text(KotlinIdeaGradleBundle.message("notification.outsideAnything.text"))
|
||||
@@ -106,13 +107,17 @@ class GradleScriptNotificationProvider(private val project: Project) :
|
||||
}
|
||||
}
|
||||
wasNotImportedAfterCreation -> EditorNotificationPanel().apply {
|
||||
text(KotlinIdeaGradleBundle.message("notification.wasNotImportedAfterCreation.text"))
|
||||
text(getMissingConfigurationsDescription())
|
||||
createActionLabel(getMissingConfigurationActionText()) {
|
||||
val root = scriptUnderRoot.nearest
|
||||
if (root != null) {
|
||||
runPartialGradleImport(project, root)
|
||||
}
|
||||
}
|
||||
val help = getMissingConfigurationsHelp()
|
||||
if (help != null) {
|
||||
contextHelp(help)
|
||||
}
|
||||
}
|
||||
notEvaluatedInLastImport -> EditorNotificationPanel().apply {
|
||||
text(KotlinIdeaGradleBundle.message("notification.notEvaluatedInLastImport.text"))
|
||||
@@ -128,7 +133,7 @@ class GradleScriptNotificationProvider(private val project: Project) :
|
||||
|
||||
contextHelp(KotlinIdeaGradleBundle.message("notification.notEvaluatedInLastImport.info"))
|
||||
}
|
||||
standalone -> EditorNotificationPanel().apply {
|
||||
standalone, standaloneLegacy -> EditorNotificationPanel().apply {
|
||||
val actions = standaloneScriptActions[file]
|
||||
if (actions != null) {
|
||||
text(
|
||||
@@ -153,7 +158,12 @@ class GradleScriptNotificationProvider(private val project: Project) :
|
||||
removeStandaloneScript(file.path)
|
||||
}
|
||||
}
|
||||
contextHelp(KotlinIdeaGradleBundle.message("notification.standalone.info"))
|
||||
|
||||
if (scriptUnderRoot.notificationKind == standaloneLegacy) {
|
||||
contextHelp(KotlinIdeaGradleBundle.message("notification.gradle.legacy.standalone.info"))
|
||||
} else {
|
||||
contextHelp(KotlinIdeaGradleBundle.message("notification.standalone.info"))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -69,7 +69,8 @@ abstract class GradleBuildRootsLocator {
|
||||
outsideAnything, // suggest link related gradle build or just say that there is no one
|
||||
wasNotImportedAfterCreation, // project not yet imported after this file was created
|
||||
notEvaluatedInLastImport, // all other scripts, suggest to sync or mark as standalone
|
||||
standalone
|
||||
standalone,
|
||||
standaloneLegacy
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -88,7 +89,10 @@ abstract class GradleBuildRootsLocator {
|
||||
val notificationKind: NotificationKind
|
||||
get() = when {
|
||||
isImported -> NotificationKind.dontCare
|
||||
standalone -> NotificationKind.standalone
|
||||
standalone -> when (nearest) {
|
||||
is Legacy -> NotificationKind.standaloneLegacy
|
||||
else -> NotificationKind.standalone
|
||||
}
|
||||
nearest == null -> NotificationKind.outsideAnything
|
||||
importing -> NotificationKind.dontCare
|
||||
else -> when (nearest) {
|
||||
|
||||
Reference in New Issue
Block a user