Examples of replaceExpression()


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

  private boolean setSizeInts(int width, int height) throws Exception {
    MethodInvocation invocation = m_window.getMethodInvocation("setSize(int,int)");
    if (invocation != null) {
      AstEditor editor = m_window.getEditor();
      editor.replaceExpression((Expression) invocation.arguments().get(0), Integer.toString(width));
      editor.replaceExpression((Expression) invocation.arguments().get(1), Integer.toString(height));
      return true;
    }
    // not found
    return false;
  }
View Full Code Here

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

  private boolean setSizeStrings(int width, int height) throws Exception {
    MethodInvocation invocation =
        m_window.getMethodInvocation("setSize(java.lang.String,java.lang.String)");
    if (invocation != null) {
      AstEditor editor = m_window.getEditor();
      editor.replaceExpression(
          (Expression) invocation.arguments().get(0),
          "\"" + Integer.toString(width) + "px\"");
      editor.replaceExpression(
          (Expression) invocation.arguments().get(1),
          "\"" + Integer.toString(height) + "px\"");
View Full Code Here

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

    if (invocation != null) {
      AstEditor editor = m_window.getEditor();
      editor.replaceExpression(
          (Expression) invocation.arguments().get(0),
          "\"" + Integer.toString(width) + "px\"");
      editor.replaceExpression(
          (Expression) invocation.arguments().get(1),
          "\"" + Integer.toString(height) + "px\"");
      return true;
    }
    // not found
View Full Code Here

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

  private boolean setWidthInt(int width) throws Exception {
    MethodInvocation invocation = m_window.getMethodInvocation("setWidth(int)");
    if (invocation != null) {
      AstEditor editor = m_window.getEditor();
      editor.replaceExpression((Expression) invocation.arguments().get(0), Integer.toString(width));
      return true;
    }
    // not found
    return false;
  }
View Full Code Here

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

  private boolean setWidthString(int width) throws Exception {
    MethodInvocation invocation = m_window.getMethodInvocation("setWidth(java.lang.String)");
    if (invocation != null) {
      AstEditor editor = m_window.getEditor();
      editor.replaceExpression(
          (Expression) invocation.arguments().get(0),
          "\"" + Integer.toString(width) + "px\"");
      return true;
    }
    // not found
View Full Code Here

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

  private boolean setHeightInt(int height) throws Exception {
    MethodInvocation invocation = m_window.getMethodInvocation("setHeight(int)");
    if (invocation != null) {
      AstEditor editor = m_window.getEditor();
      editor.replaceExpression((Expression) invocation.arguments().get(0), Integer.toString(height));
      return true;
    }
    // not found
    return false;
  }
View Full Code Here

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

  private boolean setHeightString(int height) throws Exception {
    MethodInvocation invocation = m_window.getMethodInvocation("setHeight(java.lang.String)");
    if (invocation != null) {
      AstEditor editor = m_window.getEditor();
      editor.replaceExpression(
          (Expression) invocation.arguments().get(0),
          "\"" + Integer.toString(height) + "px\"");
      return true;
    }
    // not found
View Full Code Here

Examples of org.teiid.query.sql.visitor.ExpressionMappingVisitor.replaceExpression()

                return element;
            }
        };
       
        if (obj instanceof ElementSymbol) {
            return emv.replaceExpression((ElementSymbol)obj);
        }
        obj = (LanguageObject)obj.clone();
        PreOrderNavigator.doVisit(obj, emv);
        return obj;
    }
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.