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

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


              this,
              widget,
              SIZE_FORMAT.format(0.0),
              "com.google.gwt.dom.client.Style.Unit.PX",
              SIZE_FORMAT.format(height));
      StatementTarget target = getNewConstraintsTarget(widget);
      Expression expression = widget.addExpressionStatement(target, source);
      addRelatedNodes(expression);
    }
  }
View Full Code Here


  // Utils
  //
  ////////////////////////////////////////////////////////////////////////////
  private static StatementTarget getNewConstraintsTarget(WidgetInfo widget) {
    Statement associationStatement = widget.getAssociation().getStatement();
    return new StatementTarget(associationStatement, false);
  }
View Full Code Here

      int column = getIndex();
      for (int row = 0; row < status.getRowCount();) {
        int cell = status.getCellOfColumn(row, column);
        // set alignment for cell
        {
          StatementTarget target = JavaInfoUtils.getTarget(m_panel);
          String arguments = row + ", " + cell + ", " + alignmentSource;
          m_panel.getCellFormatter().addMethodInvocation(target, SET_HOR_ALIGNMENT, arguments);
        }
        // if cell is row spanned, skip these rows
        {
View Full Code Here

      // new value
      if (invocation == null) {
        final String valueSource = StringConverter.INSTANCE.toJavaSource(m_this, valueString);
        ExecutionUtils.run(m_this, new RunnableEx() {
          public void run() throws Exception {
            StatementTarget target = new StatementTarget(getAssociation().getStatement(), false);
            String signature = signaturePrefix + "java.lang.String)";
            String argumentsSource = TemplateUtils.format("{0}, {1}", m_this, valueSource);
            MethodInvocation newInvocation =
                getParentJava().addMethodInvocation(target, signature, argumentsSource);
            addRelatedNodes(newInvocation);
View Full Code Here

      }
    }
    // if no location set yet, add setWidgetPosition()
    if (!locationSet) {
      // prepare target (after association)
      StatementTarget target;
      {
        Statement associationStatement = widget.getAssociation().getStatement();
        target = new StatementTarget(associationStatement, false);
      }
      // add invocation
      String source = TemplateUtils.format("{0}.setWidgetPosition({1}{2})", this, widget, xyString);
      Expression expression = widget.addExpressionStatement(target, source);
      addRelatedNodes(expression);
View Full Code Here

   * @return the {@link SizeInfo} for current size state of this {@link UIObjectInfo}.
   */
  private SizeInfo getSizeInfo() throws Exception {
    String width = null;
    String height = null;
    StatementTarget target = null;
    // setSize(String,String)
    for (MethodInvocation invocation : getMethodInvocations("setSize(java.lang.String,java.lang.String)")) {
      width = getExpressionString(invocation, 0, width);
      height = getExpressionString(invocation, 1, height);
      if (target == null) {
View Full Code Here

  /**
   * @return the {@link StatementTarget} for position before given {@link MethodInvocation}.
   */
  private static StatementTarget getTarget(MethodInvocation invocation) {
    return new StatementTarget(AstNodeUtils.getEnclosingStatement(invocation), true);
  }
View Full Code Here

            new LocalUniqueVariableSupport(subMenu),
            PureFlatStatementGenerator.INSTANCE,
            AssociationObjects.constructorChild(),
            m_this,
            null,
            new StatementTarget(creationStatement, true));
        // update "subMenu" association
        {
          Expression subMenuReference =
              replaceExpression(
                  DomGenerics.arguments(creation).get(parameter.getIndex()),
View Full Code Here

    // add new invocation
    if (source != null) {
      ExecutionUtils.run(javaInfo, new RunnableEx() {
        public void run() throws Exception {
          if (javaInfo.getAssociation() instanceof InvocationAssociation) {
            StatementTarget target = getTarget(javaInfo);
            String arguments = TemplateUtils.format("{0}, {1}", javaInfo, source);
            m_panel.addMethodInvocation(target, m_methodSignature, arguments);
          }
        }

        private StatementTarget getTarget(JavaInfo javaInfo) {
          Statement targetStatement = javaInfo.getAssociation().getStatement();
          return new StatementTarget(targetStatement, false);
        }
      });
      return true;
    }
    // no changes
View Full Code Here

          String rowTypeName = getRowTypeName();
          String listHandlerName = getListHandlerName(rowTypeName);
          // enable sorting
          getPropertyByTitle("sortable").setValue(true);
          // add "setComparator" invocation
          StatementTarget target = JavaInfoUtils.getTarget(m_this);
          String line1 =
              TemplateUtils.format(
                  "{0}.setComparator({1}, new java.util.Comparator<{2}>() '{'",
                  listHandlerName,
                  m_this,
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.