use of org.eclipse.che.api.debug.shared.model.impl.LocationImpl in project che by eclipse.
the class GdbContinue method parse.
/**
* Factory method.
*/
public static GdbContinue parse(GdbOutput gdbOutput) throws GdbParseException {
String output = gdbOutput.getOutput();
for (String line : output.split("\n")) {
Matcher matcher = GDB_BREAKPOINT.matcher(line);
if (matcher.find()) {
String file = matcher.group(1);
String lineNumber = matcher.group(2);
Location location = new LocationImpl(file, Integer.parseInt(lineNumber));
return new GdbContinue(new BreakpointImpl(location));
}
}
return new GdbContinue(null);
}
use of org.eclipse.che.api.debug.shared.model.impl.LocationImpl in project che by eclipse.
the class GdbInfoLine method parse.
/**
* Factory method.
*/
public static GdbInfoLine parse(GdbOutput gdbOutput) throws GdbParseException {
String output = gdbOutput.getOutput();
Matcher matcher = GDB_INFO_LINE.matcher(output);
if (matcher.find()) {
String lineNumber = matcher.group(1);
String file = matcher.group(2);
return new GdbInfoLine(new LocationImpl(file, Integer.parseInt(lineNumber)));
}
matcher = GDB_LINE_OUT_OF_RANGE.matcher(output);
if (matcher.find()) {
String lineNumber = matcher.group(1);
String file = matcher.group(2);
return new GdbInfoLine(new LocationImpl(file, Integer.parseInt(lineNumber)));
}
throw new GdbParseException(GdbInfoLine.class, output);
}
Aggregations