Minor fixes after inspecting code-style

This commit is contained in:
Vitaliy.Bibaev
2018-06-09 12:42:24 +03:00
committed by Yan Zhulanow
parent 2d22267cf1
commit c1ebc2788d
8 changed files with 19 additions and 20 deletions
@@ -5,5 +5,5 @@ package org.jetbrains.kotlin.idea.debugger.sequence.lib
* @author Vitaliy.Bibaev
*/
object LibraryUtil {
val KOTLIN_LANGUAGE_ID = "kotlin"
const val KOTLIN_LANGUAGE_ID = "kotlin"
}
@@ -63,7 +63,7 @@ class KotlinSequencesSupport : LibrarySupportBase() {
private fun sortedOperations(vararg names: String): Array<IntermediateOperation> =
names.map { SortedOperation(it) }.toTypedArray()
private class FilterIsInstanceOperationHandler() : IntermediateOperationBase(
private class FilterIsInstanceOperationHandler : IntermediateOperationBase(
"filterIsInstance", ::FilterIsInstanceHandler,
SimplePeekCallTraceInterpreter(), FilteredMapResolver()
)
@@ -29,11 +29,10 @@ class KotlinChainTransformerImpl(private val typeExtractor: CallTypeExtractor) :
val intermediateCalls = mutableListOf<IntermediateStreamCall>()
for (call in callChain.subList(0, callChain.size - 1)) {
val (typeBefore, typeAfter) = typeExtractor.extractIntermediateCallTypes(call)
intermediateCalls += IntermediateStreamCallImpl(call.callName(),
call.valueArguments.map { createCallArgument(call, it) },
typeBefore,
typeAfter,
call.textRange
intermediateCalls += IntermediateStreamCallImpl(
call.callName(), call.valueArguments.map { createCallArgument(call, it) },
typeBefore, typeAfter,
call.textRange
)
}
@@ -46,7 +46,7 @@ open class TerminatedChainBuilder(
val parentCall = expression.previousCall()
if (parentCall is KtCallExpression && callChecker.isStreamCall(parentCall)) {
myPreviousCalls.put(expression, parentCall)
myPreviousCalls[expression] = parentCall
updateCallTree(parentCall)
}
}
@@ -64,7 +64,7 @@ open class TerminatedChainBuilder(
current = myPreviousCalls[current]
}
Collections.reverse(chain)
chain.reverse()
chains.add(chain)
}
@@ -17,10 +17,10 @@ import org.jetbrains.kotlin.idea.debugger.sequence.trace.impl.handler.withArgs
*/
class FilterCallHandler : BothSemanticsHandler {
private companion object {
val VALUES_ARRAY_NAME = "objectsInPredicate"
val PREDICATE_RESULT_ARRAY_NAME = "filteringResults"
const val VALUES_ARRAY_NAME = "objectsInPredicate"
const val PREDICATE_RESULT_ARRAY_NAME = "filteringResults"
fun oldPredicateVariableName(order: Int): String = "filterPredicate" + order
fun oldPredicateVariableName(order: Int): String = "filterPredicate$order"
}
override fun variablesDeclaration(call: StreamCall, order: Int, dsl: Dsl): List<VariableDeclaration> {
@@ -18,8 +18,8 @@ import org.jetbrains.kotlin.idea.debugger.sequence.trace.dsl.KotlinTypes
*/
class KotlinDistinctByHandler(callNumber: Int, private val call: IntermediateStreamCall, dsl: Dsl) : HandlerBase.Intermediate(dsl) {
private companion object {
val KEY_EXTRACTOR_VARIABLE_PREFIX = "keyExtractor"
val TRANSITIONS_ARRAY_NAME = "transitionsArray"
const val KEY_EXTRACTOR_VARIABLE_PREFIX = "keyExtractor"
const val TRANSITIONS_ARRAY_NAME = "transitionsArray"
}
private val peekHandler = PeekTraceHandler(callNumber, "distinctBy", call.typeBefore, call.typeAfter, dsl)