File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
core/src/main/kotlin/cc/unitmesh/devti/bridge/utils Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ package cc.unitmesh.devti.bridge.utils
22
33import com.intellij.ide.structureView.StructureView
44import com.intellij.ide.structureView.StructureViewTreeElement
5+ import com.intellij.ide.structureView.impl.common.PsiTreeElementBase
56import com.intellij.lang.LanguageStructureViewBuilder
7+ import com.intellij.lang.html.structureView.HtmlTagTreeElement
68import com.intellij.openapi.application.ModalityState
79import com.intellij.openapi.application.invokeLater
810import com.intellij.openapi.application.runInEdt
@@ -79,7 +81,17 @@ object StructureCommandUtil {
7981 */
8082 private fun traverseStructure (element : StructureViewTreeElement , depth : Int , sb : StringBuilder ): StringBuilder {
8183 val indent = formatBeforeCode(element, depth)
82- var str = element.presentation.presentableText
84+ val str = when (element) {
85+ is HtmlTagTreeElement -> {
86+ element.presentableText
87+ }
88+ is PsiTreeElementBase <* > -> {
89+ element.presentableText
90+ }
91+ else -> {
92+ element.presentation.presentableText
93+ }
94+ }
8395
8496 if (! str.isNullOrBlank()) {
8597 sb.append(indent).append(str).append(" \n " )
You can’t perform that action at this time.
0 commit comments