Package org.eclipse.jdt.core.dom

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


    });
    // move invocations
    StatementTarget target = getMethodInvocationTarget(signature);
    for (ValueObject_setColumnWidth object : objects) {
      MethodInvocation invocation = object.m_invocation;
      Statement statement = AstNodeUtils.getEnclosingStatement(invocation);
      getEditor().moveStatement(statement, target);
      target = new StatementTarget(statement, false);
    }
  }
View Full Code Here


  /**
   * @return the {@link StatementTarget} for association invocation.
   */
  private static StatementTarget createStatementTarget(TabInfo tabInfo) {
    Statement targetStatement =
        AstNodeUtils.getEnclosingStatement(tabInfo.getCreationSupport().getNode());
    return new StatementTarget(targetStatement, false);
  }
View Full Code Here

            "com.smartgwt.client.widgets.form.fields.CanvasItem",
            new ConstructorCreationSupport());
    command_CREATE(newItem, referenceItem);
    {
      // materialize
      Statement targetStatement =
          AstNodeUtils.getEnclosingStatement(newItem.getCreationSupport().getNode());
      StatementTarget statementTarget = new StatementTarget(targetStatement, true);
      newItem.getVariableSupport().ensureInstanceReadyAt(statementTarget);
    }
    return newItem;
View Full Code Here

  /**
   * @return the {@link StatementTarget} for association invocation.
   */
  private static StatementTarget createStatementTarget(FormItemInfo itemInfo) {
    Statement targetStatement =
        AstNodeUtils.getEnclosingStatement(itemInfo.getCreationSupport().getNode());
    return new StatementTarget(targetStatement, false);
  }
View Full Code Here

    List<Statement> statements = DomGenerics.statements(lastInfoMethod.getBody());
    StatementTarget methodTarget;
    if (statements.isEmpty()) {
      methodTarget = new StatementTarget(lastInfoMethod, true);
    } else {
      Statement lastStatement = statements.get(statements.size() - 1);
      methodTarget = new StatementTarget(lastStatement, lastStatement instanceof ReturnStatement);
    }
    //
    editor.addStatement("initDataBindings();", methodTarget);
  }
View Full Code Here

    {
      MethodInvocation invocation = canvas.getMethodInvocation("moveTo(int,int)");
      if (invocation != null) {
        StatementTarget target;
        {
          Statement statement = AstNodeUtils.getEnclosingStatement(invocation);
          target = new StatementTarget(statement, true);
        }
        {
          String xString = editor.getSource(DomGenerics.arguments(invocation).get(0));
          String yString = editor.getSource(DomGenerics.arguments(invocation).get(1));
View Full Code Here

    DataSourceInfo dataSource =
        NonVisualBeanContainerInfo.get(calendar).getChildren(DataSourceInfo.class).get(0);
    // check special target
    StatementTarget target = dataSource.calculateStatementTarget(calendar);
    assertNotNull(target);
    Statement statement =
        AstNodeUtils.getEnclosingStatement(this.<ASTNode>getNode("new Calendar()"));
    assertTarget(target, null, statement, false);
    // assign
    editor.setComponent(property, dataSource);
    assertEditor(
View Full Code Here

    DataSourceInfo dataSource =
        NonVisualBeanContainerInfo.get(calendar).getChildren(DataSourceInfo.class).get(0);
    // check special target
    StatementTarget target = dataSource.calculateStatementTarget(calendar);
    assertNotNull(target);
    Statement statement = AstNodeUtils.getEnclosingStatement(this.<ASTNode>getNode("testDS"));
    assertTarget(target, null, statement, false);
    // assign
    editor.setComponent(property, dataSource);
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

    DataSourceInfo dataSource =
        NonVisualBeanContainerInfo.get(calendar).getChildren(DataSourceInfo.class).get(0);
    // check special target
    StatementTarget target = dataSource.calculateStatementTarget(calendar);
    assertNotNull(target);
    Statement statement = AstNodeUtils.getEnclosingStatement(this.<ASTNode>getNode("url"));
    assertTarget(target, null, statement, false);
    // assign
    editor.setComponent(property, dataSource);
    assertEditor(
        "public class Test implements EntryPoint {",
View Full Code Here

        MethodInvocation invocation = association.getInvocation();
        assertNotNull(invocation);
        assertEquals("configs.add(column)", m_lastEditor.getSource(invocation));
      }
      {
        Statement statement = association.getStatement();
        assertNotNull(statement);
        assertEquals("configs.add(column);", m_lastEditor.getSource(statement));
      }
    }
  }
View Full Code Here

TOP

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

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.