Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.Expression


      }
    }
 
    IValueList arguments = new IValueList(values);
    for (Iterator it = node.arguments().iterator(); it.hasNext();) {
      Expression e = (Expression) it.next();
      arguments.add(visitChild(e));
    }
 
    ownValue = constructStatementNode("constructorCall", values.bool(true), expression, arguments.asList());
    setAnnotation("typeParameters", genericTypes);
View Full Code Here


 
    IValue name = values.string(node.getName().getFullyQualifiedName());
 
    IValueList arguments = new IValueList(values);
    for (Iterator it = node.arguments().iterator(); it.hasNext();) {
      Expression e = (Expression) it.next();
      arguments.add(visitChild(e));
    }
 
    ownValue = constructExpressionNode("methodCall", values.bool(true), qualifier, name, arguments.asList());
    setAnnotation("typeParameters", genericTypes);
View Full Code Here

 
  protected boolean processAddListenerStatement(TypeDeclaration type, WidgetAdapter adapter, EventSetDescriptor esd, MethodDescriptor mListener, MethodInvocation mi) {
    List arguments = mi.arguments();
    for (Object arg : arguments) {
      Expression argExpression = (Expression) arg;
      if (argExpression instanceof ClassInstanceCreation) {
        ClassInstanceCreation cic = (ClassInstanceCreation) argExpression;
        AnonymousClassDeclaration acd = cic.getAnonymousClassDeclaration();
        if (acd != null) {
          if (parse(adapter, esd, mListener, cic))
View Full Code Here

        Component child = getTabComponent(mi, arguments);
        int index = jtp.indexOfComponent(child);
        if (index != -1) {
          Icon icon = jtp.getIconAt(index);
          if (icon != null) {
            Expression exp = (Expression) arguments.get(1);
            icon = parseIcon(icon, exp);
            jtp.setIconAt(index, icon);
          }
        }
      }
View Full Code Here

    }
  }

  private Component getTabComponent(MethodInvocation methodInvocation,
      List arguments) {
    Expression exp = (Expression) arguments.get(2);
    if (exp != null && exp instanceof MethodInvocation) {
      MethodInvocation mi = (MethodInvocation) exp;
      String getMethodName = mi.getName().getFullyQualifiedName();
      String fieldName = getFieldNameFromGetMethodName(methodInvocation,
          getMethodName);
View Full Code Here

  /**
   * @return OK | THROW
   */
  @Override
  public int evaluate(EvaluationContext context) {
    Expression expression = invocation.getExpression();
    FrameContext frame = context.peek();
    VariableContext ctx = frame.peek();
    Stack<Object> stack = ctx.getStack();
    if (expression != null && !(expression instanceof ThisExpression)) {
      IEvaluator evaluator = (IEvaluator) Platform.getAdapterManager()
View Full Code Here

  private List<Type> inferArgumentTypes() {
    List arguments = invocation.arguments();
    List<Type> types = new ArrayList<Type>();
    for (int i = 0; i < arguments.size(); i++) {
      Expression expression = (Expression) arguments.get(i);
      ITypeInferer inferer = (ITypeInferer) Platform.getAdapterManager()
          .getAdapter(expression, ITypeInferer.class);
      types.add(inferer.inferType());
    }
    return types;
View Full Code Here

    return success;
  }

  private boolean processWidgetCreationStatement(TypeDeclaration type, WidgetAdapter adapter, EventSetDescriptor esd, MethodDescriptor mListener, Statement statement) {
    ExpressionStatement expressionStatement = (ExpressionStatement) statement;
    Expression expression = expressionStatement.getExpression();
    if (expression instanceof MethodInvocation) {
      MethodInvocation mi = (MethodInvocation) expression;
      if (adapter.isRoot()) {
        return createAddMethod(type, adapter, esd, mListener, mi);
      } else {
        Expression optionalExpression = mi.getExpression();
        if (optionalExpression instanceof SimpleName) {
          SimpleName simplename = (SimpleName) optionalExpression;
          String idName = simplename.getFullyQualifiedName();
          if (idName.equals(adapter.getID()))
            return createAddMethod(type, adapter, esd, mListener, mi);
View Full Code Here

    List statements = getBeanPropertyInitStatements(adaptable, type);
    for (Object stmt : statements) {
      Statement statement = (Statement) stmt;
      if (statement instanceof ExpressionStatement) {
        ExpressionStatement es = (ExpressionStatement) statement;
        Expression expression = es.getExpression();
        if (expression instanceof MethodInvocation) {
          MethodInvocation mi = (MethodInvocation) expression;
          Expression optional = mi.getExpression();
          if (isShouldCheck(optional)) {
            String mName = mi.getName().getFullyQualifiedName();
            if (mName.startsWith("set")) {
              parseSetStatement(lnfClassname, mi);
            } else if (mName.startsWith("add")) {
View Full Code Here

      return adaptable.isRoot();
    } else if (optional instanceof ThisExpression) {
      return adaptable.isRoot();
    } else if (optional instanceof FieldAccess) {
      FieldAccess fieldAccess = (FieldAccess) optional;
      Expression accessExpression = fieldAccess.getExpression();
      if (accessExpression instanceof SimpleName) {
        String fieldName = ((SimpleName) accessExpression).getFullyQualifiedName();
        if (fieldName.equals(adaptable.getName()))
          return true;
      }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.Expression

Copyright © 2018 www.massapicom. 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.