Search in sources :

Example 6 with CallDefinition

use of org.elixir_lang.structure_view.element.CallDefinition in project intellij-elixir by KronicDeth.

the class TreeElementList method addClausesToCallDefinition.

public void addClausesToCallDefinition(@NotNull Call call, @NotNull String name, @NotNull IntRange arityRange) {
    for (int arity = arityRange.getMinimumInteger(); arity <= arityRange.getMaximumInteger(); arity++) {
        Pair<String, Integer> nameArity = pair(name, arity);
        CallDefinition callDefinition = putNew(nameArity);
        callDefinition.clause(call);
    }
}
Also used : CallDefinition(org.elixir_lang.structure_view.element.CallDefinition)

Aggregations

CallDefinition (org.elixir_lang.structure_view.element.CallDefinition)6 NotNull (org.jetbrains.annotations.NotNull)2 TreeElement (com.intellij.ide.util.treeView.smartTree.TreeElement)1 ChooseByNameContributor (com.intellij.navigation.ChooseByNameContributor)1 NavigationItem (com.intellij.navigation.NavigationItem)1 Pair (com.intellij.openapi.util.Pair)1 Call (org.elixir_lang.psi.call.Call)1 ElixirPsiImplUtil.enclosingMacroCall (org.elixir_lang.psi.impl.ElixirPsiImplUtil.enclosingMacroCall)1 org.elixir_lang.structure_view.element (org.elixir_lang.structure_view.element)1 CallDefinitionClause (org.elixir_lang.structure_view.element.CallDefinitionClause)1 Exception (org.elixir_lang.structure_view.element.Exception)1 Overridable (org.elixir_lang.structure_view.element.Overridable)1 Quote (org.elixir_lang.structure_view.element.Quote)1 FunctionByNameArity (org.elixir_lang.structure_view.element.call_definition_by_name_arity.FunctionByNameArity)1 MacroByNameArity (org.elixir_lang.structure_view.element.call_definition_by_name_arity.MacroByNameArity)1 Structure (org.elixir_lang.structure_view.element.structure.Structure)1 Contract (org.jetbrains.annotations.Contract)1 Nullable (org.jetbrains.annotations.Nullable)1