mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
split top level var name (WEB-14233)
This commit is contained in:
@@ -380,15 +380,22 @@ class VariableView(override val variableName: String, private val variable: Vari
|
||||
return null
|
||||
}
|
||||
|
||||
val list = SmartList(variable.name)
|
||||
val list = SmartList<String>()
|
||||
addVarName(list, parent, variable.name)
|
||||
|
||||
var parent: VariableContext? = context
|
||||
while (parent != null && parent.variableName != null) {
|
||||
list.add(parent.variableName!!)
|
||||
addVarName(list, parent.parent, parent.variableName!!)
|
||||
parent = parent.parent
|
||||
}
|
||||
return context.viewSupport.propertyNamesToString(list, false)
|
||||
}
|
||||
|
||||
private fun addVarName(list: SmartList<String>, parent: VariableContext?, name: String) {
|
||||
if (parent == null || parent.variableName != null) list.add(name)
|
||||
else list.addAll(name.split(".").reversed())
|
||||
}
|
||||
|
||||
private class MyFullValueEvaluator(private val value: Value) : XFullValueEvaluator(if (value is StringValue) value.length else value.valueString!!.length) {
|
||||
override fun startEvaluation(callback: XFullValueEvaluator.XFullValueEvaluationCallback) {
|
||||
if (value !is StringValue || !value.isTruncated) {
|
||||
|
||||
Reference in New Issue
Block a user