Search in sources :

Example 1 with ElixirAtom

use of org.elixir_lang.psi.ElixirAtom in project intellij-elixir by KronicDeth.

the class Model method isSuitable.

@Override
protected boolean isSuitable(PsiElement element) {
    boolean suitable = false;
    // checks if the class is good
    if (super.isSuitable(element)) {
        // calls can be nested in calls, so need to check for sure
        if (element instanceof Call) {
            Call call = (Call) element;
            suitable = isSuitable(call);
        } else if (element instanceof ElixirAtom) {
            ElixirAtom atom = (ElixirAtom) element;
            suitable = Field.is(atom);
        } else if (element instanceof QuotableKeywordPair) {
            QuotableKeywordPair quotableKeywordPair = (QuotableKeywordPair) element;
            suitable = FieldWithDefaultValue.is(quotableKeywordPair);
        }
    }
    return suitable;
}
Also used : Call(org.elixir_lang.psi.call.Call) ElixirAtom(org.elixir_lang.psi.ElixirAtom) QuotableKeywordPair(org.elixir_lang.psi.QuotableKeywordPair)

Aggregations

ElixirAtom (org.elixir_lang.psi.ElixirAtom)1 QuotableKeywordPair (org.elixir_lang.psi.QuotableKeywordPair)1 Call (org.elixir_lang.psi.call.Call)1