mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
i18n - run targets
GitOrigin-RevId: cf96dbc8cc73d15011f0b4212973306698515edb
This commit is contained in:
committed by
intellij-monorepo-bot
parent
6586a54e87
commit
2e4d7d8bf8
+2
-1
@@ -1,12 +1,13 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.execution.target
|
||||
|
||||
import com.intellij.execution.ExecutionBundle
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.application.Experiments
|
||||
import com.intellij.openapi.options.ShowSettingsUtil
|
||||
import com.intellij.openapi.project.DumbAwareAction
|
||||
|
||||
class ManageTargetEnvironmentsAction : DumbAwareAction("Manage Targets...") {
|
||||
class ManageTargetEnvironmentsAction : DumbAwareAction(ExecutionBundle.message("action.manage.targets.text")) {
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
ShowSettingsUtil.getInstance().editConfigurable(e.project, TargetEnvironmentsConfigurable(e.project!!, null))
|
||||
}
|
||||
|
||||
+8
-3
@@ -1,11 +1,13 @@
|
||||
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.execution.target
|
||||
|
||||
import com.intellij.execution.ExecutionBundle
|
||||
import com.intellij.openapi.actionSystem.AnAction
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||
import com.intellij.openapi.options.Configurable
|
||||
import com.intellij.openapi.project.Project
|
||||
import com.intellij.openapi.ui.NamedConfigurable
|
||||
import com.intellij.openapi.util.NlsActions
|
||||
import com.intellij.ui.TitledSeparator
|
||||
import com.intellij.ui.components.DropDownLink
|
||||
import com.intellij.ui.components.JBScrollPane
|
||||
@@ -106,9 +108,11 @@ internal class TargetEnvironmentDetailsConfigurable(private val project: Project
|
||||
createComponent()?.revalidate()
|
||||
}
|
||||
|
||||
private abstract inner class ChangeRuntimeActionBase(protected val runtime: LanguageRuntimeConfiguration, text: String) : AnAction(text)
|
||||
private abstract inner class ChangeRuntimeActionBase(protected val runtime: LanguageRuntimeConfiguration,
|
||||
@NlsActions.ActionText text: String) : AnAction(text)
|
||||
|
||||
private inner class DuplicateRuntimeAction(runtime: LanguageRuntimeConfiguration) : ChangeRuntimeActionBase(runtime, "Duplicate") {
|
||||
private inner class DuplicateRuntimeAction(runtime: LanguageRuntimeConfiguration)
|
||||
: ChangeRuntimeActionBase(runtime, ExecutionBundle.message("targets.details.action.duplicate.text")) {
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
val copy = runtime.getRuntimeType().duplicateConfig(runtime)
|
||||
config.runtimes.addConfig(copy)
|
||||
@@ -116,7 +120,8 @@ internal class TargetEnvironmentDetailsConfigurable(private val project: Project
|
||||
}
|
||||
}
|
||||
|
||||
private inner class RemoveRuntimeAction(runtime: LanguageRuntimeConfiguration) : ChangeRuntimeActionBase(runtime, "Remove") {
|
||||
private inner class RemoveRuntimeAction(runtime: LanguageRuntimeConfiguration)
|
||||
: ChangeRuntimeActionBase(runtime, ExecutionBundle.message("targets.details.action.remove.text")) {
|
||||
override fun actionPerformed(e: AnActionEvent) {
|
||||
config.runtimes.removeConfig(runtime)
|
||||
forceRefreshUI()
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.execution.target
|
||||
|
||||
import com.intellij.execution.ExecutionBundle
|
||||
import com.intellij.openapi.options.MasterDetails
|
||||
import com.intellij.openapi.options.SearchableConfigurable
|
||||
import com.intellij.openapi.project.Project
|
||||
@@ -25,7 +26,7 @@ class TargetEnvironmentsConfigurable(project: Project, initialSelectedName: Stri
|
||||
|
||||
override fun getId(): String = "Runtime.Targets.Configurable"
|
||||
|
||||
override fun getDisplayName(): String = "Runtime Targets"
|
||||
override fun getDisplayName(): String = ExecutionBundle.message("configurable.name.runtime.targets")
|
||||
|
||||
override fun createComponent(): JComponent = editor.createComponent()
|
||||
|
||||
|
||||
+10
-5
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.execution.target
|
||||
|
||||
import com.intellij.execution.ExecutionBundle
|
||||
import com.intellij.openapi.actionSystem.*
|
||||
import com.intellij.openapi.keymap.KeymapUtil
|
||||
import com.intellij.openapi.project.DumbAware
|
||||
@@ -23,7 +24,8 @@ class TargetEnvironmentsMasterDetails @JvmOverloads constructor(private val proj
|
||||
// note that `MasterDetailsComponent` does not work without `initTree()`
|
||||
initTree()
|
||||
myTree.emptyText.text = "No targets added"
|
||||
myTree.emptyText.appendSecondaryText("Add new target", SimpleTextAttributes.LINK_ATTRIBUTES) { _ ->
|
||||
myTree.emptyText.appendSecondaryText(ExecutionBundle.message("targets.details.status.text.add.new.target"),
|
||||
SimpleTextAttributes.LINK_ATTRIBUTES) { _ ->
|
||||
val popup = ActionManager.getInstance().createActionPopupMenu("TargetEnvironmentsConfigurable.EmptyListText", CreateNewTargetGroup())
|
||||
val size = myTree.emptyText.preferredSize
|
||||
val textY = myTree.height / if (myTree.emptyText.isShowAboveCenter) 3 else 2
|
||||
@@ -33,10 +35,10 @@ class TargetEnvironmentsMasterDetails @JvmOverloads constructor(private val proj
|
||||
myTree.emptyText.appendSecondaryText(" ($shortcutText)", StatusText.DEFAULT_ATTRIBUTES, null)
|
||||
}
|
||||
|
||||
override fun getDisplayName(): String = "Remote Targets"
|
||||
override fun getDisplayName(): String = ExecutionBundle.message("targets.details.configurable.name.remote.targets")
|
||||
|
||||
override fun getEmptySelectionString(): String? {
|
||||
return "Select target to configure"
|
||||
return ExecutionBundle.message("targets.details.status.text.select.target.to.configure")
|
||||
}
|
||||
|
||||
override fun reset() {
|
||||
@@ -125,7 +127,8 @@ class TargetEnvironmentsMasterDetails @JvmOverloads constructor(private val proj
|
||||
}
|
||||
}
|
||||
|
||||
private inner class CreateNewTargetGroup : ActionGroup("Add", "", IconUtil.getAddIcon()),
|
||||
private inner class CreateNewTargetGroup : ActionGroup(ExecutionBundle.message("targets.details.action.add.text"),
|
||||
"", IconUtil.getAddIcon()),
|
||||
ActionGroupWithPreselection, DumbAware {
|
||||
init {
|
||||
registerCustomShortcutSet(CommonActionsPanel.getCommonShortcut(CommonActionsPanel.Buttons.ADD), myTree)
|
||||
@@ -142,7 +145,9 @@ class TargetEnvironmentsMasterDetails @JvmOverloads constructor(private val proj
|
||||
}
|
||||
}
|
||||
|
||||
private inner class DuplicateAction : DumbAwareAction("Duplicate", "Duplicate", PlatformIcons.COPY_ICON) {
|
||||
private inner class DuplicateAction : DumbAwareAction(ExecutionBundle.message("targets.details.action.duplicate.text"),
|
||||
ExecutionBundle.message("targets.details.action.duplicate.description"),
|
||||
PlatformIcons.COPY_ICON) {
|
||||
init {
|
||||
registerCustomShortcutSet(CommonShortcuts.getDuplicate(), myTree)
|
||||
}
|
||||
|
||||
+5
-4
@@ -1,6 +1,7 @@
|
||||
// Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.intellij.execution.target.java
|
||||
|
||||
import com.intellij.execution.ExecutionBundle
|
||||
import com.intellij.execution.target.LanguageRuntimeType.VolumeDescriptor
|
||||
import com.intellij.execution.target.TargetEnvironmentConfiguration
|
||||
import com.intellij.execution.target.TargetEnvironmentType.TargetSpecificVolumeContributionUI
|
||||
@@ -18,17 +19,17 @@ class JavaLanguageRuntimeUI(private val config: JavaLanguageRuntimeConfiguration
|
||||
|
||||
override fun createPanel(): DialogPanel {
|
||||
return panel {
|
||||
row("JDK home path:") {
|
||||
row(ExecutionBundle.message("java.language.runtime.jdk.home.path")) {
|
||||
textField(config::homePath)
|
||||
.comment("The path to the JDK on the target")
|
||||
.comment(ExecutionBundle.message("java.language.runtime.text.path.to.jdk.on.target"))
|
||||
}
|
||||
row("JDK version:") {
|
||||
row(ExecutionBundle.message("java.language.runtime.jdk.version")) {
|
||||
textField(config::javaVersionString)
|
||||
}
|
||||
|
||||
addVolumeUI(JavaLanguageRuntimeType.APPLICATION_FOLDER_VOLUME)
|
||||
|
||||
hideableRow("Advanced Volume Settings") {
|
||||
hideableRow(ExecutionBundle.message("java.language.runtime.separator.advanced.volume.settings")) {
|
||||
subRowIndent = 0
|
||||
addVolumeUI(JavaLanguageRuntimeType.CLASS_PATH_VOLUME)
|
||||
addVolumeUI(JavaLanguageRuntimeType.AGENTS_VOLUME)
|
||||
|
||||
@@ -527,3 +527,16 @@ dialog.message.unknown.error=Unknown error
|
||||
run.on.targets.label.new.targets=New targets
|
||||
run.on.targets.label.saved.targets=Saved targets
|
||||
run.on.targets.wizard.title.new.target=New Target
|
||||
action.manage.targets.text=Manage Targets...
|
||||
configurable.name.runtime.targets=Runtime Targets
|
||||
targets.details.action.add.text=Add
|
||||
targets.details.status.text.add.new.target=Add new target
|
||||
targets.details.action.duplicate.text=Duplicate
|
||||
targets.details.action.duplicate.description=Duplicate
|
||||
targets.details.status.text.select.target.to.configure=Select target to configure
|
||||
targets.details.action.remove.text=Remove
|
||||
targets.details.configurable.name.remote.targets=Remote Targets
|
||||
java.language.runtime.separator.advanced.volume.settings=Advanced Volume Settings
|
||||
java.language.runtime.jdk.version=JDK version:
|
||||
java.language.runtime.text.path.to.jdk.on.target=The path to the JDK on the target
|
||||
java.language.runtime.jdk.home.path=JDK home path:
|
||||
|
||||
@@ -96,9 +96,9 @@ abstract class LanguageRuntimeType<C : LanguageRuntimeConfiguration>(id: String)
|
||||
* Volume descriptor is identified by its [type] and defines the UI properties to explain user the semantic of the volume.
|
||||
*/
|
||||
data class VolumeDescriptor(val type: VolumeType,
|
||||
@get:Nls val wizardLabel: String,
|
||||
@get:Nls val description: String,
|
||||
@get:NonNls val defaultPath: String) {
|
||||
@Nls val wizardLabel: String,
|
||||
@Nls val description: String,
|
||||
@NonNls val defaultPath: String) {
|
||||
|
||||
constructor(typeId: String, wizardLabel: String, description: String, defaultPath: String) :
|
||||
this(VolumeType(typeId), wizardLabel, description, defaultPath)
|
||||
|
||||
Reference in New Issue
Block a user