Package org.eclipse.php.internal.debug.core.zend.debugger

Examples of org.eclipse.php.internal.debug.core.zend.debugger.Expression


  private void requestVariables() {
    PHPDebugTarget debugTarget = (PHPDebugTarget) getDebugTarget();
    ExpressionsManager expressionManager = debugTarget
        .getExpressionManager();
    Expression variable = fVariable;
    if (fGlobal) {
      String exp = "$GLOBALS[\"" + fVariable.getFullName().substring(1) //$NON-NLS-1$
          + "\"]"; //$NON-NLS-1$
      variable = new DefaultExpression(exp);
    }
    expressionManager.update(variable, 1);
    fValue = variable.getValue();

    initChildren(fValue);
  }
View Full Code Here


   */
  protected Expression getExpression(PHPDebugTarget debugTarget,
      String variable) {
    DefaultExpressionsManager expressionManager = debugTarget
        .getExpressionManager();
    Expression expression = expressionManager.buildExpression(variable);

    // Get the value from the debugger
    debugTarget.getExpressionManager().getExpressionValue(expression, 1);
    expressionManager.update(expression, 1);
    return expression;
View Full Code Here

  }

  private class PHPWatchExpressionResult implements IWatchExpressionResult,
      IWatchExpressionResultExtension {
    public IValue getValue() {
      Expression value = getExpression(debugTarget, fExpressionText);
      IValue iValue = new PHPValue(debugTarget, value);
      return iValue;
    }
View Full Code Here

   * @return
   */
  protected String getValue(PHPDebugTarget debugTarget, String variable) {
    DefaultExpressionsManager expressionManager = debugTarget
        .getExpressionManager();
    Expression expression = expressionManager.buildExpression(variable);

    // Get the value from the debugger
    debugTarget.getExpressionManager().getExpressionValue(expression, 1);
    expressionManager.update(expression, 1);
    String value = expression.getValue().getValueAsString();

    if (value != null && value.length() == 0) {
      value = "Empty"; //$NON-NLS-1$
      return value;
    }
View Full Code Here

   */
  public void setValue(String expression) throws DebugException {
    PHPDebugTarget debugTarget = (PHPDebugTarget) getDebugTarget();
    ExpressionsManager expressionManager = debugTarget
        .getExpressionManager();
    Expression changeVar = variable;
    if (global) {
      String exp = "$GLOBALS[\"" + variable.getFullName().substring(1) //$NON-NLS-1$
          + "\"]"; //$NON-NLS-1$
      changeVar = new DefaultExpression(exp);
    }
    boolean status = expressionManager
        .assignValue(changeVar, expression, 1);
    if (!status) {
      Logger.debugMSG("[" + this //$NON-NLS-1$
          + "] PHPValue: Problem changing variable value"); //$NON-NLS-1$
    }
    expressionManager.update(changeVar, 1);
    value.updateValue(changeVar.getValue());
    fireChangeEvent(DebugEvent.CONTENT);

  }
View Full Code Here

        } else if (element instanceof PHPThread) {
          return ((PHPThread) element).getStackVariables();
        } else if (element instanceof PHPStackFrame) {
          return ((PHPStackFrame) element).getStackVariables();
        } else if (element instanceof Expression) {
          Expression eExp = (Expression) element;
          ExpressionValue value = eExp.getValue();
          Expression[] eChildren = value.getChildren();
          if (eChildren == null)
            return new Expression[0];
          if (eChildren.length == 0) {
            ExpressionsManager expressionManager = fTarget
                .getExpressionManager();
            expressionManager.update(eExp, 1);
            value = eExp.getValue();
            eChildren = value.getChildren();
            if (eChildren == null)
              eChildren = new Expression[0];
          }
          return eChildren;
View Full Code Here

     */
    public boolean hasChildren(Object element) {
      if (element instanceof IDebugElement) {
        return getChildren(element).length > 0;
      } else if (element instanceof Expression) {
        Expression eExp = (Expression) element;
        ExpressionValue value = eExp.getValue();
        Expression[] eChildren = value.getChildren();
        if (eChildren == null)
          return false;
        return true;
      }
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.debug.core.zend.debugger.Expression

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.