diff --git a/idea/idea-analysis/resources/org/jetbrains/kotlin/idea/KotlinBundle.properties b/idea/idea-analysis/resources/org/jetbrains/kotlin/idea/KotlinBundle.properties index 995642ee652..f9ccad0b6a6 100644 --- a/idea/idea-analysis/resources/org/jetbrains/kotlin/idea/KotlinBundle.properties +++ b/idea/idea-analysis/resources/org/jetbrains/kotlin/idea/KotlinBundle.properties @@ -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 diff --git a/idea/jvm-debugger/jvm-debugger-core/resources/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerCoreBundle.properties b/idea/jvm-debugger/jvm-debugger-core/resources/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerCoreBundle.properties new file mode 100644 index 00000000000..3756e141f7d --- /dev/null +++ b/idea/jvm-debugger/jvm-debugger-core/resources/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerCoreBundle.properties @@ -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 \ No newline at end of file diff --git a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/InlineCallableUsagesSearcher.kt b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/InlineCallableUsagesSearcher.kt index 186d7ebaf60..adeed70c71f 100644 --- a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/InlineCallableUsagesSearcher.kt +++ b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/InlineCallableUsagesSearcher.kt @@ -41,7 +41,7 @@ class InlineCallableUsagesSearcher(private val myDebugProcess: DebugProcess) { return ComputedClassNames.EMPTY } else { val searchResult = hashSetOf() - val declarationName = runReadAction { declaration.name } + val declarationName = runReadAction { declaration.name ?: "" } 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) } diff --git a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/KotlinAlternativeSourceNotificationProvider.kt b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/KotlinAlternativeSourceNotificationProvider.kt index 16cdcd90574..b8a912fb55a 100644 --- a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/KotlinAlternativeSourceNotificationProvider.kt +++ b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/KotlinAlternativeSourceNotificationProvider.kt @@ -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) diff --git a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerCoreBundle.kt b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerCoreBundle.kt new file mode 100644 index 00000000000..615fa32e1c4 --- /dev/null +++ b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerCoreBundle.kt @@ -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) + } +} \ No newline at end of file diff --git a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/KotlinDelegatedPropertyRendererConfigurableUi.form b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/KotlinDelegatedPropertyRendererConfigurableUi.form index fcaa7ec16f4..294a95caa8d 100644 --- a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/KotlinDelegatedPropertyRendererConfigurableUi.form +++ b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/KotlinDelegatedPropertyRendererConfigurableUi.form @@ -3,7 +3,7 @@ - + @@ -14,7 +14,7 @@ - + diff --git a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinFieldBreakpointPropertiesPanel.kt b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinFieldBreakpointPropertiesPanel.kt index 8c3d4e7d261..c1189a36329 100644 --- a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinFieldBreakpointPropertiesPanel.kt +++ b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinFieldBreakpointPropertiesPanel.kt @@ -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, - XLineBreakpointType("kotlin-field", KotlinBundle.message("debugger.field.watchpoints.tab.title")), + XLineBreakpointType( + "kotlin-field", KotlinDebuggerCoreBundle.message("field.watchpoint.tab.title") + ), KotlinBreakpointType { override fun createJavaBreakpoint( project: Project, diff --git a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinFunctionBreakpoint.java b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinFunctionBreakpoint.java index 7cc3d213dad..448bb36602f 100644 --- a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinFunctionBreakpoint.java +++ b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinFunctionBreakpoint.java @@ -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 { 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); }); diff --git a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinFunctionBreakpointType.java b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinFunctionBreakpointType.java index bc11c59caba..6676b88a893 100644 --- a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinFunctionBreakpointType.java +++ b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinFunctionBreakpointType.java @@ -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 diff --git a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinLineBreakpointType.java b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinLineBreakpointType.java index 140803cab1f..e040c094c0f 100644 --- a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinLineBreakpointType.java +++ b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/breakpoints/KotlinLineBreakpointType.java @@ -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); } } } diff --git a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingConfigurableUi.form b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingConfigurableUi.form index ddc070585a5..ce2192e3c4b 100644 --- a/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingConfigurableUi.form +++ b/idea/jvm-debugger/jvm-debugger-core/src/org/jetbrains/kotlin/idea/debugger/stepping/KotlinSteppingConfigurableUi.form @@ -3,7 +3,7 @@ - + @@ -14,7 +14,7 @@ - +