[performance-tests][kotlin-plugin] fix find usage java command

GitOrigin-RevId: 09515ee720c13806e21235e58fd90c14f40f49de
This commit is contained in:
roman.ivanitskii
2023-05-12 18:40:08 +03:00
committed by intellij-monorepo-bot
parent e44c3c21ef
commit 9a01a8612f

View File

@@ -41,7 +41,7 @@ class FindUsagesJavaCommand(text: String, line: Int) : AbstractCommand(text, lin
override fun _execute(context: PlaybackContext): Promise<Any?> {
val actionCallback = ActionCallbackProfilerStopper()
val arguments = text.split(" ".toRegex()).toTypedArray()
val position = if (arguments.size == 2) arguments[1] else null
val position = if (arguments.size == 3) arguments[1] else null
val elementName = if (arguments.size == 3) arguments[2] else arguments[1]
if (position != null) {
val result = GoToNamedElementCommand(GoToNamedElementCommand.PREFIX + " $position $elementName", -1).execute(context)