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

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


      // create new
      return (IfStatement) getEditor().addStatement(
          ImmutableList.of("if (button == getButtonBar().getItemByItemId("
              + m_id.getName()
              + ")) {", "\t// TODO", "}"),
          new StatementTarget(method, true));
    }
View Full Code Here


            "com.extjs.gxt.ui.client.widget.menu.Menu",
            new ConstructorCreationSupport());
    // prepare "new Menu()" source
    String menuSource;
    {
      StatementTarget statementTarget =
          new StatementTarget(AstNodeUtils.getEnclosingStatement(menuExpression), true);
      NodeTarget nodeTarget = new NodeTarget(statementTarget);
      menuSource = menu.getCreationSupport().add_getSource(nodeTarget);
    }
    // replace "null" with "new Menu()"
    menuExpression = getEditor().replaceExpression(menuExpression, menuSource);
View Full Code Here

      // sort nodes
      ExecutionFlowDescription flowDescription =
          JavaInfoUtils.getState(getRootJava()).getFlowDescription();
      JavaInfoUtils.sortNodesByFlow(flowDescription, false, nodes);
      ASTNode targetNode = nodes.get(nodes.size() - 1);
      return new StatementTarget(targetNode, false);
    }
    return null;
  }
View Full Code Here

  //
  ////////////////////////////////////////////////////////////////////////////
  public void command_CREATE(CanvasInfo newCanvas, TabInfo referenceTab) throws Exception {
    TabInfo newTab = createTab(referenceTab);
    AssociationObject createAssociation = createCanvasAssociationObject();
    StatementTarget statementTarget = createStatementTarget(newTab);
    JavaInfoUtils.addTarget(newCanvas, createAssociation, newTab, statementTarget);
  }
View Full Code Here

      JavaInfoUtils.move(moveTab, associationObject, this, referenceTab);
      return;
    }
    TabInfo newTab = createTab(referenceTab);
    AssociationObject associationObject = createCanvasAssociationObject();
    StatementTarget statementTarget = createStatementTarget(newTab);
    JavaInfoUtils.moveTarget(moveCanvas, associationObject, newTab, null, statementTarget);
  }
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

  //
  ////////////////////////////////////////////////////////////////////////////
  public void command_CREATE(CanvasInfo newCanvas, FormItemInfo referenceItem) throws Exception {
    FormItemInfo newItem = createCanvasItem(referenceItem);
    AssociationObject associationObject = createAssociationObject();
    StatementTarget statementTarget = createStatementTarget(newItem);
    JavaInfoUtils.addTarget(newCanvas, associationObject, newItem, statementTarget);
  }
View Full Code Here

      command_MOVE(moveItem, referenceItem);
      return;
    }
    FormItemInfo newItem = createCanvasItem(referenceItem);
    AssociationObject associationObject = createAssociationObject();
    StatementTarget statementTarget = createStatementTarget(newItem);
    JavaInfoUtils.moveTarget(moveCanvas, associationObject, newItem, null, statementTarget);
  }
View Full Code Here

    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

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.