use of com.intellij.navigation.ItemPresentation in project intellij-elixir by KronicDeth.
the class Quote method getPresentation.
/*
* Methods
*/
/**
* Returns the presentation of the tree element.
*
* @return the element presentation.
*/
@NotNull
@Override
public ItemPresentation getPresentation() {
String location = null;
if (parent != null) {
ItemPresentation parentItemPresentation = parent.getPresentation();
if (parentItemPresentation instanceof Parent) {
Parent parentParentPresentation = (Parent) parentItemPresentation;
location = parentParentPresentation.getLocatedPresentableText();
}
}
return new org.elixir_lang.navigation.item_presentation.Quote(location, navigationItem);
}
use of com.intellij.navigation.ItemPresentation in project intellij-elixir by KronicDeth.
the class Use method getPresentation.
/**
* Returns the presentation of the tree element.
*
* @return the element presentation.
*/
@NotNull
@Override
public ItemPresentation getPresentation() {
ItemPresentation itemPresentation = modular.getPresentation();
String location = null;
if (itemPresentation instanceof Parent) {
Parent parentPresenation = (Parent) itemPresentation;
location = parentPresenation.getLocatedPresentableText();
}
PsiElement[] arguments = finalArguments(navigationItem);
return new org.elixir_lang.navigation.item_presentation.Use(location, arguments);
}
use of com.intellij.navigation.ItemPresentation 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