Package org.eclipse.wb.internal.core.utils.ast

Examples of org.eclipse.wb.internal.core.utils.ast.StatementTarget


    if (invoke[0]) {
      return;
    }
    //
    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


    String hString = getRectString(size.height);
    // moveTo(int,int)
    {
      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));
          String arguments = xString + ", " + yString + ", " + wString + ", " + hString;
View Full Code Here

    GenericProperty property = (GenericProperty) calendar.getPropertyByTitle("dataSource");
    ObjectPropertyEditor editor = (ObjectPropertyEditor) property.getEditor();
    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
View Full Code Here

    GenericProperty property = (GenericProperty) calendar.getPropertyByTitle("dataSource");
    ObjectPropertyEditor editor = (ObjectPropertyEditor) property.getEditor();
    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);
View Full Code Here

    GenericProperty property = (GenericProperty) calendar.getPropertyByTitle("dataSource");
    ObjectPropertyEditor editor = (ObjectPropertyEditor) property.getEditor();
    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);
View Full Code Here

TOP

Related Classes of org.eclipse.wb.internal.core.utils.ast.StatementTarget

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.