mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
IJPL-164471 Can't open LaF Defaults dialog in IJP 243 EAP 5
(cherry picked from commit 3f92d1875f91aca4ba69611f1f153501ddd50e27) IJ-CR-150990 GitOrigin-RevId: 6c5e17d84385ea7078fb9a7e472a20d9c3cc4df8
This commit is contained in:
committed by
intellij-monorepo-bot
parent
8d58b4bc58
commit
5146890bd1
@@ -8,6 +8,7 @@ import com.intellij.ide.util.PropertiesComponent
|
||||
import com.intellij.openapi.actionSystem.ActionToolbarPosition
|
||||
import com.intellij.openapi.application.ApplicationManager
|
||||
import com.intellij.openapi.diagnostic.thisLogger
|
||||
import com.intellij.openapi.util.Condition
|
||||
import com.intellij.openapi.util.Pair
|
||||
import com.intellij.openapi.util.text.StringUtil
|
||||
import com.intellij.psi.codeStyle.NameUtil
|
||||
@@ -97,16 +98,18 @@ internal class ShowUIDefaultsContent(@JvmField val table: JBTable) {
|
||||
return
|
||||
}
|
||||
val matcher = NameUtil.buildMatcher("*" + searchField.getText(), NameUtil.MatchingCaseSensitivity.NONE)
|
||||
model.setFilter { pair ->
|
||||
val obj = (pair as Pair<*, *>).second
|
||||
var value = when (obj) {
|
||||
null -> "null"
|
||||
is Color -> ColorUtil.toHtmlColor(obj)
|
||||
else -> obj.toString()
|
||||
model.setFilter(object : Condition<Any> {
|
||||
override fun value(pair: Any?): Boolean {
|
||||
val obj = (pair as Pair<*, *>).second
|
||||
var value = when (obj) {
|
||||
null -> "null"
|
||||
is Color -> ColorUtil.toHtmlColor(obj)
|
||||
else -> obj.toString()
|
||||
}
|
||||
value = pair.first.toString() + " " + value
|
||||
return (!colorsOnly.isSelected || obj is Color) && matcher.matches(value)
|
||||
}
|
||||
value = pair.first.toString() + " " + value
|
||||
(!colorsOnly.isSelected || obj is Color) && matcher.matches(value)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
private fun restoreLastSelected() {
|
||||
|
||||
Reference in New Issue
Block a user