Examples of PsiElement


Examples of com.intellij.psi.PsiElement

    }
  }

  @Override
  public void visitCondition(Condition condition) {
    PsiElement firstChild = condition.getFirstChild();
    if (firstChild != null) {
      firstChild.accept(this);
    }
  }
View Full Code Here

Examples of com.intellij.psi.PsiElement

    }
  }

  @Override
  public void visitPattern(Pattern pattern) {
    PsiElement firstChild = pattern.getFirstChild();
    if (firstChild instanceof Symbol) {
      myPatternSymbols.add((Symbol) firstChild);
    }
    pattern.getLastChild().accept(this);
  }
View Full Code Here

Examples of com.intellij.psi.PsiElement

    pattern.getLastChild().accept(this);
  }

  @Override
  public void visitFunctionCall(FunctionCall functionCall) {
    final PsiElement head = functionCall.getFirstChild();
    if (head instanceof Symbol) {
      myUnboundSymbols.add((Symbol) head);
      final String functionName = ((Symbol) head).getSymbolName();
      if (myDiveInFirstChild.contains(functionName)) {
        List<PsiElement> args = MathematicaPsiUtilities.getArguments(functionCall);
View Full Code Here

Examples of com.intellij.psi.PsiElement

    list.acceptChildren(this);
  }

  @Override
  public void visitSetDelayed(SetDelayed setDelayed) {
    final PsiElement lhs = setDelayed.getFirstChild();
    myAssignmentType = Assignment.SET_DELAYED_;
    lhs.accept(this);
  }
View Full Code Here

Examples of com.intellij.psi.PsiElement

    lhs.accept(this);
  }

  @Override
  public void visitSet(de.halirutan.mathematica.parsing.psi.api.assignment.Set set) {
    final PsiElement lhs = set.getFirstChild();
    myAssignmentType = Assignment.SET_;
    lhs.accept(this);
  }
View Full Code Here

Examples of com.intellij.psi.PsiElement

  }

  @Override
  public void visitTagSet(TagSet tagSet) {
    myAssignmentType = Assignment.TAG_SET_;
    final PsiElement firstChild = tagSet.getFirstChild();
    if (firstChild == null) {
      return;
    } else {
      if (firstChild instanceof Symbol) {
        myUnboundSymbols.add((Symbol) firstChild);
      }
    }
    final PsiElement operator = MathematicaPsiUtilities.getNextSiblingSkippingWhitespace(firstChild);
    if (operator == null) {
      return;
    }
    final PsiElement pattern = MathematicaPsiUtilities.getNextSiblingSkippingWhitespace(operator);
    if (pattern != null) {
      pattern.accept(this);
    }
  }
View Full Code Here

Examples of com.intellij.psi.PsiElement

  }

  @Override
  public void visitTagSetDelayed(TagSetDelayed tagSetDelayed) {
    myAssignmentType = Assignment.TAG_SET_DELAYED_;
    final PsiElement firstChild = tagSetDelayed.getFirstChild();
    if (firstChild == null) {
      return;
    } else {
      if (firstChild instanceof Symbol) {
        myUnboundSymbols.add((Symbol) firstChild);
      }
    }
    final PsiElement operator = MathematicaPsiUtilities.getNextSiblingSkippingWhitespace(firstChild);
    if (operator == null) {
      return;
    }
    final PsiElement pattern = MathematicaPsiUtilities.getNextSiblingSkippingWhitespace(operator);
    if (pattern != null) {
      pattern.accept(this);
    }
  }
View Full Code Here

Examples of com.intellij.psi.PsiElement

    }
  }

  @Override
  public void visitRuleDelayed(RuleDelayed ruleDelayed) {
    final PsiElement lhs = ruleDelayed.getFirstChild();
    myAssignmentType = Assignment.NONE_;
    lhs.accept(this);
  }
View Full Code Here

Examples of com.intellij.psi.PsiElement

    }

    LocalDefinitionResolveProcessor processor = new LocalDefinitionResolveProcessor(myVariable);
    PsiTreeUtil.treeWalkUp(processor, myVariable, myVariable.getContainingFile(), ResolveState.initial());
    final PsiElement referringSymbol = processor.getMyReferringSymbol();
    if (referringSymbol instanceof Symbol) {
      myVariable.setReferringElement((Symbol) referringSymbol, processor.getMyLocalization(), processor.getMyLocalizationSymbol());
      return referringSymbol;
    }

    GlobalDefinitionResolveProcessor globalProcessor = new GlobalDefinitionResolveProcessor(myVariable);
    PsiTreeUtil.processElements(myVariable.getContainingFile(), globalProcessor);


    final PsiElement globalDefinition = globalProcessor.getMyReferringSymbol();
    if (globalDefinition instanceof Symbol) {
      myVariable.setReferringElement((Symbol) globalDefinition, LocalizationConstruct.ConstructType.NULL, null);
      return globalDefinition;
    }
    return null;
View Full Code Here

Examples of com.intellij.psi.PsiElement

    return myUnboundSymbols;
  }

  @Override
  public void visitCondition(Condition condition) {
    PsiElement firstChild = condition.getFirstChild();
    if (firstChild != null) {
      firstChild.accept(this);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.