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

Examples of org.eclipse.wb.internal.core.utils.ast.AstEditor.replaceInvocationArgument()


      }
      if (anchor == Anchor.BOTH) {
        editor.replaceInvocationName(invocation, "setWidgetTopBottom");
        {
          Expression rightExpression = DomGenerics.arguments(invocation).get(1);
          editor.replaceInvocationArgument(invocation, 3, editor.getSource(rightExpression));
        }
        setInvocationArgument(invocation, 1, bounds.top(), true);
      }
      return;
    }
View Full Code Here


        Object unit = getUnit(invocation, 4);
        setInvocationUnit(invocation, 2, unit);
        // set bottom/height
        {
          Expression bottomExpression = DomGenerics.arguments(invocation).get(3);
          editor.replaceInvocationArgument(invocation, 1, editor.getSource(bottomExpression));
        }
        // set height
        setInvocationArgument(invocation, 3, bounds.height, true);
      }
    }
View Full Code Here

  private boolean setSizeExpression(String signature, int index, String expression)
      throws Exception {
    MethodInvocation invocation = m_widget.getMethodInvocation(signature);
    if (invocation != null) {
      AstEditor editor = m_widget.getEditor();
      editor.replaceInvocationArgument(invocation, index, expression);
      return true;
    }
    return false;
  }
View Full Code Here

    item.setAssociation(new InvocationVoidAssociation(invocation));
    // configure Widget
    {
      NodeTarget target = new NodeTarget(new StatementTarget(invocation, true));
      Expression widgetExpression =
          editor.replaceInvocationArgument(
              invocation,
              0,
              widget.getCreationSupport().add_getSource(target));
      widget.getCreationSupport().add_setSourceExpression(widgetExpression);
      widget.setVariableSupport(new EmptyVariableSupport(widget, widgetExpression));
View Full Code Here

      }
      if (anchor == Anchor.BOTH) {
        editor.replaceInvocationName(invocation, "setWidgetLeftRight");
        {
          Expression rightExpression = DomGenerics.arguments(invocation).get(1);
          editor.replaceInvocationArgument(invocation, 3, editor.getSource(rightExpression));
        }
        setInvocationArgument(invocation, 1, bounds.left(), true);
      }
      return;
    }
View Full Code Here

        Object unit = getUnit(invocation, 4);
        setInvocationUnit(invocation, 2, unit);
        // set right/width
        {
          Expression rightExpression = DomGenerics.arguments(invocation).get(3);
          editor.replaceInvocationArgument(invocation, 1, editor.getSource(rightExpression));
        }
        // set width
        setInvocationArgument(invocation, 3, bounds.width, true);
      }
      return;
View Full Code Here

        Integer widthInteger = getIntegerValue(widthString);
        Integer heightInteger = getIntegerValue(heightString);
        // replace "int" width/height
        if (widthHas && heightHas) {
          if (widthInteger != null && heightInteger != null) {
            editor.replaceInvocationArgument(invocation, 2, widthInteger.toString());
            editor.replaceInvocationArgument(invocation, 3, heightInteger.toString());
            return;
          }
        }
        // replace "int" width
View Full Code Here

        Integer heightInteger = getIntegerValue(heightString);
        // replace "int" width/height
        if (widthHas && heightHas) {
          if (widthInteger != null && heightInteger != null) {
            editor.replaceInvocationArgument(invocation, 2, widthInteger.toString());
            editor.replaceInvocationArgument(invocation, 3, heightInteger.toString());
            return;
          }
        }
        // replace "int" width
        if (widthHas && !heightHas) {
View Full Code Here

          }
        }
        // replace "int" width
        if (widthHas && !heightHas) {
          if (widthInteger != null) {
            editor.replaceInvocationArgument(invocation, 2, widthInteger.toString());
            return;
          }
        }
        // replace "int" height
        if (heightHas && !widthHas) {
View Full Code Here

          }
        }
        // replace "int" height
        if (heightHas && !widthHas) {
          if (heightInteger != null) {
            editor.replaceInvocationArgument(invocation, 3, heightInteger.toString());
            return;
          }
        }
      }
      // replace with "moveTo"
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.