i18n: Add bundle for JVM debugger (core)
This commit is contained in:
committed by
Dmitry Gridin
parent
b0cd9911a4
commit
e0d5607fcd
@@ -242,16 +242,6 @@ kotlin.compiler.js.option.output.postfix.browse.title=Choose file to append to g
|
||||
kotlin.compiler.js.option.output.copy.files=&Copy library runtime files
|
||||
kotlin.compiler.js.option.output.copy.dir=O&utput directory for library &runtime files:
|
||||
|
||||
# Debugger
|
||||
debugger.filter.ignore.internal.classes=Do not step into Kotlin runtime library implementation classes
|
||||
debugger.data.view.delegated.properties=Calculate values of delegated properties (may affect program execution)
|
||||
debugger.field.watchpoints.tab.title=Kotlin Field Watchpoints
|
||||
debugger.function.breakpoints.tab.title=Kotlin Function Breakpoints
|
||||
debugger.line.breakpoints.tab.title=Kotlin Line Breakpoints
|
||||
debugger.field.watchpoints.properties.panel.field.access.label=Field &access
|
||||
debugger.field.watchpoints.properties.panel.field.modification.label=Field &modification
|
||||
debugger.field.watchpoints.properties.panel.field.initialization.label=Field &initialization
|
||||
|
||||
# Coroutine Debugger
|
||||
debugger.session.tab.coroutine.title=Coroutines
|
||||
debugger.session.tab.coroutine.message.failure=Failed to retrieve coroutine status
|
||||
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
find.inline.calls.task.compute.names=Compute class names for declaration {0}
|
||||
find.inline.calls.task.cancelled=Debugger can skip some executions of {0} because the computation of class names was interrupted
|
||||
|
||||
alternative.sources.notification.title=Alternative source available for file {0}
|
||||
alternative.sources.notification.disable=Disable
|
||||
|
||||
function.breakpoint.tab.title=Kotlin Function Breakpoints
|
||||
function.breakpoint.initialize=Initialize function breakpoint
|
||||
function.breakpoint.cancel.emulation=Cancel emulation
|
||||
|
||||
line.breakpoint.tab.title=Kotlin Line Breakpoints
|
||||
line.breakpoint=Line breakpoint
|
||||
line.and.lambda.breakpoint=Line and {0,choice,1#Lambda|2#Lambdas} Breakpoints
|
||||
|
||||
filter.ignore.internal.classes=Do not step into Kotlin runtime library implementation classes
|
||||
variables.calculate.delegated.property.values=Calculate values of delegated properties (may affect program execution)
|
||||
|
||||
field.watchpoint.tab.title=Kotlin Field Watchpoints
|
||||
field.watchpoint.properties.access=Field &access
|
||||
field.watchpoint.properties.modification=Field &modification
|
||||
field.watchpoint.properties.initialization=Field &initialization
|
||||
+3
-3
@@ -41,7 +41,7 @@ class InlineCallableUsagesSearcher(private val myDebugProcess: DebugProcess) {
|
||||
return ComputedClassNames.EMPTY
|
||||
} else {
|
||||
val searchResult = hashSetOf<PsiElement>()
|
||||
val declarationName = runReadAction { declaration.name }
|
||||
val declarationName = runReadAction { declaration.name ?: "<error>" }
|
||||
|
||||
val task = Runnable {
|
||||
for (reference in ReferencesSearch.search(declaration, getScopeForInlineDeclarationUsages(declaration))) {
|
||||
@@ -54,7 +54,7 @@ class InlineCallableUsagesSearcher(private val myDebugProcess: DebugProcess) {
|
||||
if (applicationEx.isDispatchThread) {
|
||||
isSuccess = ProgressManager.getInstance().runProcessWithProgressSynchronously(
|
||||
task,
|
||||
"Compute class names for declaration $declarationName",
|
||||
KotlinDebuggerCoreBundle.message("find.inline.calls.task.compute.names", declarationName),
|
||||
true,
|
||||
myDebugProcess.project
|
||||
)
|
||||
@@ -68,7 +68,7 @@ class InlineCallableUsagesSearcher(private val myDebugProcess: DebugProcess) {
|
||||
|
||||
if (!isSuccess) {
|
||||
XDebuggerManagerImpl.NOTIFICATION_GROUP.createNotification(
|
||||
"Debugger can skip some executions of $declarationName because the computation of class names was interrupted",
|
||||
KotlinDebuggerCoreBundle.message("find.inline.calls.task.cancelled", declarationName),
|
||||
MessageType.WARNING
|
||||
).notify(myDebugProcess.project)
|
||||
}
|
||||
|
||||
+2
-2
@@ -106,7 +106,7 @@ class KotlinAlternativeSourceNotificationProvider(private val myProject: Project
|
||||
}
|
||||
|
||||
init {
|
||||
setText("Alternative source available for file ${file.name}")
|
||||
setText(KotlinDebuggerCoreBundle.message("alternative.sources.notification.title", file.name))
|
||||
|
||||
val items = alternatives.map { ComboBoxFileElement(it) }
|
||||
myLinksPanel.add(
|
||||
@@ -139,7 +139,7 @@ class KotlinAlternativeSourceNotificationProvider(private val myProject: Project
|
||||
}
|
||||
})
|
||||
|
||||
createActionLabel("Disable") {
|
||||
createActionLabel(KotlinDebuggerCoreBundle.message("alternative.sources.notification.disable")) {
|
||||
DebuggerSettings.getInstance().SHOW_ALTERNATIVE_SOURCE = false
|
||||
FILE_PROCESSED_KEY.set(file, null)
|
||||
val fileEditorManager = FileEditorManager.getInstance(project)
|
||||
|
||||
+24
@@ -0,0 +1,24 @@
|
||||
/*
|
||||
* Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.idea.debugger
|
||||
|
||||
import com.intellij.CommonBundle
|
||||
import org.jetbrains.annotations.NonNls
|
||||
import org.jetbrains.annotations.PropertyKey
|
||||
import org.jetbrains.kotlin.idea.core.util.KotlinBundleBase
|
||||
import java.util.*
|
||||
|
||||
object KotlinDebuggerCoreBundle : KotlinBundleBase() {
|
||||
@NonNls
|
||||
private const val BUNDLE = "org.jetbrains.kotlin.idea.debugger.KotlinDebuggerCoreBundle"
|
||||
|
||||
override fun createBundle(): ResourceBundle = ResourceBundle.getBundle(BUNDLE)
|
||||
|
||||
@JvmStatic
|
||||
fun message(@NonNls @PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any?): String {
|
||||
return CommonBundle.message(bundle, key, *params)
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
<xy x="20" y="20" width="681" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -14,7 +14,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<selected value="false"/>
|
||||
<text resource-bundle="org/jetbrains/kotlin/idea/KotlinBundle" key="debugger.data.view.delegated.properties"/>
|
||||
<text resource-bundle="org/jetbrains/kotlin/idea/debugger/KotlinDebuggerCoreBundle" key="variables.calculate.delegated.property.values"/>
|
||||
</properties>
|
||||
</component>
|
||||
<vspacer id="c37da">
|
||||
|
||||
+4
-4
@@ -11,7 +11,7 @@ import com.intellij.util.ui.DialogUtil
|
||||
import com.intellij.xdebugger.breakpoints.XLineBreakpoint
|
||||
import com.intellij.xdebugger.breakpoints.ui.XBreakpointCustomPropertiesPanel
|
||||
import com.intellij.xdebugger.impl.breakpoints.XBreakpointBase
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.debugger.KotlinDebuggerCoreBundle
|
||||
import java.awt.BorderLayout
|
||||
import javax.swing.Box
|
||||
import javax.swing.JCheckBox
|
||||
@@ -26,10 +26,10 @@ class KotlinFieldBreakpointPropertiesPanel : XBreakpointCustomPropertiesPanel<XL
|
||||
|
||||
override fun getComponent(): JComponent {
|
||||
myWatchInitializationCheckBox =
|
||||
JCheckBox(KotlinBundle.message("debugger.field.watchpoints.properties.panel.field.initialization.label"))
|
||||
myWatchAccessCheckBox = JCheckBox(KotlinBundle.message("debugger.field.watchpoints.properties.panel.field.access.label"))
|
||||
JCheckBox(KotlinDebuggerCoreBundle.message("field.watchpoint.properties.initialization"))
|
||||
myWatchAccessCheckBox = JCheckBox(KotlinDebuggerCoreBundle.message("field.watchpoint.properties.access"))
|
||||
myWatchModificationCheckBox =
|
||||
JCheckBox(KotlinBundle.message("debugger.field.watchpoints.properties.panel.field.modification.label"))
|
||||
JCheckBox(KotlinDebuggerCoreBundle.message("field.watchpoint.properties.modification"))
|
||||
|
||||
DialogUtil.registerMnemonic(myWatchInitializationCheckBox)
|
||||
DialogUtil.registerMnemonic(myWatchAccessCheckBox)
|
||||
|
||||
+4
-2
@@ -25,7 +25,7 @@ import com.intellij.xdebugger.breakpoints.ui.XBreakpointCustomPropertiesPanel
|
||||
import org.jetbrains.kotlin.asJava.classes.KtLightClass
|
||||
import org.jetbrains.kotlin.asJava.classes.KtLightClassForFacade
|
||||
import org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle
|
||||
import org.jetbrains.kotlin.idea.debugger.KotlinDebuggerCoreBundle
|
||||
import org.jetbrains.kotlin.idea.debugger.breakpoints.dialog.AddFieldBreakpointDialog
|
||||
import org.jetbrains.kotlin.idea.util.application.runWriteAction
|
||||
import org.jetbrains.kotlin.psi.KtDeclarationContainer
|
||||
@@ -36,7 +36,9 @@ import javax.swing.JComponent
|
||||
|
||||
class KotlinFieldBreakpointType :
|
||||
JavaBreakpointType<KotlinPropertyBreakpointProperties>,
|
||||
XLineBreakpointType<KotlinPropertyBreakpointProperties>("kotlin-field", KotlinBundle.message("debugger.field.watchpoints.tab.title")),
|
||||
XLineBreakpointType<KotlinPropertyBreakpointProperties>(
|
||||
"kotlin-field", KotlinDebuggerCoreBundle.message("field.watchpoint.tab.title")
|
||||
),
|
||||
KotlinBreakpointType {
|
||||
override fun createJavaBreakpoint(
|
||||
project: Project,
|
||||
|
||||
+6
-2
@@ -55,6 +55,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.java.debugger.breakpoints.properties.JavaMethodBreakpointProperties;
|
||||
import org.jetbrains.kotlin.asJava.LightClassUtilsKt;
|
||||
import org.jetbrains.kotlin.asJava.classes.KtLightClass;
|
||||
import org.jetbrains.kotlin.idea.debugger.KotlinDebuggerCoreBundle;
|
||||
import org.jetbrains.kotlin.psi.KtClass;
|
||||
import org.jetbrains.kotlin.psi.KtClassOrObject;
|
||||
import org.jetbrains.kotlin.psi.KtDeclaration;
|
||||
@@ -107,7 +108,7 @@ public class KotlinFunctionBreakpoint extends BreakpointWithHighlighter<JavaMeth
|
||||
|
||||
Project project = myProject;
|
||||
|
||||
Task.Backgroundable task = new Task.Backgroundable(myProject, "Initialize function breakpoint") {
|
||||
Task.Backgroundable task = new Task.Backgroundable(myProject, KotlinDebuggerCoreBundle.message("function.breakpoint.initialize")) {
|
||||
@Override
|
||||
public void run(@NotNull ProgressIndicator indicator) {
|
||||
SourcePosition sourcePosition = KotlinFunctionBreakpoint.this.getSourcePosition();
|
||||
@@ -181,7 +182,10 @@ public class KotlinFunctionBreakpoint extends BreakpointWithHighlighter<JavaMeth
|
||||
ApplicationManager.getApplication().invokeAndWait(
|
||||
() -> {
|
||||
ProgressWindow progress =
|
||||
new ProgressWindow(true, false, debugProcess.getProject(), "Cancel emulation");
|
||||
new ProgressWindow(
|
||||
true, false, debugProcess.getProject(),
|
||||
KotlinDebuggerCoreBundle.message("function.breakpoint.cancel.emulation")
|
||||
);
|
||||
progress.setDelayInMillis(2000);
|
||||
indicatorRef.set(progress);
|
||||
});
|
||||
|
||||
+2
-2
@@ -18,7 +18,7 @@ import com.intellij.xdebugger.breakpoints.ui.XBreakpointCustomPropertiesPanel;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.java.debugger.breakpoints.properties.JavaMethodBreakpointProperties;
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle;
|
||||
import org.jetbrains.kotlin.idea.debugger.KotlinDebuggerCoreBundle;
|
||||
import org.jetbrains.kotlin.psi.*;
|
||||
|
||||
import javax.swing.*;
|
||||
@@ -34,7 +34,7 @@ public class KotlinFunctionBreakpointType
|
||||
{
|
||||
// MODIFICATION: Start Kotlin implementation
|
||||
public KotlinFunctionBreakpointType() {
|
||||
super("kotlin-function", KotlinBundle.message("debugger.function.breakpoints.tab.title"));
|
||||
super("kotlin-function", KotlinDebuggerCoreBundle.message("function.breakpoint.tab.title"));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-5
@@ -41,7 +41,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.java.debugger.breakpoints.properties.JavaBreakpointProperties;
|
||||
import org.jetbrains.java.debugger.breakpoints.properties.JavaLineBreakpointProperties;
|
||||
import org.jetbrains.kotlin.idea.KotlinBundle;
|
||||
import org.jetbrains.kotlin.idea.debugger.KotlinDebuggerCoreBundle;
|
||||
import org.jetbrains.kotlin.idea.debugger.KotlinPositionManager;
|
||||
import org.jetbrains.kotlin.lexer.KtTokens;
|
||||
import org.jetbrains.kotlin.psi.KtElement;
|
||||
@@ -54,7 +54,7 @@ import static org.jetbrains.kotlin.idea.debugger.breakpoints.BreakpointTypeUtils
|
||||
|
||||
public class KotlinLineBreakpointType extends JavaLineBreakpointType implements KotlinBreakpointType {
|
||||
public KotlinLineBreakpointType() {
|
||||
super("kotlin-line", KotlinBundle.message("debugger.line.breakpoints.tab.title"));
|
||||
super("kotlin-line", KotlinDebuggerCoreBundle.message("line.breakpoint.tab.title"));
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -263,7 +263,7 @@ public class KotlinLineBreakpointType extends JavaLineBreakpointType implements
|
||||
@NotNull
|
||||
@Override
|
||||
public String getText() {
|
||||
return "Line Breakpoint";
|
||||
return KotlinDebuggerCoreBundle.message("line.breakpoint");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,8 +278,7 @@ public class KotlinLineBreakpointType extends JavaLineBreakpointType implements
|
||||
@NotNull
|
||||
@Override
|
||||
public String getText() {
|
||||
String lambdas = lambdaCount > 1 ? "Lambdas" : "Lambda";
|
||||
return "Line and " + lambdas + " Breakpoints";
|
||||
return KotlinDebuggerCoreBundle.message("line.and.lambda.breakpoint", lambdaCount);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@
|
||||
<grid id="27dc6" binding="myPanel" layout-manager="GridLayoutManager" row-count="2" column-count="2" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
|
||||
<margin top="0" left="0" bottom="0" right="0"/>
|
||||
<constraints>
|
||||
<xy x="20" y="20" width="500" height="400"/>
|
||||
<xy x="20" y="20" width="662" height="400"/>
|
||||
</constraints>
|
||||
<properties/>
|
||||
<border type="none"/>
|
||||
@@ -14,7 +14,7 @@
|
||||
</constraints>
|
||||
<properties>
|
||||
<selected value="false"/>
|
||||
<text resource-bundle="org/jetbrains/kotlin/idea/KotlinBundle" key="debugger.filter.ignore.internal.classes"/>
|
||||
<text resource-bundle="org/jetbrains/kotlin/idea/debugger/KotlinDebuggerCoreBundle" key="filter.ignore.internal.classes"/>
|
||||
</properties>
|
||||
</component>
|
||||
<vspacer id="c37da">
|
||||
|
||||
Reference in New Issue
Block a user