mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 23:39:07 +07:00
IDEA-261130 i18n: Run/Debug configuration: Junit: hardcode strings in build and run configurations
JRE selector GitOrigin-RevId: 4ebdee1d9be538a67e1158f927653a585d9ec998
This commit is contained in:
committed by
intellij-monorepo-bot
parent
45d4d3176a
commit
fed66a349b
@@ -4,6 +4,7 @@ package com.intellij.execution.ui
|
||||
|
||||
import com.intellij.application.options.ModuleDescriptionsComboBox
|
||||
import com.intellij.application.options.ModulesComboBox
|
||||
import com.intellij.execution.ExecutionBundle
|
||||
import com.intellij.execution.configurations.JavaParameters
|
||||
import com.intellij.execution.util.JavaParametersUtil
|
||||
import com.intellij.java.JavaBundle
|
||||
@@ -70,18 +71,19 @@ abstract class DefaultJreSelector {
|
||||
|
||||
open class SdkFromModuleDependencies<T: ComboBox<*>>(val moduleComboBox: T, val getSelectedModule: (T) -> Module?, val productionOnly: () -> Boolean): DefaultJreSelector() {
|
||||
override fun getNameAndDescription(): Pair<String?, String> {
|
||||
val module = getSelectedModule(moduleComboBox) ?: return Pair.create(null, "module not specified")
|
||||
val moduleNotSpecified = ExecutionBundle.message("module.not.specified")
|
||||
val module = getSelectedModule(moduleComboBox) ?: return Pair.create(null, moduleNotSpecified)
|
||||
|
||||
val productionOnly = productionOnly()
|
||||
val jdkToRun = JavaParameters.getJdkToRunModule(module, productionOnly)
|
||||
val moduleJdk = ModuleRootManager.getInstance(module).sdk
|
||||
if (moduleJdk == null || jdkToRun == null) {
|
||||
return Pair.create(null, "module not specified")
|
||||
return Pair.create(null, moduleNotSpecified)
|
||||
}
|
||||
if (moduleJdk.homeDirectory == jdkToRun.homeDirectory) {
|
||||
return Pair.create(moduleJdk.name, "SDK of '${module.name}' module")
|
||||
return Pair.create(moduleJdk.name, ExecutionBundle.message("sdk.of.0.module", module.name))
|
||||
}
|
||||
return Pair.create(jdkToRun.name, "newest SDK from '${module.name}' module${if (productionOnly) "" else " test"} dependencies")
|
||||
return Pair.create(jdkToRun.name, ExecutionBundle.message("newest.sdk.from.0.module.1.choice.0.1.test.dependencies", module.name, if (productionOnly) 0 else 1))
|
||||
}
|
||||
|
||||
override fun getVersion(): String? {
|
||||
|
||||
@@ -590,4 +590,7 @@ state.widget.active.processes.text={0} active processes
|
||||
state.widget.debug=Debugging
|
||||
state.widget.run=Running
|
||||
state.widget.stop.action.item.name={0}: {1}
|
||||
state.widget.stop.process.action.item.name=Stop {0}
|
||||
state.widget.stop.process.action.item.name=Stop {0}
|
||||
module.not.specified=module not specified
|
||||
sdk.of.0.module=SDK of ''{0}'' module
|
||||
newest.sdk.from.0.module.1.choice.0.1.test.dependencies=newest SDK from ''{0}'' module{1, choice, 0#|1# test} dependencies
|
||||
Reference in New Issue
Block a user