use of org.eclipse.debug.core.model.IBreakpoint in project liferay-ide by liferay.
the class FMDebugTarget method getEnabledLineBreakpoints.
private ILineBreakpoint[] getEnabledLineBreakpoints() {
List<ILineBreakpoint> breakpoints = new ArrayList<ILineBreakpoint>();
final IBreakpointManager breakpointManager = DebugPlugin.getDefault().getBreakpointManager();
if (breakpointManager.isEnabled()) {
IBreakpoint[] fmBreakpoints = breakpointManager.getBreakpoints(getModelIdentifier());
for (IBreakpoint fmBreakpoint : fmBreakpoints) {
try {
if (fmBreakpoint instanceof ILineBreakpoint && supportsBreakpoint(fmBreakpoint) && fmBreakpoint.isEnabled()) {
breakpoints.add((ILineBreakpoint) fmBreakpoint);
}
} catch (CoreException e) {
}
}
}
return breakpoints.toArray(new ILineBreakpoint[0]);
}
use of org.eclipse.debug.core.model.IBreakpoint in project watchdog by TestRoots.
the class BreakpointCreatorTest method testCreateBreakpointHash.
@Test
public void testCreateBreakpointHash() {
IBreakpoint bp = mock(IBreakpoint.class);
Breakpoint result = BreakpointCreator.createBreakpoint(bp);
assertEquals(bp.hashCode(), result.getHash());
}
use of org.eclipse.debug.core.model.IBreakpoint in project watchdog by TestRoots.
the class BreakpointCreatorTest method testCreateBreakpointEnabled.
@Test
public void testCreateBreakpointEnabled() throws CoreException {
IBreakpoint bp = mock(IBreakpoint.class);
when(bp.isEnabled()).thenReturn(true);
Breakpoint result = BreakpointCreator.createBreakpoint(bp);
assertTrue(result.isEnabled());
}
use of org.eclipse.debug.core.model.IBreakpoint in project watchdog by TestRoots.
the class BreakpointCreatorTest method testCreateBreakpointType.
@Test
public void testCreateBreakpointType() {
IBreakpoint bp = mock(IBreakpoint.class);
Breakpoint result = BreakpointCreator.createBreakpoint(bp);
assertEquals(BreakpointType.UNDEFINED, result.getBreakpointType());
}
use of org.eclipse.debug.core.model.IBreakpoint in project watchdog by TestRoots.
the class BreakpointListener method breakpointRemoved.
@Override
public void breakpointRemoved(IBreakpoint breakpoint, IMarkerDelta delta) {
Date timestamp = new Date();
Breakpoint bp = BreakpointCreator.createBreakpoint(breakpoint);
breakpoints.remove(bp.getHash());
BreakpointRemoveEvent event = new BreakpointRemoveEvent(bp.getHash(), bp.getBreakpointType(), timestamp);
TrackingEventManager.addEvent(event);
}
Aggregations