Package com.intellij.psi

Examples of com.intellij.psi.PsiElement.accept()


    @Override
    public void visitUpSetDelayed(final UpSetDelayed upSetDelayed) {
      final PsiElement lhs = upSetDelayed.getFirstChild();
      if (lhs != null) {
        UpSetDefinitionSymbolVisitor visitor = new UpSetDefinitionSymbolVisitor();
        lhs.accept(visitor);
        final java.util.Set<Symbol> unboundSymbols = visitor.getUnboundSymbols();
        for (Symbol symbol : unboundSymbols) {
          addAssignment(symbol, lhs, UP_SET_DELAYED_ASSIGNMENT);
        }
      }
View Full Code Here


    public void visitFunctionCall(final FunctionCall functionCall) {
      final PsiElement arg1 = functionCall.getArgument(1);
      if (arg1 != null) {
        if (functionCall.matchesHead("Set|SetDelayed")) {
          SetDefinitionSymbolVisitor visitor = new SetDefinitionSymbolVisitor(arg1);
          arg1.accept(visitor);
          final java.util.Set<Symbol> symbols = visitor.getUnboundSymbols();
          for (Symbol symbol : symbols) {
            addAssignment(symbol, arg1,functionCall.matchesHead("Set") ? SET_ASSIGNMENT : SET_DELAYED_ASSIGNMENT);
          }
        } else if (functionCall.matchesHead("TagSet|TagSetDelayed")) {
View Full Code Here

            addAssignment((Symbol) arg1, functionCall,
                functionCall.matchesHead("TagSet") ? TAG_SET_ASSIGNMENT : TAG_SET_DELAYED_ASSIGNMENT);
          }
        } else if (functionCall.matchesHead("UpSet|UpSetDelayed")) {
          UpSetDefinitionSymbolVisitor visitor = new UpSetDefinitionSymbolVisitor();
          arg1.accept(visitor);
          for (Symbol symbol : visitor.getUnboundSymbols()) {
            addAssignment(symbol, arg1, functionCall.matchesHead("UpSet") ? UP_SET_ASSIGNMENT : UP_SET_DELAYED_ASSIGNMENT);
          }
        } else if (functionCall.matchesHead("SetAttributes")) {
          if (arg1 instanceof Symbol) {
View Full Code Here

    }

    public void visitReferenceExpression(PsiReferenceExpression psiReferenceExpression) {
        PsiElement element = resolveElement(psiReferenceExpression);
        if (belongsToCurrentClass(psiReferenceExpression) && isAField(element))
            element.accept(this);
        visitExpression(psiReferenceExpression);
    }

    private PsiElement resolveElement(PsiReferenceExpression psiReferenceExpression) {
        return psiReferenceExpression.resolve();
View Full Code Here

    }

    public void visitReferenceExpression(PsiReferenceExpression psiReferenceExpression) {
        PsiElement element = resolveElement(psiReferenceExpression);
        if (belongsToCurrentClass(psiReferenceExpression) && isAField(element))
            element.accept(this);
        visitExpression(psiReferenceExpression);
    }

    private PsiElement resolveElement(PsiReferenceExpression psiReferenceExpression) {
        return psiReferenceExpression.resolve();
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.