Examples of IJavaVariable


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

          JDIDebugPlugin.getUniqueIdentifier(), IStatus.OK,
          InstructionsEvaluationMessages.PushFieldVariable_0, null));
    }
    IJavaObject receiver = (IJavaObject) value;

    IJavaVariable field = null;

    if (fDeclaringTypeSignature == null) {
      field = ((JDIObjectValue) receiver).getField(fName,
          fSuperClassLevel);
    } else {
View Full Code Here

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

  /**
   * Group statics and instance variables, sort alphabetically within each
   * group.
   */
  protected int sortChildren(Object a, Object b) {
    IJavaVariable v1 = (IJavaVariable) a;
    IJavaVariable v2 = (IJavaVariable) b;

    try {
      boolean v1isStatic = v1.isStatic();
      boolean v2isStatic = v2.isStatic();
      if (v1isStatic && !v2isStatic) {
        return -1;
      }
      if (!v1isStatic && v2isStatic) {
        return 1;
      }
      return v1.getName().compareToIgnoreCase(v2.getName());
    } catch (DebugException de) {
      logError(de);
      return -1;
    }
  }
View Full Code Here

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

  public IJavaVariable findVariable(String varName) throws DebugException {
    if (isNative()) {
      return null;
    }
    IVariable[] variables = getVariables();
    IJavaVariable thisVariable = null;
    for (IVariable variable : variables) {
      IJavaVariable var = (IJavaVariable) variable;
      if (var.getName().equals(varName)) {
        return var;
      }
      if (var instanceof JDIThisVariable) {
        // save for later - check for instance and static variables
        thisVariable = var;
      }
    }

    if (thisVariable != null) {
      IVariable[] thisChildren = thisVariable.getValue().getVariables();
      for (IVariable element : thisChildren) {
        IJavaVariable var = (IJavaVariable) element;
        if (var.getName().equals(varName)) {
          return var;
        }
      }
    }
View Full Code Here

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

   */
  public IJavaVariable findVariable(String varName) throws DebugException {
    IThread[] threads = getThreads();
    for (IThread thread2 : threads) {
      IJavaThread thread = (IJavaThread) thread2;
      IJavaVariable var = thread.findVariable(varName);
      if (var != null) {
        return var;
      }
    }
    return null;
View Full Code Here

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

  /*
   * @see Instruction#execute()
   */
  @Override
  public void execute() throws CoreException {
    IJavaVariable variable = (IJavaVariable) pop();

    switch (fVariableTypeId) {
    case T_byte:
      variable.setValue(newValue((byte) (((IJavaPrimitiveValue) variable
          .getValue()).getByteValue() + 1)));
      break;
    case T_short:
      variable.setValue(newValue((short) (((IJavaPrimitiveValue) variable
          .getValue()).getShortValue() + 1)));
      break;
    case T_char:
      variable.setValue(newValue((char) (((IJavaPrimitiveValue) variable
          .getValue()).getCharValue() + 1)));
      break;
    case T_int:
      variable.setValue(newValue(((IJavaPrimitiveValue) variable
          .getValue()).getIntValue() + 1));
      break;
    case T_long:
      variable.setValue(newValue(((IJavaPrimitiveValue) variable
          .getValue()).getLongValue() + 1));
      break;
    case T_float:
      variable.setValue(newValue(((IJavaPrimitiveValue) variable
          .getValue()).getFloatValue() + 1));
      break;
    case T_double:
      variable.setValue(newValue(((IJavaPrimitiveValue) variable
          .getValue()).getDoubleValue() + 1));
      break;
    }

    push(variable.getValue());
  }
View Full Code Here

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

  @Override
  public void execute() throws CoreException {
    IJavaType receiver = getType(fQualifiedTypeName);

    IJavaVariable field = null;

    if (receiver instanceof IJavaInterfaceType) {
      field = ((IJavaInterfaceType) receiver).getField(fFieldName);
    } else if (receiver instanceof IJavaClassType) {
      field = ((IJavaClassType) receiver).getField(fFieldName);
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.