Package org.eclipse.debug.core.model

Examples of org.eclipse.debug.core.model.IValue


  @Override
  public boolean saveVariable(IVariable variable, String expression,
      Shell shell) {
    try {
      if (variable instanceof BaseWriteableCamelBooleanVariable) {
        IValue value = variable.getValue();
        ((BaseWriteableCamelBooleanVariable) value).setValue(expression);
        return true;
      }
    } catch (DebugException ex) {
      Activator.getLogger().error(ex);
View Full Code Here


            return null; // defaults are fine

        } else if (element instanceof IWatchExpression) {
            try {
                IWatchExpression watch_expression = (IWatchExpression) element;
                IValue value = watch_expression.getValue();
                if (value != null) {
                    return "\"" + watch_expression.getExpressionText() + "\"= " + value.getValueString();
                } else {
                    return null;
                }
            } catch (DebugException e) {
                return null;
View Full Code Here

        Display.getDefault().asyncExec(new Runnable() {
            public void run() {
                expression.evaluate();
                waitForExpressionEvaluation(expression);
                try {
                    IValue value = expression.getValue();
                    String result = null;
                    if (value != null) {
                        result = expr + "\n" + value.getValueString();
                        DisplayPopup popup = new DisplayPopup(shell, point, result);
                        popup.open();
                    }
                } catch (DebugException e) {
                    DebugPlugin.log(e);
View Full Code Here

            //OK, we're in a debug context...
            IWatchExpression watchExpression = EvalExpressionAction.createWatchExpression(act);
            watchExpression.evaluate();
            EvalExpressionAction.waitForExpressionEvaluation(watchExpression);
            IValue value = watchExpression.getValue();
            if (value != null) {
                try {
                    String valueString = value.getValueString();
                    if (valueString != null) {
                        if (!reportSyntaxErrors) {
                            if (valueString.startsWith("SyntaxError") && valueString.indexOf("<string>") != -1) {
                                //Don't report syntax errors in the hover
                                return null;
View Full Code Here

    IWatchExpressionFactoryAdapter {

  public String createWatchExpression(IVariable variable)
      throws CoreException {

    IValue value = variable.getValue();
    if (value instanceof PHPValue) {
      PHPValue phpValue = (PHPValue) value;
      return phpValue.getVariable().getFullName();
    }
    return variable.getName();
View Full Code Here

                        "org.drools.reteoo.ReteooStatefulSession".equals(
                            ((IJavaObject) obj).getReferenceTypeName()))) {
                variables = getApplicationDataElements((IJavaObject) obj);
            } else if (obj instanceof IVariable) {
                if (view.isShowLogicalStructure()) {
                    IValue value = getLogicalValue(((IVariable) obj).getValue(), new ArrayList());
                    variables = value.getVariables();
                }
                if (variables == null) {
                    variables = ((IVariable) obj).getValue().getVariables();
                }
            }
View Full Code Here

            return new Object[0];
        }
    }
   
    private IVariable[] getApplicationDataElements(IJavaObject stackObj) throws DebugException {
        IValue objects = null;
        try {
          objects = DebugUtil.getValueByExpression("return ((org.drools.core.base.MapGlobalResolver) getGlobalResolver()).getGlobals();", stackObj);
        } catch (RuntimeException e) {
          // backwards compatibility
          objects = DebugUtil.getValueByExpression("return ((org.drools.base.MapGlobalResolver) getGlobalResolver()).getGlobals();", stackObj);
View Full Code Here

    }

    public boolean hasChildren(Object element) {
        try {
            if (element instanceof IVariable) {
                IValue v = ((IVariable)element).getValue();
                return v != null && v.hasVariables();
            }
            if (element instanceof IValue) {
                return ((IValue)element).hasVariables();
            }
            if (element instanceof IStackFrame) {
View Full Code Here

    }
    return true;
  }

  private String getValueString(IVariable variable) throws DebugException {
    IValue value = variable.getValue();
    String initialValue = value.getValueString();

    if (value instanceof DBGpStringValue) {
      DBGpStringValue strValue = (DBGpStringValue) value;
      if (strValue.isComplete() == false) {
        DBGpTarget target = (DBGpTarget) value.getDebugTarget();
        DBGpVariable dbgpVar = (DBGpVariable) variable;
        String stackLevel = dbgpVar.getStackLevel();
        Node result = target.getCompleteString(dbgpVar.getFullName(),
            stackLevel, strValue.getRequiredBytes());
        if (result != null) {
          IVariable tempVar = new DBGpVariable(target, result,
              stackLevel);
          IValue valRes = null;
          try {
            valRes = tempVar.getValue();
            if (valRes != null) {
              // update the variable with the latest value.
              ((DBGpVariable) variable).replaceValue(valRes);
              initialValue = valRes.getValueString();
            }
          } catch (Exception e) {
          }
        }
      }
View Full Code Here

    if (resp == null) {
      return ""; //$NON-NLS-1$
    }
    IVariable tempVar = new DBGpVariable(debugTarget, resp, "-2"); //$NON-NLS-1$

    IValue val = null;

    try {
      val = tempVar.getValue();
      if (val != null) {
        value = val.getValueString();
      }
    } catch (DebugException e) {
    }

    if (value != null && value.length() == 0) {
View Full Code Here

TOP

Related Classes of org.eclipse.debug.core.model.IValue

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.