use of org.elixir_lang.navigation.item_presentation.NameArity in project intellij-elixir by KronicDeth.
the class Callback method getPresentation.
/**
* Returns the presentation of the tree element.
*
* @return the element presentation.
*/
@NotNull
@Override
public ItemPresentation getPresentation() {
Parent parentPresentation = (Parent) modular.getPresentation();
String location = parentPresentation.getLocatedPresentableText();
PsiElement[] arguments = ElixirPsiImplUtil.finalArguments(navigationItem);
assert arguments != null;
// pseudo-named-arguments
boolean callback = true;
Visible.Visibility visibility = Visible.Visibility.PUBLIC;
boolean overridable = false;
boolean override = false;
String name = "?";
int arity = -1;
Call headCall = headCall(navigationItem);
if (headCall != null) {
name = headCall.functionName();
arity = headCall.resolvedFinalArity();
}
//noinspection ConstantConditions
return new NameArity(location, callback, time(), visibility, overridable, override, name, arity);
}
use of org.elixir_lang.navigation.item_presentation.NameArity in project intellij-elixir by KronicDeth.
the class CallDefinition 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 parentPresentation = (Parent) itemPresentation;
location = parentPresentation.getLocatedPresentableText();
}
// pseudo-named-arguments
boolean callback = false;
//noinspection ConstantConditions
return new NameArity(location, callback, time, visibility(), overridable, override, name, arity);
}
Aggregations