01: package org.drools.eclipse.debug.core;
02:
03: import org.eclipse.core.runtime.CoreException;
04: import org.eclipse.debug.core.model.IBreakpoint;
05: import org.eclipse.jdt.internal.debug.ui.JDIModelPresentation;
06:
07: public class DroolsDebugModelPresentation extends JDIModelPresentation {
08:
09: protected String getBreakpointText(IBreakpoint breakpoint) {
10: if (breakpoint instanceof DroolsLineBreakpoint) {
11: DroolsLineBreakpoint breakp = ((DroolsLineBreakpoint) breakpoint);
12: int lineNumber = breakp.getDRLLineNumber();
13: int real;
14: try {
15: real = breakp.getLineNumber();
16: } catch (CoreException e) {
17: return breakpoint.getMarker().getResource().getName()
18: + " [line: " + lineNumber + "] real: NA!!";
19: }
20: return breakpoint.getMarker().getResource().getName()
21: + " [line: " + lineNumber + "] real: " + real;
22: }
23: return super.getBreakpointText(breakpoint);
24: }
25:
26: }
|