Package org.eclipse.debug.core.model

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


                        "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<String>());
                    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

                        "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<String>());
                    variables = value.getVariables();
                }
                if (variables == null) {
                    variables = ((IVariable) obj).getValue().getVariables();
                }
            }
View Full Code Here

            return new Object[0];
        }
    }
   
    private IVariable[] getWorkingMemoryElements(IJavaObject stackObj) throws DebugException {
        IValue objects = DebugUtil.getValueByExpression("return iterateObjectsToList().toArray();", stackObj);
        if (objects instanceof IJavaArray) {
            IJavaArray array = (IJavaArray) objects;
            List<MyJavaVariable> result = new ArrayList<MyJavaVariable>();
           
            IJavaValue[] vals = array.getValues();
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

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

            return new Object[0];
        }
    }
   
    private IVariable[] getProcessInstances(IJavaObject stackObj) throws DebugException {
        IValue objects = DebugUtil.getValueByExpression("return getProcessInstances().toArray();", stackObj);
        if (objects instanceof IJavaArray) {
            IJavaArray array = (IJavaArray) objects;
            List<IVariable> result = new ArrayList<IVariable>();
            IJavaValue[] javaVals = array.getValues();
            for ( int i = 0; i < javaVals.length; i++ ) {
View Full Code Here

  private void updateChangedFields(IVariable[] oldVariables, IVariable[] newVariables ) throws DebugException {
    for (IVariable nV : newVariables) {
      BaseCamelVariable newVar = (BaseCamelVariable)nV;
      for (IVariable oldVar : oldVariables) {
        if (newVar.getName().equals(oldVar.getName())) {
          IValue oldValue = oldVar.getValue();
          IValue newValue = newVar.getValue();
          // first check only values
          if (!oldValue.getValueString().equals(newValue.getValueString())) {
            newVar.markChanged();
          }
          // also check for changed nested variables
          if (newValue.hasVariables() && oldValue.hasVariables()) {
            updateChangedFields(oldValue.getVariables(), newValue.getVariables());
          }
        }
      }
    }
  }
View Full Code Here

  @Override
  public boolean editVariable(IVariable variable, Shell shell) {
    try {
      if (variable instanceof BaseWriteableCamelBooleanVariable) {
        BaseWriteableCamelBooleanVariable var = (BaseWriteableCamelBooleanVariable) variable;
        IValue value = variable.getValue();
        BooleanVariableEditor editor = new BooleanVariableEditor(shell, "Edit value...", "Please select the new value...", Boolean.parseBoolean(value.getValueString()));
        if (editor.open() == Window.OK && Boolean.parseBoolean(value.getValueString()) != editor.getValue()) {
          var.setValue(Boolean.toString(editor.getValue()));
        }
        return true;
      }
    } catch (DebugException ex) {
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.