1 11 package org.eclipse.jdt.internal.debug.core.refactoring; 12 13 import org.eclipse.core.runtime.CoreException; 14 import org.eclipse.jdt.debug.core.IJavaLineBreakpoint; 15 16 20 public abstract class LineBreakpointChange extends BreakpointChange { 21 22 private int fCharEnd, fCharStart, fLineNumber; 23 private boolean fConditionEnabled, fConditionSuspendOnTrue; 24 private String fCondition; 25 26 31 public LineBreakpointChange(IJavaLineBreakpoint breakpoint) throws CoreException { 32 super(breakpoint); 33 fCharEnd = breakpoint.getCharEnd(); 34 fCharStart = breakpoint.getCharStart(); 35 fLineNumber = breakpoint.getLineNumber(); 36 if (breakpoint.supportsCondition()) { 37 fCondition = breakpoint.getCondition(); 38 fConditionEnabled = breakpoint.isConditionEnabled(); 39 fConditionSuspendOnTrue = breakpoint.isConditionSuspendOnTrue(); 40 } 41 } 42 43 48 protected void apply(IJavaLineBreakpoint breakpoint) throws CoreException { 49 super.apply(breakpoint); 50 if (breakpoint.supportsCondition()) { 51 breakpoint.setCondition(fCondition); 52 breakpoint.setConditionEnabled(fConditionEnabled); 53 breakpoint.setConditionSuspendOnTrue(fConditionSuspendOnTrue); 54 } 55 } 56 57 60 protected int getLineNumber() { 61 return fLineNumber; 62 } 63 64 68 protected int getCharEnd() { 69 return fCharEnd; 70 } 71 72 76 protected int getCharStart() { 77 return fCharStart; 78 } 79 80 } 81 | Popular Tags |