package org.rust.lang.structure

import com.intellij.ide.structureView.StructureViewTreeElement
import com.intellij.ide.structureView.impl.common.PsiTreeElementBase
import com.intellij.psi.NavigatablePsiElement
import org.rust.lang.core.psi.RustStructDeclField

class RustStructDeclFieldTreeElement(element: RustStructDeclField) : PsiTreeElementBase<RustStructDeclField>(element) {

    override fun getPresentableText(): String? {
        return element?.identifier?.text
    }

    override fun getChildrenBase(): Collection<StructureViewTreeElement> {
        return arrayListOf<StructureViewTreeElement>()
    }
}

package org.rust.lang.structure

import com.intellij.ide.structureView.StructureViewTreeElement
import com.intellij.ide.structureView.impl.common.PsiTreeElementBase
import com.intellij.psi.NavigatablePsiElement
import org.rust.lang.core.psi.RustStructDeclField

class RustStructDeclFieldTreeElement(element: RustStructDeclField) : PsiTreeElementBase<RustStructDeclField>(element) {

    override fun getPresentableText(): String? {
        return "${element?.identifier?.text}: ${element?.typeSum?.text}"
    }

    override fun getChildrenBase(): Collection<StructureViewTreeElement> {
        return arrayListOf<StructureViewTreeElement>()
    }
}

Structure View: Include type info for struct fields
Structure View: Include type info for struct fields

anton-okolelov/intellij-rust,alygin/intellij-rust,Undin/intellij-rust,intellij-rust/intellij-rust,himikof/intellij-rust,Undin/intellij-rust,intellij-rust/intellij-rust,Undin/intellij-rust,Turbo87/intellij-rust,intellij-rust/intellij-rust,d9n/intellij-rust,anton-okolelov/intellij-rust,alygin/intellij-rust,ujpv/intellij-rust,intellij-rust/intellij-rust,Turbo87/intellij-rust,intellij-rust/intellij-rust,Undin/intellij-rust,alygin/intellij-rust,Turbo87/intellij-rust,ThoseGrapefruits/intellij-rust,ujpv/intellij-rust,Turbo87/intellij-rust,ujpv/intellij-rust,alygin/intellij-rust,himikof/intellij-rust,anton-okolelov/intellij-rust,Undin/intellij-rust,alygin/intellij-rust,himikof/intellij-rust,d9n/intellij-rust,himikof/intellij-rust,intellij-rust/intellij-rust,ThoseGrapefruits/intellij-rust,ThoseGrapefruits/intellij-rust,Undin/intellij-rust,anton-okolelov/intellij-rust,ujpv/intellij-rust,ujpv/intellij-rust,d9n/intellij-rust,himikof/intellij-rust,anton-okolelov/intellij-rust,d9n/intellij-rust,d9n/intellij-rust,ThoseGrapefruits/intellij-rust