use of com.perl5.lang.perl.idea.presentations.PerlItemPresentationSimple in project Perl5-IDEA by Camelcade.
the class PerlStructureViewElement method getPresentation.
@NotNull
@Override
public ItemPresentation getPresentation() {
ItemPresentation itemPresentation = createPresentation();
if ((isInherited() || isImported()) && itemPresentation instanceof PerlItemPresentationBase) {
if (getValue() instanceof PerlDeprecatable && ((PerlDeprecatable) getValue()).isDeprecated()) {
((PerlItemPresentationBase) itemPresentation).setAttributesKey(PerlSyntaxHighlighter.UNUSED_DEPRECATED);
} else {
((PerlItemPresentationBase) itemPresentation).setAttributesKey(CodeInsightColors.NOT_USED_ELEMENT_ATTRIBUTES);
}
}
if (isImported() && itemPresentation instanceof PerlItemPresentationSimple) {
PerlExportDescriptor exportDescriptor = getExportDescriptor();
assert exportDescriptor != null;
((PerlItemPresentationSimple) itemPresentation).setPresentableText(exportDescriptor.getImportedName());
}
return itemPresentation;
}
Aggregations