mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
[IFT] IJPL-221468 Refactor: use other toString implementation for SeResultListItemRow
Also, had to make `SeTargetItemPresentationImpl` to make it implement `toString`. Refactored logic in IFT to make it work with both new SE and the old one. (cherry picked from commit 064677d3c08f74c3966aa66b5f0cee5b68459a42) IJ-CR-193450 GitOrigin-RevId: 234d30730e2ac11db06aca54abfd7fa836be1e10
This commit is contained in:
committed by
intellij-monorepo-bot
parent
861406cf58
commit
40abaa7658
@@ -327,7 +327,7 @@ abstract class CommonLogicForOnboardingTours(id: String, @Nls lessonName: String
|
||||
}
|
||||
text(JavaLessonsBundle.message("java.onboarding.search.everywhere.description",
|
||||
code("AVERAGE"), code(JavaLessonsBundle.message("toggle.case.part"))))
|
||||
val actionText = ActionManager.getInstance().getAction("EditorToggleCase").toString()
|
||||
val actionText = ActionsBundle.actionText("EditorToggleCase")
|
||||
triggerAndBorderHighlight().listItem { item ->
|
||||
item.isToStringContains(actionText)
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ sealed interface SeResultListRow
|
||||
@Internal
|
||||
class SeResultListItemRow(val item: SeItemData) : SeResultListRow {
|
||||
override fun toString(): String {
|
||||
return item.fetchItemIfExists()?.rawObject?.toString() ?: "SeResultListItemRow(item=$item)"
|
||||
return "SeResultListItemRow(presentation=${item.presentation})"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -173,7 +173,7 @@ class SeTargetItemPresentationBuilder {
|
||||
|
||||
@Serializable
|
||||
@ApiStatus.Internal
|
||||
class SeTargetItemPresentationImpl internal constructor(
|
||||
data class SeTargetItemPresentationImpl(
|
||||
private val backgroundColorId: ColorId? = null,
|
||||
private val iconId: IconId? = null,
|
||||
val iconOriginalWidth: Int? = null,
|
||||
|
||||
@@ -4,7 +4,6 @@ package training.learn.lesson.general
|
||||
import com.intellij.ide.IdeBundle
|
||||
import com.intellij.ide.actions.searcheverywhere.SearchEverywhereUI
|
||||
import com.intellij.idea.ActionsBundle
|
||||
import com.intellij.openapi.actionSystem.ActionManager
|
||||
import com.intellij.openapi.application.ApplicationNamesInfo
|
||||
import com.intellij.openapi.client.ClientSystemInfo
|
||||
import com.intellij.openapi.editor.impl.EditorComponentImpl
|
||||
@@ -81,10 +80,13 @@ class GotoActionLesson(private val sample: LessonSample,
|
||||
task {
|
||||
val prefix = LearnBundle.message("show.line.number.prefix.to.show.first")
|
||||
text(LessonsBundle.message("goto.action.show.line.numbers.request", strong(prefix), strong(showLineNumbersName)))
|
||||
val actionText = ActionManager.getInstance().getAction("EditorGutterToggleGlobalLineNumbers").toString()
|
||||
|
||||
val localActionDescription = ActionsBundle.actionDescription("EditorToggleShowLineNumbers")
|
||||
val globalActionText = ActionsBundle.actionText("EditorGutterToggleGlobalLineNumbers")
|
||||
triggerAndBorderHighlight().listItem { item ->
|
||||
item.isToStringContains(actionText)
|
||||
item.isToStringContains(globalActionText) && !item.isToStringContains(localActionDescription)
|
||||
}
|
||||
|
||||
restoreState { !checkInsideSearchEverywhere() }
|
||||
test {
|
||||
waitComponent(SearchEverywhereUI::class.java)
|
||||
|
||||
@@ -546,7 +546,7 @@ class PythonOnboardingTourLesson :
|
||||
}
|
||||
text(PythonLessonsBundle.message("python.onboarding.search.everywhere.description",
|
||||
code("AVERAGE"), code(PythonLessonsBundle.message("toggle.case.part"))))
|
||||
val actionText = ActionManager.getInstance().getAction("EditorToggleCase").toString()
|
||||
val actionText = ActionsBundle.actionText("EditorToggleCase")
|
||||
triggerAndBorderHighlight().listItem { item ->
|
||||
item.isToStringContains(actionText)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user