mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[i18ze] JdkCommandLineSetup.kt
GitOrigin-RevId: 42703d9884e497a7e32b8528cf7c871577c9fe91
This commit is contained in:
committed by
intellij-monorepo-bot
parent
ad99c31ec5
commit
2fd4ae53f0
@@ -482,3 +482,8 @@ hierarchy.empty.text.type=Type Hierarchy {0}
|
||||
hierarchy.empty.text.call=Call Hierarchy {0}
|
||||
hierarchy.empty.text.method=Method Hierarchy {0}
|
||||
hierarchy.empty.text.help=Source code hierarchy
|
||||
# {0} is a file path, and {1} is a localized message of exception
|
||||
progress.message.failed.to.upload.0.1=Failed to upload {0}. {1}
|
||||
error.message.cannot.find.java.configuration.in.0.target=Cannot find Java configuration in {0} target
|
||||
error.message.cannot.run.application.with.urlclasspath.on.the.remote.target=Cannot run application with UrlClassPath on the remote target.
|
||||
error.message.failed.to.create.a.temporary.file.in.0=Failed to create a temporary file in {0}
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.intellij.execution.target.java.JavaLanguageRuntimeType
|
||||
import com.intellij.execution.target.local.LocalTargetEnvironmentRequest
|
||||
import com.intellij.execution.target.value.DeferredTargetValue
|
||||
import com.intellij.execution.target.value.TargetValue
|
||||
import com.intellij.lang.LangBundle
|
||||
import com.intellij.openapi.application.ApplicationNamesInfo
|
||||
import com.intellij.openapi.diagnostic.Logger
|
||||
import com.intellij.openapi.roots.OrderRootType
|
||||
@@ -88,7 +89,7 @@ class JdkCommandLineSetup(private val request: TargetEnvironmentRequest,
|
||||
}
|
||||
catch (t: Throwable) {
|
||||
LOG.warn(t)
|
||||
targetProgressIndicator.addText("Failed to upload ${volume.localRoot}. ${t.localizedMessage}", ProcessOutputType.STDERR)
|
||||
targetProgressIndicator.addText(LangBundle.message("progress.message.failed.to.upload.0.1", volume.localRoot, t.localizedMessage), ProcessOutputType.STDERR)
|
||||
targetProgressIndicator.addText("\n", ProcessOutputType.STDERR)
|
||||
result.resolveFailure(t)
|
||||
}
|
||||
@@ -137,7 +138,7 @@ class JdkCommandLineSetup(private val request: TargetEnvironmentRequest,
|
||||
}
|
||||
else {
|
||||
if (languageRuntime == null) {
|
||||
throw CantRunException("Cannot find Java configuration in " + target.displayName + " target")
|
||||
throw CantRunException(LangBundle.message("error.message.cannot.find.java.configuration.in.0.target", target.displayName))
|
||||
}
|
||||
|
||||
val java = if (platform == Platform.WINDOWS) "java.exe" else "java"
|
||||
@@ -174,7 +175,7 @@ class JdkCommandLineSetup(private val request: TargetEnvironmentRequest,
|
||||
// copies agent .jar files to the beginning of the classpath to load agent classes faster
|
||||
if (vmParameters.isUrlClassloader()) {
|
||||
if (request !is LocalTargetEnvironmentRequest) {
|
||||
throw CantRunException("Cannot run application with UrlClassPath on the remote target.")
|
||||
throw CantRunException(LangBundle.message("error.message.cannot.run.application.with.urlclasspath.on.the.remote.target"))
|
||||
}
|
||||
|
||||
for (parameter in vmParameters.parameters) {
|
||||
@@ -384,7 +385,7 @@ class JdkCommandLineSetup(private val request: TargetEnvironmentRequest,
|
||||
}
|
||||
if (vmParameters.isUrlClassloader()) {
|
||||
if (request !is LocalTargetEnvironmentRequest) {
|
||||
throw CantRunException("Cannot run application with UrlClassPath on the remote target.")
|
||||
throw CantRunException(LangBundle.message("error.message.cannot.run.application.with.urlclasspath.on.the.remote.target"))
|
||||
}
|
||||
|
||||
// since request is known to be local we will simplify to TargetValue.fixed below
|
||||
@@ -605,7 +606,7 @@ class JdkCommandLineSetup(private val request: TargetEnvironmentRequest,
|
||||
|
||||
@Throws(CantRunException::class)
|
||||
private fun throwUnableToCreateTempFile(cause: IOException?) {
|
||||
throw CantRunException("Failed to create a temporary file in " + FileUtil.getTempDirectory(), cause)
|
||||
throw CantRunException(LangBundle.message("error.message.failed.to.create.a.temporary.file.in.0", FileUtil.getTempDirectory()), cause)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user