Search in sources :

Example 1 with Parent

use of org.elixir_lang.navigation.item_presentation.Parent in project intellij-elixir by KronicDeth.

the class Module method location.

/*
     * Protected Instanc Methods
     */
@Nullable
protected String location() {
    String location = null;
    if (parent != null) {
        ItemPresentation itemPresentation = parent.getPresentation();
        if (itemPresentation instanceof Parent) {
            Parent parentPresentation = (Parent) itemPresentation;
            location = parentPresentation.getLocatedPresentableText();
        }
    }
    return location;
}
Also used : Parent(org.elixir_lang.navigation.item_presentation.Parent) ItemPresentation(com.intellij.navigation.ItemPresentation) Nullable(org.jetbrains.annotations.Nullable)

Example 2 with Parent

use of org.elixir_lang.navigation.item_presentation.Parent in project intellij-elixir by KronicDeth.

the class Field method getPresentation.

/**
     * Returns the presentation of the tree element.
     *
     * @return the element presentation.
     */
@NotNull
@Override
public ItemPresentation getPresentation() {
    Parent parentPresentation = (Parent) structure.getPresentation();
    String location = parentPresentation.getLocatedPresentableText();
    String name;
    String atomText = navigationItem.getText();
    name = atomText.substring(1);
    return new org.elixir_lang.navigation.item_presentation.structure.Field(location, name);
}
Also used : Parent(org.elixir_lang.navigation.item_presentation.Parent) NotNull(org.jetbrains.annotations.NotNull)

Example 3 with Parent

use of org.elixir_lang.navigation.item_presentation.Parent in project intellij-elixir by KronicDeth.

the class FieldWithDefaultValue method getPresentation.

/**
     * Returns the presentation of the tree element.
     *
     * @return the element presentation.
     */
@NotNull
@Override
public ItemPresentation getPresentation() {
    Parent parentPresentation = (Parent) structure.getPresentation();
    String location = parentPresentation.getLocatedPresentableText();
    PsiElement name = navigationItem.getKeywordKey();
    PsiElement defaultValue = navigationItem.getKeywordValue();
    return new org.elixir_lang.navigation.item_presentation.structure.Field(location, name.getText(), defaultValue.getText());
}
Also used : Parent(org.elixir_lang.navigation.item_presentation.Parent) PsiElement(com.intellij.psi.PsiElement) NotNull(org.jetbrains.annotations.NotNull)

Example 4 with Parent

use of org.elixir_lang.navigation.item_presentation.Parent in project intellij-elixir by KronicDeth.

the class Type 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();
    return new org.elixir_lang.navigation.item_presentation.Type(location, type(navigationItem), opaque, visibility);
}
Also used : Parent(org.elixir_lang.navigation.item_presentation.Parent) NotNull(org.jetbrains.annotations.NotNull)

Example 5 with Parent

use of org.elixir_lang.navigation.item_presentation.Parent in project intellij-elixir by KronicDeth.

the class Overridable 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();
    }
    return new org.elixir_lang.navigation.item_presentation.Overridable(location);
}
Also used : Parent(org.elixir_lang.navigation.item_presentation.Parent) ItemPresentation(com.intellij.navigation.ItemPresentation) NotNull(org.jetbrains.annotations.NotNull)

Aggregations

Parent (org.elixir_lang.navigation.item_presentation.Parent)14 NotNull (org.jetbrains.annotations.NotNull)13 ItemPresentation (com.intellij.navigation.ItemPresentation)6 PsiElement (com.intellij.psi.PsiElement)3 NameArity (org.elixir_lang.navigation.item_presentation.NameArity)2 Call (org.elixir_lang.psi.call.Call)1 Nullable (org.jetbrains.annotations.Nullable)1