Examples of replaceInvocationName()


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

      if (anchor == Anchor.LEADING) {
        editor.replaceInvocationName(invocation, "setWidgetTopHeight");
        setInvocationArgument(invocation, 1, bounds.top(), true);
      }
      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);
View Full Code Here

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

    if ((invocation = getWidgetInvocation(widget, "setWidgetTopBottom")) != null) {
      if (anchor == Anchor.NONE) {
        editor.removeEnclosingStatement(invocation);
      }
      if (anchor == Anchor.LEADING) {
        editor.replaceInvocationName(invocation, "setWidgetTopHeight");
        // use same unit for top/height
        Object unit = getUnit(invocation, 2);
        setInvocationUnit(invocation, 4, unit);
        // set height
        setInvocationArgument(invocation, 3, bounds.height, true);
View Full Code Here

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

        setInvocationUnit(invocation, 4, unit);
        // set height
        setInvocationArgument(invocation, 3, bounds.height, true);
      }
      if (anchor == Anchor.TRAILING) {
        editor.replaceInvocationName(invocation, "setWidgetBottomHeight");
        // use same unit for bottom/height
        Object unit = getUnit(invocation, 4);
        setInvocationUnit(invocation, 2, unit);
        // set bottom/height
        {
View Full Code Here

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

          int column) throws Exception {
        AstEditor editor = m_panel.getEditor();
        if (methodDescription.getSignature().equals(SET_HOR_ALIGNMENT)) {
          editor.removeEnclosingStatement(invocation);
        } else if (methodDescription.getSignature().equals(SET_ALIGNMENT)) {
          editor.replaceInvocationName(invocation, "setVerticalAlignment");
          editor.removeInvocationArgument(invocation, 2);
          editor.replaceInvocationBinding(invocation);
        }
      }
    });
View Full Code Here

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

      if (anchor == Anchor.NONE) {
        editor.removeEnclosingStatement(invocation);
      }
      if (anchor == Anchor.TRAILING) {
        int right = getBounds().width - bounds.right();
        editor.replaceInvocationName(invocation, "setWidgetRightWidth");
        setInvocationArgument(invocation, 1, right, true);
      }
      if (anchor == Anchor.BOTH) {
        int right = getBounds().width - bounds.right();
        editor.replaceInvocationName(invocation, "setWidgetLeftRight");
View Full Code Here

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

        editor.replaceInvocationName(invocation, "setWidgetRightWidth");
        setInvocationArgument(invocation, 1, right, true);
      }
      if (anchor == Anchor.BOTH) {
        int right = getBounds().width - bounds.right();
        editor.replaceInvocationName(invocation, "setWidgetLeftRight");
        setInvocationArgument(invocation, 3, right, true);
      }
      return;
    }
    if ((invocation = getWidgetInvocation(widget, "setWidgetRightWidth")) != null) {
View Full Code Here

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

      if (anchor == Anchor.NONE) {
        editor.removeEnclosingStatement(invocation);
      }
      if (anchor == Anchor.LEADING) {
        int left = bounds.left();
        editor.replaceInvocationName(invocation, "setWidgetLeftWidth");
        setInvocationArgument(invocation, 1, left, true);
      }
      if (anchor == Anchor.BOTH) {
        editor.replaceInvocationName(invocation, "setWidgetLeftRight");
        {
View Full Code Here

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

        int left = bounds.left();
        editor.replaceInvocationName(invocation, "setWidgetLeftWidth");
        setInvocationArgument(invocation, 1, left, true);
      }
      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);
View Full Code Here

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

    if ((invocation = getWidgetInvocation(widget, "setWidgetLeftRight")) != null) {
      if (anchor == Anchor.NONE) {
        editor.removeEnclosingStatement(invocation);
      }
      if (anchor == Anchor.LEADING) {
        editor.replaceInvocationName(invocation, "setWidgetLeftWidth");
        // use same unit for left/width
        Object unit = getUnit(invocation, 2);
        setInvocationUnit(invocation, 4, unit);
        // set width
        setInvocationArgument(invocation, 3, bounds.width, true);
View Full Code Here

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

        setInvocationUnit(invocation, 4, unit);
        // set width
        setInvocationArgument(invocation, 3, bounds.width, true);
      }
      if (anchor == Anchor.TRAILING) {
        editor.replaceInvocationName(invocation, "setWidgetRightWidth");
        // use same unit for right/width
        Object unit = getUnit(invocation, 4);
        setInvocationUnit(invocation, 2, unit);
        // set right/width
        {
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.