Examples of IVariable


Examples of net.sf.jmd.metarepresentation.IVariable

        if (!(other instanceof Variable)) {
            return false;
        }

        boolean superEquals = super.equals(other);
        IVariable otherVariable = (IVariable) other;

        boolean valueEqual = this.value.equals(otherVariable.getValue());
           
        result = (superEquals && valueEqual);

        return result;
    }
View Full Code Here

Examples of net.sf.jmd.metarepresentation.IVariable

        if (!(other instanceof Variable)) {
            return false;
        }

        boolean superEquals = super.equals(other);
        IVariable otherVariable = (IVariable) other;

        boolean valueEqual = this.value.equals(otherVariable.getValue());
           
        result = (superEquals && valueEqual);

        return result;
    }
View Full Code Here

Examples of org.destecs.core.contract.IVariable

  private void checkStepStructVariableSize(StepStruct ctResult,
      Simulator simulator) throws SimulationException
  {

    IVariable varTarget = null;
    int varSize = -1;
    for (StepStructoutputsStruct elem : ctResult.outputs)
    {
      for (IVariable var : contract.getVariables())
      {
        if (var.getName().equals(elem.name))
        {
          varTarget = var;
          varSize = calculateSizeFromShape(varTarget.getDimensions());
          break;
        }
      }

      if (varTarget != null && elem.value.size() != varSize)
      {
        engineInfo(simulator, elem.name + " expected matrix size: "
            + varSize + " in shape: (" + varTarget.getDimensions()
            + ") but received: " + elem.value.size() + "elements");
        throw new SimulationException(simulator, "Variable "
            + elem.name + " does not have the appropriate size");
      }
    }
View Full Code Here

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

                String key = null;
                IJavaValue value = null;
               
                IVariable[] vars = mapEntry.getVariables();
                for ( int j = 0; j < vars.length; j++ ) {
                    IVariable var = vars[i];
                    if ("key".equals(var.getName())) {
                        key = var.getValue().getValueString();
                    } else if ("value".equals(var.getName())) {
                        value = (IJavaValue) var.getValue();
                    }
                }
                result.add(new VariableWrapper(key, value));
            }
            return (IVariable[]) result.toArray(new IVariable[0]);
View Full Code Here

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

        this.showLogical = showLogical;
    }

    protected void setViewerInput(IStructuredSelection ssel) {
        IJavaStackFrame frame = null;
        IVariable variable = null;
        if (ssel.size() == 1) {
            Object input = ssel.getFirstElement();
            if (input instanceof IJavaStackFrame) {
                frame = (IJavaStackFrame) input;
            } else if (input instanceof IVariable) {
                variable = (IVariable) input;
            }
        }

        getDetailViewer().setEditable(frame != null || variable != null);

        Object current = getViewer().getInput();
       
        // if the debug view stack still contains the same WorkingMemoryImpl, do nothing
        if (current != null) {
            ISelection stackSelection = getSite().getPage().getSelection(IDebugUIConstants.ID_DEBUG_VIEW);
            if (stackSelection instanceof IStructuredSelection) {
                Object stack = ((IStructuredSelection) stackSelection).getFirstElement();
                if (stack instanceof IJavaStackFrame) {
                    try {
                        IJavaObject stackObj = ((IJavaStackFrame) stack).getThis();
                        if (current.equals(stackObj)) {
                            return;
                        }
                    } catch (Throwable t) {
                        // do nothing
                    }
                }
            }
        }

        if (current == null && frame == null && variable == null) {
            return;
        }

        if (current != null) {
            try {
                if ((frame != null && current.equals(frame.getThis()))
                        || (variable != null && current.equals(variable.getValue()))) {
                    return;
                }
            } catch (Throwable t) {
                // do nothing
            }
        }

        if (current != null) {
            fLastState = getViewerState();
            fSelectionStates.put(current, fLastState);
        }

        if (frame != null) {
            setDebugModel(frame.getModelIdentifier());
        } else if (variable != null) {
            setDebugModel(variable.getModelIdentifier());
        }

        showViewer();
       
        Object input = null;
        if (frame != null) {
            try {
                IJavaObject stackObj = frame.getThis();
                if ((stackObj != null)
                        && (stackObj.getJavaType() != null)
                        && ("org.drools.reteoo.WorkingMemoryImpl".equals(
                            stackObj.getJavaType().getName()))) {
                    input = stackObj;
                }
            } catch (Throwable t) {
                DroolsIDEPlugin.log(t);
            }
        } else if (variable != null) {
            try {
                IValue value = variable.getValue();
                if (value != null && value instanceof IJavaObject
                        && "org.drools.reteoo.WorkingMemoryImpl".equals(
                            variable.getValue().getReferenceTypeName())) {
                    input = (IJavaObject) value;
                }
            } catch (Throwable t) {
                DroolsIDEPlugin.log(t);
            }
View Full Code Here

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

            presentation.removeListener(listener);
        }

        public Color getForeground(Object element) {
            if (element instanceof IVariable) {
                IVariable variable = (IVariable) element;
                try {
                    if (variable.hasValueChanged()) {
                        return JFaceResources.getColorRegistry()
                            .get(IDebugPreferenceConstants.CHANGED_VARIABLE_COLOR);
                    }
                } catch (DebugException e) {
                    DroolsIDEPlugin.log(e);
View Full Code Here

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

        IJavaValue[] javaValues = ruleParameters.getValues();
        for ( int j = 0; j < javaValues.length; j++ ) {
            IJavaValue declaration = javaValues[j];
            IVariable[] vars = declaration.getVariables();
            for ( int k = 0; k < vars.length; k++ ) {
                IVariable declarationVar = vars[k];
                if ("identifier".equals(declarationVar.getName())) {
                    String paramName = declarationVar.getValue().getValueString();
                    variables[i++] = new VariableWrapper(paramName, (IJavaValue) DebugUtil.getValueByExpression("return getTuple().get(getRule().getParameterDeclaration(\"" + paramName + "\"));", value));
                    break;
                }               
            }           
        }
View Full Code Here

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

            for (int j = 0; j < children.length; j++) {
                Item child = children[j];
                Object data = child.getData();
                String name = null;
                if (data instanceof IVariable) {
                    IVariable var = (IVariable) data;
                    name = var.getName();
                } else if (data instanceof IRegisterGroup) {
                    IRegisterGroup  registerGroup = (IRegisterGroup) data;
                    name = registerGroup.getName();
                }
               
View Full Code Here

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

        IJavaValue[] javaValues = ruleParameters.getValues();
        for ( int j = 0; j < javaValues.length; j++ ) {
            IJavaValue declaration = javaValues[j];
            IVariable[] vars = declaration.getVariables();
            for ( int k = 0; k < vars.length; k++ ) {
                IVariable declarationVar = vars[k];
                if ("identifier".equals(declarationVar.getName())) {
                    String paramName = declarationVar.getValue().getValueString();
                    IJavaValue varValue = (IJavaValue) DebugUtil.getValueByExpression("return getRule().getDeclaration(\"" + paramName + "\").getValue(((org.drools.core.common.InternalFactHandle) getTuple().get(getRule().getDeclaration(\"" + paramName + "\"))).getObject());", value);
                    if (varValue != null) {
                        variables.add(new VariableWrapper(paramName, varValue));
                    }
                    break;
View Full Code Here

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

                IJavaValue agendaGroup = agendaGroupValueArray[i];
                String name = "";
                List activationsResult = new ArrayList();
                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();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.