@Override
    public boolean update() {
        boolean changes = super.update();
        final CompositeAppearance oldText = myHighlightedText;
        myHighlightedText = new CompositeAppearance();
        NavigatablePsiElement element = (NavigatablePsiElement)getPsiElement();
        if (element == null) {
            return invalidElement();
        }
        
        final ItemPresentation presentation = element.getPresentation();
        if (presentation != null) {
            myHighlightedText.getEnding().addText(presentation.getPresentableText());
            PsiFile file = element.getContainingFile();
            if (file != null) { // adds the file's name
                myHighlightedText.getEnding().addText(" (" + file.getName() + ")", HierarchyNodeDescriptor.getPackageNameAttributes());
            }
            Icon icon = SdIcons.FILE;
            if (element instanceof SdFunctionDefinition) {
                icon = ((SdFunctionDefinition) element).isOverride() ? SdIcons.OVERRIDE_MACRO : SdIcons.MACRO;
            } else if (element instanceof SdFirstPhaseDefinition) {
                icon = SdIcons.FIRST_PHASE;
            }
            installIcon(icon, changes);
        }
        
        myName = myHighlightedText.getText();
        if (!Comparing.equal(myHighlightedText, oldText)) {
            changes = true;
        }
        return changes;
    }
A node descriptor to a node in a tree in the "Call Hierarchy" window.

@author Shahar Ariel
integration/intellij/src/main/java/ai/vespa/intellij/schema/hierarchy/SdCallHierarchyNodeDescriptor.java