Search in sources :

Example 6 with KtClassOrObject

use of org.jetbrains.kotlin.psi.KtClassOrObject in project kotlin by JetBrains.

the class KotlinFindClassUsagesDialog method configureLabelComponent.

@Override
public void configureLabelComponent(@NotNull SimpleColoredComponent coloredComponent) {
    PsiElement klass = LightClassUtilsKt.getUnwrapped(getPsiElement());
    //noinspection ConstantConditions
    KtClassOrObject originalClass = klass instanceof KtClassOrObject ? (KtClassOrObject) klass : klass.getUserData(ORIGINAL_CLASS);
    if (originalClass != null) {
        coloredComponent.append(RenderingUtilsKt.formatClass(originalClass));
    }
}
Also used : KtClassOrObject(org.jetbrains.kotlin.psi.KtClassOrObject) PsiElement(com.intellij.psi.PsiElement)

Aggregations

KtClassOrObject (org.jetbrains.kotlin.psi.KtClassOrObject)6 NotNull (org.jetbrains.annotations.NotNull)3 FqName (org.jetbrains.kotlin.name.FqName)2 KtFile (org.jetbrains.kotlin.psi.KtFile)2 AbstractTreeNode (com.intellij.ide.util.treeView.AbstractTreeNode)1 PsiElement (com.intellij.psi.PsiElement)1 SmartList (com.intellij.util.SmartList)1 ArrayList (java.util.ArrayList)1 List (java.util.List)1 GenerationState (org.jetbrains.kotlin.codegen.state.GenerationState)1 ResolutionFacade (org.jetbrains.kotlin.idea.resolve.ResolutionFacade)1 KtDeclaration (org.jetbrains.kotlin.psi.KtDeclaration)1 KtEnumEntry (org.jetbrains.kotlin.psi.KtEnumEntry)1 KtScript (org.jetbrains.kotlin.psi.KtScript)1 BindingContext (org.jetbrains.kotlin.resolve.BindingContext)1