1 19 package org.netbeans.api.debugger.jpda; 20 21 import java.beans.PropertyChangeListener ; 22 import java.beans.PropertyChangeSupport ; 23 24 import com.sun.jdi.request.StepRequest; 25 26 31 public abstract class JPDAStep { 32 private int size; 33 private int depth; 34 private boolean hidden; 35 36 protected JPDADebugger debugger; 37 private PropertyChangeSupport pcs; 38 39 40 public static final int STEP_INTO = StepRequest.STEP_INTO; 41 42 public static final int STEP_OVER = StepRequest.STEP_OVER; 43 44 public static final int STEP_OUT = StepRequest.STEP_OUT; 45 46 public static final int STEP_LINE = StepRequest.STEP_LINE; 47 48 public static final int STEP_OPERATION = 10; 49 50 public static final int STEP_MIN = StepRequest.STEP_MIN; 51 52 public static final String PROP_STATE_EXEC = "exec"; 53 54 62 public JPDAStep(JPDADebugger debugger, int size, int depth) { 63 this.size = size; 64 this.depth = depth; 65 this.debugger = debugger; 66 this.hidden = false; 67 pcs = new PropertyChangeSupport (this); 68 } 69 70 71 public void setHidden(boolean hidden) { 72 this.hidden = hidden; 73 } 74 75 80 public boolean getHidden() { 81 return hidden; 82 } 83 84 87 public void setSize(int size) { 88 this.size = size; 89 } 90 91 96 public int getSize() { 97 return size; 98 } 99 100 103 public void setDepth(int depth) { 104 this.depth = depth; 105 } 106 107 112 public int getDepth() { 113 return depth; 114 } 115 116 122 public abstract void addStep(JPDAThread tr); 123 124 129 public void addPropertyChangeListener (PropertyChangeListener l) { 130 pcs.addPropertyChangeListener (l); 131 } 132 133 138 public void removePropertyChangeListener (PropertyChangeListener l) { 139 pcs.removePropertyChangeListener (l); 140 } 141 142 147 public void addPropertyChangeListener (String propertyName, PropertyChangeListener l) { 148 pcs.addPropertyChangeListener (propertyName, l); 149 } 150 151 156 public void removePropertyChangeListener (String propertyName, PropertyChangeListener l) { 157 pcs.removePropertyChangeListener (propertyName, l); 158 } 159 160 163 protected void firePropertyChange (String name, Object o, Object n) { 164 pcs.firePropertyChange (name, o, n); 165 } 166 167 } 168 | Popular Tags |