Examples of resolveConstantExpressionValue()


Examples of org.eclipse.jdt.core.dom.Expression.resolveConstantExpressionValue()

    Expression expr = node.getInitializer();
    if (expr == null) {
      return null;
    }

    Object v = expr.resolveConstantExpressionValue();
    if (v == null) {
      return null;
    }

    IVariableBinding vb = node.resolveBinding();
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Expression.resolveConstantExpressionValue()

  public void postVisit(org.eclipse.jdt.core.dom.ASTNode node) {
    if (node instanceof ParenthesizedExpression) {
      // do nothing
    } else if (node instanceof Expression) {
      Expression expr = (Expression) node;
      if (expr.resolveConstantExpressionValue() != null) {
        Node oldNode = pop();
        try {
          xmlElementStack.peek().removeChild(oldNode);
        } catch (RuntimeException e) {
          System.out.println("HELLO");
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Expression.resolveConstantExpressionValue()

          System.out.println("HELLO");
          throw e;
        }
        Element newNode = push("Constant");
        updateType(expr, expr.resolveTypeBinding());
        newNode.setAttribute("value", expr
            .resolveConstantExpressionValue().toString());
        newNode.setAttribute("node", node.getClass().getSimpleName());
        newNode.setAttribute(MAPPING_ATTRIBUTE, ((Element)oldNode).getAttribute(MAPPING_ATTRIBUTE));
      }
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.Expression.resolveConstantExpressionValue()

              String g = v != null ? v.toString() : e.toString();
              addGroup(g);
            }
          }
          else if (value instanceof Name) {
            Object v = value.resolveConstantExpressionValue();
            String boundValue = v != null ? v.toString() : value.toString();
            addGroup(boundValue);
          }
          else if(value instanceof StringLiteral) {
            addGroup(value.toString());
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.