i18n: update bundle for jvm-debugger
This commit is contained in:
+3
@@ -19,3 +19,6 @@ field.watchpoint.tab.title=Kotlin Field Watchpoints
|
|||||||
field.watchpoint.properties.access=Field &access
|
field.watchpoint.properties.access=Field &access
|
||||||
field.watchpoint.properties.modification=Field &modification
|
field.watchpoint.properties.modification=Field &modification
|
||||||
field.watchpoint.properties.initialization=Field &initialization
|
field.watchpoint.properties.initialization=Field &initialization
|
||||||
|
couldn.t.find.0.class=Couldn''t find ''{0}'' class
|
||||||
|
process.resumed=Process resumed
|
||||||
|
stepping.over.inline=Stepping over inline
|
||||||
+1
-1
@@ -76,7 +76,7 @@ class KotlinFieldBreakpointType :
|
|||||||
|
|
||||||
val psiClass = JavaPsiFacade.getInstance(project).findClass(className, GlobalSearchScope.allScope(project))
|
val psiClass = JavaPsiFacade.getInstance(project).findClass(className, GlobalSearchScope.allScope(project))
|
||||||
if (psiClass !is KtLightClass) {
|
if (psiClass !is KtLightClass) {
|
||||||
reportError(project, "Couldn't find '$className' class")
|
reportError(project, KotlinDebuggerCoreBundle.message("couldn.t.find.0.class", className))
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -28,6 +28,7 @@ import com.intellij.openapi.project.Project
|
|||||||
import com.intellij.util.EventDispatcher
|
import com.intellij.util.EventDispatcher
|
||||||
import com.sun.jdi.request.EventRequest
|
import com.sun.jdi.request.EventRequest
|
||||||
import com.sun.jdi.request.StepRequest
|
import com.sun.jdi.request.StepRequest
|
||||||
|
import org.jetbrains.kotlin.idea.debugger.KotlinDebuggerCoreBundle
|
||||||
import java.lang.reflect.Field
|
import java.lang.reflect.Field
|
||||||
|
|
||||||
// Mass-copy-paste code for commands behaviour from com.intellij.debugger.engine.DebugProcessImpl
|
// Mass-copy-paste code for commands behaviour from com.intellij.debugger.engine.DebugProcessImpl
|
||||||
@@ -126,7 +127,7 @@ class KotlinStepActionFactory(private val debuggerProcess: DebugProcessImpl) {
|
|||||||
|
|
||||||
// See: StepIntoCommand.contextAction()
|
// See: StepIntoCommand.contextAction()
|
||||||
override fun contextAction(suspendContext: SuspendContextImpl) {
|
override fun contextAction(suspendContext: SuspendContextImpl) {
|
||||||
showStatusText("Stepping over inline")
|
showStatusText(KotlinDebuggerCoreBundle.message("stepping.over.inline"))
|
||||||
val stepThread = getContextThread(suspendContext)
|
val stepThread = getContextThread(suspendContext)
|
||||||
|
|
||||||
if (stepThread == null) {
|
if (stepThread == null) {
|
||||||
@@ -148,7 +149,7 @@ class KotlinStepActionFactory(private val debuggerProcess: DebugProcessImpl) {
|
|||||||
|
|
||||||
doStep(suspendContext, stepThread, myStepSize, StepRequest.STEP_OVER, hint)
|
doStep(suspendContext, stepThread, myStepSize, StepRequest.STEP_OVER, hint)
|
||||||
|
|
||||||
showStatusText("Process resumed")
|
showStatusText(KotlinDebuggerCoreBundle.message("process.resumed"))
|
||||||
resumeAction(suspendContext, stepThread)
|
resumeAction(suspendContext, stepThread)
|
||||||
debugProcessDispatcher.multicaster.resumed(suspendContext)
|
debugProcessDispatcher.multicaster.resumed(suspendContext)
|
||||||
}
|
}
|
||||||
|
|||||||
+3
@@ -21,3 +21,6 @@ error.cant.find.backing.field=Cannot find the backing field ''{0}''
|
|||||||
error.parameter.evaluation.default.methods=Parameter evaluation is not supported for '$default' methods
|
error.parameter.evaluation.default.methods=Parameter evaluation is not supported for '$default' methods
|
||||||
error.cant.find.variable=Cannot find local variable ''{0}'' with type {1}
|
error.cant.find.variable=Cannot find local variable ''{0}'' with type {1}
|
||||||
error.cant.find.class=Cannot find class ''{0}'' in the current ClassLoader
|
error.cant.find.class=Cannot find class ''{0}'' in the current ClassLoader
|
||||||
|
java.field=Java field
|
||||||
|
backing.field=Backing field
|
||||||
|
wrap.with.tostring=Wrap with 'toString()'
|
||||||
+18
-4
@@ -24,12 +24,12 @@ import org.jetbrains.kotlin.load.java.lazy.types.toAttributes
|
|||||||
import org.jetbrains.kotlin.load.java.structure.classId
|
import org.jetbrains.kotlin.load.java.structure.classId
|
||||||
import org.jetbrains.kotlin.load.kotlin.internalName
|
import org.jetbrains.kotlin.load.kotlin.internalName
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
|
import org.jetbrains.kotlin.platform.isCommon
|
||||||
|
import org.jetbrains.kotlin.platform.jvm.isJvm
|
||||||
import org.jetbrains.kotlin.psi.KtCodeFragment
|
import org.jetbrains.kotlin.psi.KtCodeFragment
|
||||||
import org.jetbrains.kotlin.psi.KtFile
|
import org.jetbrains.kotlin.psi.KtFile
|
||||||
import org.jetbrains.kotlin.resolve.DescriptorFactory
|
import org.jetbrains.kotlin.resolve.DescriptorFactory
|
||||||
import org.jetbrains.kotlin.resolve.descriptorUtil.getSuperClassNotAny
|
import org.jetbrains.kotlin.resolve.descriptorUtil.getSuperClassNotAny
|
||||||
import org.jetbrains.kotlin.platform.isCommon
|
|
||||||
import org.jetbrains.kotlin.platform.jvm.isJvm
|
|
||||||
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
|
import org.jetbrains.kotlin.resolve.scopes.DescriptorKindFilter
|
||||||
import org.jetbrains.kotlin.resolve.scopes.SyntheticScope
|
import org.jetbrains.kotlin.resolve.scopes.SyntheticScope
|
||||||
import org.jetbrains.kotlin.resolve.scopes.getDescriptorsFiltered
|
import org.jetbrains.kotlin.resolve.scopes.getDescriptorsFiltered
|
||||||
@@ -125,7 +125,14 @@ class DebuggerFieldSyntheticScope(val javaSyntheticPropertiesScope: JavaSyntheti
|
|||||||
val sourceElement = propertyDescriptor.source
|
val sourceElement = propertyDescriptor.source
|
||||||
|
|
||||||
val isVar = propertyDescriptor.isVar
|
val isVar = propertyDescriptor.isVar
|
||||||
consumer[name] = createSyntheticPropertyDescriptor(clazz, type, name, isVar, "Backing field", sourceElement) { state ->
|
consumer[name] = createSyntheticPropertyDescriptor(
|
||||||
|
clazz,
|
||||||
|
type,
|
||||||
|
name,
|
||||||
|
isVar,
|
||||||
|
KotlinDebuggerEvaluationBundle.message("backing.field"),
|
||||||
|
sourceElement
|
||||||
|
) { state ->
|
||||||
state.typeMapper.mapType(clazz.defaultType)
|
state.typeMapper.mapType(clazz.defaultType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -149,7 +156,14 @@ class DebuggerFieldSyntheticScope(val javaSyntheticPropertiesScope: JavaSyntheti
|
|||||||
val sourceElement = javaSourceElementFactory.source(field)
|
val sourceElement = javaSourceElementFactory.source(field)
|
||||||
|
|
||||||
val isVar = !field.isFinal
|
val isVar = !field.isFinal
|
||||||
consumer[fieldName] = createSyntheticPropertyDescriptor(clazz, type, fieldName, isVar, "Java field", sourceElement) {
|
consumer[fieldName] = createSyntheticPropertyDescriptor(
|
||||||
|
clazz,
|
||||||
|
type,
|
||||||
|
fieldName,
|
||||||
|
isVar,
|
||||||
|
KotlinDebuggerEvaluationBundle.message("java.field"),
|
||||||
|
sourceElement
|
||||||
|
) {
|
||||||
Type.getObjectType(ownerClassName)
|
Type.getObjectType(ownerClassName)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -260,7 +260,7 @@ class KotlinEvaluator(val codeFragment: KtCodeFragment, private val sourcePositi
|
|||||||
KtPsiFactory(expression.project).createExpression("($expressionText).toString()")
|
KtPsiFactory(expression.project).createExpression("($expressionText).toString()")
|
||||||
}
|
}
|
||||||
runInEdtAndWait {
|
runInEdtAndWait {
|
||||||
expression.project.executeWriteCommand("Wrap with 'toString()'") {
|
expression.project.executeWriteCommand(KotlinDebuggerEvaluationBundle.message("wrap.with.tostring")) {
|
||||||
expression.replace(newExpression)
|
expression.replace(newExpression)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-4
@@ -11,6 +11,7 @@ import com.intellij.debugger.streams.resolve.AppendResolver
|
|||||||
import com.intellij.debugger.streams.resolve.PairMapResolver
|
import com.intellij.debugger.streams.resolve.PairMapResolver
|
||||||
import com.intellij.debugger.streams.trace.impl.handler.unified.DistinctTraceHandler
|
import com.intellij.debugger.streams.trace.impl.handler.unified.DistinctTraceHandler
|
||||||
import com.intellij.debugger.streams.trace.impl.interpret.SimplePeekCallTraceInterpreter
|
import com.intellij.debugger.streams.trace.impl.interpret.SimplePeekCallTraceInterpreter
|
||||||
|
import org.jetbrains.annotations.NonNls
|
||||||
import org.jetbrains.kotlin.idea.debugger.sequence.resolve.ChunkedResolver
|
import org.jetbrains.kotlin.idea.debugger.sequence.resolve.ChunkedResolver
|
||||||
import org.jetbrains.kotlin.idea.debugger.sequence.resolve.FilteredMapResolver
|
import org.jetbrains.kotlin.idea.debugger.sequence.resolve.FilteredMapResolver
|
||||||
import org.jetbrains.kotlin.idea.debugger.sequence.resolve.WindowedResolver
|
import org.jetbrains.kotlin.idea.debugger.sequence.resolve.WindowedResolver
|
||||||
@@ -52,16 +53,16 @@ class KotlinSequencesSupport : LibrarySupportBase() {
|
|||||||
addIntermediateOperationsSupport(OrderBasedOperation("windowed", WindowedResolver()))
|
addIntermediateOperationsSupport(OrderBasedOperation("windowed", WindowedResolver()))
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun filterOperations(vararg names: String): Array<IntermediateOperation> =
|
private fun filterOperations(@NonNls vararg names: String): Array<IntermediateOperation> =
|
||||||
names.map { FilterOperation(it) }.toTypedArray()
|
names.map { FilterOperation(it) }.toTypedArray()
|
||||||
|
|
||||||
private fun mapOperations(vararg names: String): Array<IntermediateOperation> =
|
private fun mapOperations(@NonNls vararg names: String): Array<IntermediateOperation> =
|
||||||
names.map { MappingOperation(it) }.toTypedArray()
|
names.map { MappingOperation(it) }.toTypedArray()
|
||||||
|
|
||||||
private fun flatMapOperations(vararg names: String): Array<IntermediateOperation> =
|
private fun flatMapOperations(@NonNls vararg names: String): Array<IntermediateOperation> =
|
||||||
names.map { FlatMappingOperation(it) }.toTypedArray()
|
names.map { FlatMappingOperation(it) }.toTypedArray()
|
||||||
|
|
||||||
private fun sortedOperations(vararg names: String): Array<IntermediateOperation> =
|
private fun sortedOperations(@NonNls vararg names: String): Array<IntermediateOperation> =
|
||||||
names.map { SortedOperation(it) }.toTypedArray()
|
names.map { SortedOperation(it) }.toTypedArray()
|
||||||
|
|
||||||
private class FilterIsInstanceOperationHandler : IntermediateOperationBase(
|
private class FilterIsInstanceOperationHandler : IntermediateOperationBase(
|
||||||
|
|||||||
+2
@@ -5,11 +5,13 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.sequence.psi.java
|
package org.jetbrains.kotlin.idea.debugger.sequence.psi.java
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NonNls
|
||||||
import org.jetbrains.kotlin.idea.debugger.sequence.psi.CallCheckerWithNameHeuristics
|
import org.jetbrains.kotlin.idea.debugger.sequence.psi.CallCheckerWithNameHeuristics
|
||||||
import org.jetbrains.kotlin.idea.debugger.sequence.psi.StreamCallChecker
|
import org.jetbrains.kotlin.idea.debugger.sequence.psi.StreamCallChecker
|
||||||
|
|
||||||
class StandardLibraryCallChecker(nestedChecker: StreamCallChecker) : CallCheckerWithNameHeuristics(nestedChecker) {
|
class StandardLibraryCallChecker(nestedChecker: StreamCallChecker) : CallCheckerWithNameHeuristics(nestedChecker) {
|
||||||
private companion object {
|
private companion object {
|
||||||
|
@NonNls
|
||||||
val TERMINATION_CALLS: Set<String> = setOf(
|
val TERMINATION_CALLS: Set<String> = setOf(
|
||||||
"forEach", "toArray", "reduce", "collect", "min", "max", "count", "sum", "anyMatch", "allMatch", "noneMatch", "findFirst",
|
"forEach", "toArray", "reduce", "collect", "min", "max", "count", "sum", "anyMatch", "allMatch", "noneMatch", "findFirst",
|
||||||
"findAny", "forEachOrdered", "average", "summaryStatistics"
|
"findAny", "forEachOrdered", "average", "summaryStatistics"
|
||||||
|
|||||||
+2
@@ -5,11 +5,13 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.sequence.psi.java
|
package org.jetbrains.kotlin.idea.debugger.sequence.psi.java
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NonNls
|
||||||
import org.jetbrains.kotlin.idea.debugger.sequence.psi.CallCheckerWithNameHeuristics
|
import org.jetbrains.kotlin.idea.debugger.sequence.psi.CallCheckerWithNameHeuristics
|
||||||
import org.jetbrains.kotlin.idea.debugger.sequence.psi.StreamCallChecker
|
import org.jetbrains.kotlin.idea.debugger.sequence.psi.StreamCallChecker
|
||||||
|
|
||||||
class StreamExCallChecker(nestedChecker: StreamCallChecker) : CallCheckerWithNameHeuristics(nestedChecker) {
|
class StreamExCallChecker(nestedChecker: StreamCallChecker) : CallCheckerWithNameHeuristics(nestedChecker) {
|
||||||
private companion object {
|
private companion object {
|
||||||
|
@NonNls
|
||||||
val TERMINATION_CALLS: Set<String> = setOf(
|
val TERMINATION_CALLS: Set<String> = setOf(
|
||||||
"forEach", "toArray", "reduce", "collect", "min", "max", "count", "sum", "anyMatch", "allMatch", "noneMatch", "findFirst",
|
"forEach", "toArray", "reduce", "collect", "min", "max", "count", "sum", "anyMatch", "allMatch", "noneMatch", "findFirst",
|
||||||
"findAny", "forEachOrdered", "average", "summaryStatistics", "toList", "toSet", "toCollection", "toListAndThen", "toSetAndThen",
|
"findAny", "forEachOrdered", "average", "summaryStatistics", "toList", "toSet", "toCollection", "toListAndThen", "toSetAndThen",
|
||||||
|
|||||||
+2
-1
@@ -5,12 +5,13 @@
|
|||||||
|
|
||||||
package org.jetbrains.kotlin.idea.debugger.sequence.psi.sequence
|
package org.jetbrains.kotlin.idea.debugger.sequence.psi.sequence
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NonNls
|
||||||
import org.jetbrains.kotlin.idea.debugger.sequence.psi.CallCheckerWithNameHeuristics
|
import org.jetbrains.kotlin.idea.debugger.sequence.psi.CallCheckerWithNameHeuristics
|
||||||
import org.jetbrains.kotlin.idea.debugger.sequence.psi.StreamCallChecker
|
import org.jetbrains.kotlin.idea.debugger.sequence.psi.StreamCallChecker
|
||||||
|
|
||||||
class SequenceCallCheckerWithNameHeuristics(nestedChecker: StreamCallChecker) : CallCheckerWithNameHeuristics(nestedChecker) {
|
class SequenceCallCheckerWithNameHeuristics(nestedChecker: StreamCallChecker) : CallCheckerWithNameHeuristics(nestedChecker) {
|
||||||
private companion object {
|
private companion object {
|
||||||
|
@NonNls
|
||||||
val TERMINATION_CALLS: Set<String> = setOf(
|
val TERMINATION_CALLS: Set<String> = setOf(
|
||||||
"all", "any", "associate", "associateBy", "associateByTo", "associateTo", "average", "chunked", "contains", "count", "distinct",
|
"all", "any", "associate", "associateBy", "associateByTo", "associateTo", "average", "chunked", "contains", "count", "distinct",
|
||||||
"distinctBy", "elementAt", "elementAtOrElse", "elementAtOrNull", "find", "findLast", "first", "firstOrNull", "fold",
|
"distinctBy", "elementAt", "elementAtOrElse", "elementAtOrNull", "find", "findLast", "first", "firstOrNull", "fold",
|
||||||
|
|||||||
+3
@@ -11,6 +11,7 @@ import com.intellij.debugger.streams.trace.dsl.impl.TextExpression
|
|||||||
import com.intellij.debugger.streams.trace.dsl.impl.VariableImpl
|
import com.intellij.debugger.streams.trace.dsl.impl.VariableImpl
|
||||||
import com.intellij.debugger.streams.trace.impl.handler.type.GenericType
|
import com.intellij.debugger.streams.trace.impl.handler.type.GenericType
|
||||||
import com.intellij.debugger.streams.wrapper.IntermediateStreamCall
|
import com.intellij.debugger.streams.wrapper.IntermediateStreamCall
|
||||||
|
import org.jetbrains.annotations.NonNls
|
||||||
|
|
||||||
class KotlinStatementFactory(private val peekCallFactory: PeekCallFactory) : StatementFactory {
|
class KotlinStatementFactory(private val peekCallFactory: PeekCallFactory) : StatementFactory {
|
||||||
override fun createNewListExpression(elementType: GenericType, vararg args: Expression): Expression =
|
override fun createNewListExpression(elementType: GenericType, vararg args: Expression): Expression =
|
||||||
@@ -87,6 +88,8 @@ class KotlinStatementFactory(private val peekCallFactory: PeekCallFactory) : Sta
|
|||||||
|
|
||||||
override fun createNewArrayExpression(elementType: GenericType, vararg args: Expression): Expression {
|
override fun createNewArrayExpression(elementType: GenericType, vararg args: Expression): Expression {
|
||||||
val arguments = args.joinToString { it.toCode() }
|
val arguments = args.joinToString { it.toCode() }
|
||||||
|
|
||||||
|
@NonNls
|
||||||
val text = when (elementType) {
|
val text = when (elementType) {
|
||||||
types.BOOLEAN -> "kotlin.booleanArrayOf($arguments)"
|
types.BOOLEAN -> "kotlin.booleanArrayOf($arguments)"
|
||||||
KotlinSequenceTypes.BYTE -> "kotlin.byteArrayOf($arguments)"
|
KotlinSequenceTypes.BYTE -> "kotlin.byteArrayOf($arguments)"
|
||||||
|
|||||||
Reference in New Issue
Block a user