use of org.elixir_lang.structure_view.element.modular.Protocol in project intellij-elixir by KronicDeth.
the class File method getChildren.
/*
* Public Instance Methods
*/
@NotNull
@Override
public TreeElement[] getChildren() {
Call[] calls = PsiTreeUtil.getChildrenOfType(navigationItem, Call.class);
TreeElement[] children;
if (calls != null) {
List<TreeElement> treeElementList = new ArrayList<TreeElement>(calls.length);
for (Call call : calls) {
if (Implementation.is(call)) {
treeElementList.add(new Implementation(call));
} else if (Module.is(call)) {
treeElementList.add(new Module(call));
} else if (Protocol.is(call)) {
treeElementList.add(new Protocol(call));
} else if (Quote.is(call)) {
treeElementList.add(new Quote(call));
} else if (Unknown.is(call)) {
// should always be last because it will match all macro calls
treeElementList.add(new Unknown(call));
}
}
children = treeElementList.toArray(new TreeElement[treeElementList.size()]);
} else {
children = new TreeElement[0];
}
return children;
}
use of org.elixir_lang.structure_view.element.modular.Protocol in project intellij-elixir by KronicDeth.
the class GotoSymbolContributor method getItemsFromProtocol.
private void getItemsFromProtocol(@NotNull List<NavigationItem> items, @NotNull EnclosingModularByCall enclosingModularByCall, @NotNull Call call) {
Modular modular = enclosingModularByCall.putNew(call);
Protocol protocol = new Protocol(modular, call);
items.add(protocol);
}
Aggregations