use of org.eclipse.che.api.debug.shared.dto.action.StartActionDto in project che by eclipse.
the class AbstractDebugger method startDebugger.
protected void startDebugger(final DebugSessionDto debugSessionDto) {
List<BreakpointDto> breakpoints = new ArrayList<>();
for (Breakpoint breakpoint : breakpointManager.getBreakpointList()) {
LocationDto locationDto = dtoFactory.createDto(LocationDto.class).withLineNumber(breakpoint.getLineNumber() + 1).withResourcePath(breakpoint.getPath()).withResourceProjectPath(getProject(breakpoint.getFile()).getPath());
String target = pathToFqn(breakpoint.getFile());
if (target != null) {
locationDto.setTarget(target);
BreakpointDto breakpointDto = dtoFactory.createDto(BreakpointDto.class);
breakpointDto.setLocation(locationDto);
breakpointDto.setEnabled(true);
breakpoints.add(breakpointDto);
}
}
StartActionDto action = dtoFactory.createDto(StartActionDto.class);
action.setType(Action.TYPE.START);
action.setBreakpoints(breakpoints);
service.start(debugSessionDto.getId(), action);
}
Aggregations