Package org.eclipse.debug.core.model

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


    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


      // getDebugTarget());
      stringInfo = SimpleByteArrayValue.createVariables(getValueBytes(),
          0, arrayLength, 1, getDebugTarget());

      // add in the current length (real length) information
      IValue iv = new SimpleIntValue(arrayLength, getRequiredBytes(),
          getDebugTarget());
      // length
      stringInfo[0] = new SimpleVariable(
          PHPDebugCoreMessages.XDebug_DBGpStringValue_0, iv,
          getDebugTarget());
View Full Code Here

          rangeEnd = bytePos + byteCount - 1;
        } else {
          rangeEnd = rangeStart + split - 1;
        }
        if (rangeStart <= rangeEnd) {
          IValue iv = new SimpleByteArrayValue(bytes, rangeStart,
              rangeEnd, debugTarget);
          childVariables[j + startOffset] = new SimpleVariable("[" //$NON-NLS-1$
              + rangeStart + ".." + rangeEnd + "]", iv, //$NON-NLS-1$ //$NON-NLS-2$
              debugTarget);
          rangeStart += split;

        }
      }
    } else {
      childVariables = new IVariable[byteCount + startOffset];
      // don't split out the data.
      for (int i = 0; i < byteCount; i++) {
        IValue iv2 = new SimpleByteValue(bytes[bytePos + i],
            debugTarget);
        childVariables[i + startOffset] = new SimpleVariable(Integer
            .toString(bytePos + i), iv2, debugTarget);
      }
    }
View Full Code Here

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

        }
    }
   
    private Object[] getAgendaElements(IJavaObject workingMemoryImpl) throws DebugException {
        List<MyVariableWrapper> result = new ArrayList<MyVariableWrapper>();
        IValue agendaGroupObjects = DebugUtil.getValueByExpression("return getAgenda().getAgendaGroups();", workingMemoryImpl);
        IValue focus = null;
        try {
            // Drools 4 code
          focus = DebugUtil.getValueByExpression("return getAgenda().getFocus();", workingMemoryImpl);
        } catch (RuntimeException e) {
          // Drools 5 code
View Full Code Here

                            activationId = activationVar.getValue().getValueString();
                            break;
                        }
                    }
                    if (activationId != null) {
                        IValue objects = DebugUtil.getValueByExpression("return getActivationParameters(" + activationId + ");", workingMemoryImpl);
                        if (objects instanceof IJavaArray) {
                          addVariablesFromArray(variables, (IJavaArray) objects);
                        }
                        result = variables.toArray(new IJavaVariable[variables.size()]);
                    }
View Full Code Here

   * @param value
   *            current expression value
   * @return previous value or <code>null</code>
   */
  protected IValue setCurrentConditionValue(IDebugTarget target, IValue value) {
    IValue prev = fConditionValues.get(target);
    fConditionValues.put(target, value);
    return prev;
  }
View Full Code Here

   * .String)
   */
  @Override
  public boolean verifyValue(String expression) throws DebugException {
    Value vmValue = generateVMValue(expression);
    IValue value = JDIValue.createValue(getJavaDebugTarget(), vmValue);
    return verifyValue(value);
  }
View Full Code Here

        }
        fireConditionHasRuntimeErrors(fBreakpoint, exception);
        return SUSPEND;
      }
      try {
        IValue value = result.getValue();
        if (fBreakpoint.isConditionSuspendOnTrue()) {
          if (value instanceof IJavaPrimitiveValue) {
            // Suspend when the condition evaluates true
            IJavaPrimitiveValue javaValue = (IJavaPrimitiveValue) value;
            if (javaValue.getJavaType().getName()
                .equals("boolean")) { //$NON-NLS-1$
              if (javaValue.getBooleanValue()) {
                return SUSPEND;
              }
              return DONT_SUSPEND;
            }
          }
          IStatus status = new Status(
              IStatus.ERROR,
              JDIDebugPlugin.getUniqueIdentifier(),
              MessageFormat.format(JDIDebugBreakpointMessages.ConditionalBreakpointHandler_1, value.getReferenceTypeName()));
          // result was not boolean
          fireConditionHasRuntimeErrors(fBreakpoint, new DebugException(status));
          return SUSPEND;
        }
        IDebugTarget debugTarget = thread.getDebugTarget();
        IValue lastValue = fBreakpoint
            .setCurrentConditionValue(debugTarget, value);
        if (!value.equals(lastValue)) {
          return SUSPEND;
        }
        return DONT_SUSPEND;
View Full Code Here

                        "org.drools.reteoo.ReteooStatefulSession".equals(
                            ((IJavaObject) obj).getReferenceTypeName())) {
                variables = getWorkingMemoryElements((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

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.