Package org.eclipse.jdt.debug.core

Examples of org.eclipse.jdt.debug.core.IJavaValue


            for ( int j = 0; j < vars.length; j++ ) {
                IVariable var = vars[j];
                if ("id".equals(var.getName())) {
                    id = ((IJavaValue)var.getValue()).getValueString();
                } else if ("process".equals(var.getName())) {
                    IJavaValue process = (IJavaValue) var.getValue();
                    IVariable[] vars2 = process.getVariables();
                    for ( int k = 0; k < vars2.length; k++ ) {
                        IVariable var2 = vars2[k];
                        if ("id".equals(var2.getName())) {
                            processId = ((IJavaValue) var2.getValue()).getValueString();
                            break;
                        }
                    }
                }
            }
            List<String> nodeIds = new ArrayList<String>();
            IJavaArray nodeInstances = (IJavaArray) DebugUtil.getValueByExpression("return getNodeInstances().toArray();", processInstance);
            IJavaValue[] javaVals = nodeInstances.getValues();
            for ( int i = 0; i < javaVals.length; i++ ) {
                IJavaValue nodeInstance = javaVals[i];
                String nodeId = null;
                vars = nodeInstance.getVariables();
                for ( int j = 0; j < vars.length; j++ ) {
                    IVariable var = vars[j];
                    if ("nodeId".equals(var.getName())) {
                        nodeId = ((IJavaValue) var.getValue()).getValueString();
                        break;
View Full Code Here


        if (!providesLogicalStructure(value)) {
            return null;
        }
        List<IJavaVariable> variables = new ArrayList<IJavaVariable>();
       
        IJavaValue id = null;
        IJavaValue processId = null;
        IJavaValue processName = null;
        IVariable[] vars = value.getVariables();
        for ( int j = 0; j < vars.length; j++ ) {
            IVariable var = vars[j];
            if ("id".equals(var.getName())) {
                id = (IJavaValue)var.getValue();
            } else if ("process".equals(var.getName())) {
                IJavaValue process = (IJavaValue) var.getValue();
                IVariable[] vars2 = process.getVariables();
                for ( int k = 0; k < vars2.length; k++ ) {
                    IVariable var2 = vars2[k];
                    if ("id".equals(var2.getName())) {
                        processId = (IJavaValue) var2.getValue();
                    } else if ("name".equals(var2.getName())) {
                        processName = (IJavaValue) var2.getValue();
                    }
                }
            }
        }
        variables.add(new VariableWrapper("id", id));
        variables.add(new VariableWrapper("processName", processName));
        variables.add(new VariableWrapper("processId", processId));
       
        IJavaArray nodeInstances = (IJavaArray) DebugUtil.getValueByExpression("return getNodeInstances().toArray();", value);
        List<IVariable> nodeInstancesResult = new ArrayList<IVariable>();
        IJavaValue[] javaVals = nodeInstances.getValues();
        for ( int i = 0; i < javaVals.length; i++ ) {
            IJavaValue nodeInstance = javaVals[i];
            id = null;
            vars = nodeInstance.getVariables();
            for ( int j = 0; j < vars.length; j++ ) {
                IVariable var = vars[j];
                if ("id".equals(var.getName())) {
                    id = (IJavaValue) var.getValue();
                }
View Full Code Here

        }
        if (agendaGroupObjects instanceof IJavaArray) {
            IJavaArray agendaGroupArray = (IJavaArray) agendaGroupObjects;
            IJavaValue[] agendaGroupValueArray = agendaGroupArray.getValues();
            for (int i = 0; i < agendaGroupValueArray.length; i++) {
                IJavaValue agendaGroup = agendaGroupValueArray[i];
                String name = "";
                List<VariableWrapper> activationsResult = new ArrayList<VariableWrapper>();
                IVariable[] agendaGroupVarArray = agendaGroup.getVariables();
                for (int j = 0; j < agendaGroupVarArray.length; j++) {
                    IVariable agendaGroupVar = agendaGroupVarArray[j];
                    if ("name".equals(agendaGroupVar.getName())) {
                        name = agendaGroupVar.getValue().getValueString();
                        break;
                    }
                }
                IJavaArray activations = (IJavaArray) DebugUtil.getValueByExpression("return getActivations();", agendaGroup);
                IJavaValue[] activationArray = activations.getValues();
                for (int l = 0; l < activationArray.length; l++) {
                    IJavaValue activation = activationArray[l];
                    if (activation.getJavaType() != null) {
                        activationsResult.add(new VariableWrapper("[" + l + "]",
                            new LazyActivationWrapper(activations, activation, workingMemoryImpl)));
                    }
                }
View Full Code Here

        }
       
        private void addVariablesFromArray(List<VariableWrapper> variables, IJavaArray array) throws Exception {
            IJavaValue[] javaVals = array.getValues();
            for ( int k = 0; k < javaVals.length; k++ ) {
                IJavaValue mapEntry = javaVals[k];
                IJavaObject key = null;
                IJavaValue value = null;

                IVariable[] vars = mapEntry.getVariables();
                for ( int j = 0; j < vars.length; j++ ) {
                    IVariable var = vars[j];
                    if ("key".equals(var.getName())) {
View Full Code Here

        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++ ) {
                IJavaValue processInstance = javaVals[i];
                String id = null;
                IVariable[] vars = processInstance.getVariables();
                for ( int j = 0; j < vars.length; j++ ) {
                    IVariable var = vars[j];
                    if ("id".equals(var.getName())) {
                        id = var.getValue().getValueString();
                    }
View Full Code Here

        if (objects instanceof IJavaArray) {
            IJavaArray array = (IJavaArray) objects;
            List<VariableWrapper> result = new ArrayList<VariableWrapper>();
            IJavaValue[] javaVals = array.getValues();
            for ( int i = 0; i < javaVals.length; i++ ) {
                IJavaValue mapEntry = javaVals[i];
                String key = null;
                IJavaValue value = null;
               
                IVariable[] vars = mapEntry.getVariables();
                for ( int j = 0; j < vars.length; j++ ) {
                    IVariable var = vars[j];
                    if ("key".equals(var.getName())) {
View Full Code Here

        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++ ) {
                IJavaValue processInstance = javaVals[i];
                String id = null;
                IVariable[] vars = processInstance.getVariables();
                for ( int j = 0; j < vars.length; j++ ) {
                    IVariable var = vars[j];
                    if ("id".equals(var.getName())) {
                        id = var.getValue().getValueString();
                    }
View Full Code Here

    // If variable is already expanded, just return.
    if (expandableVar.expanded) {
      return null;
    }

    IJavaValue value = expandableVar.value;
    List<String> results = new ArrayList<String>();
    // Suppress any exception. No point in letting it propagate
    try {
      process(value.getVariables(), results, expandableVar.depth + 1);

      // Mark as expanded.
      expandableVar.expanded = true;
    } catch (DebugException e) {
      logger.error("Unable to get variables", e);
View Full Code Here

        logger.debug("No variable value found with ID: " + valueId);
      }
      return ViewUtils.UNKNOWN;
    }

    IJavaValue value = expandableVar.value;
    if (value instanceof IJavaObject) {
      IJavaValue toStrValue = ((IJavaObject) value).sendMessage(
          toStringSelector,
          toStringSig,
          null,
          viewingThread,
          false);

      return toStrValue == null ? ViewUtils.UNKNOWN : toStrValue.getValueString();
    } else {
      return ViewUtils.UNKNOWN;
    }
  }
View Full Code Here

    String varLabel = ViewUtils.UNKNOWN;
    try {
      varLabel = var.getName();
    } catch (DebugException exception) {}

    IJavaValue javaValue = null;
    try {
      javaValue = (IJavaValue) var.getValue();
    } catch (DebugException e1) {}

    StringBuilder buff = new StringBuilder();
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.debug.core.IJavaValue

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.