Search in sources :

Example 26 with Location

use of org.eclipse.che.api.debug.shared.model.Location 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);
}
Also used : BreakpointImpl(org.eclipse.che.api.debug.shared.model.impl.BreakpointImpl) Matcher(java.util.regex.Matcher) LocationImpl(org.eclipse.che.api.debug.shared.model.impl.LocationImpl) Location(org.eclipse.che.api.debug.shared.model.Location)

Aggregations

Location (org.eclipse.che.api.debug.shared.model.Location)26 LocationImpl (org.eclipse.che.api.debug.shared.model.impl.LocationImpl)11 BreakpointImpl (org.eclipse.che.api.debug.shared.model.impl.BreakpointImpl)9 Test (org.testng.annotations.Test)9 Breakpoint (org.eclipse.che.api.debug.shared.model.Breakpoint)8 DebuggerException (org.eclipse.che.api.debugger.server.exceptions.DebuggerException)6 Matcher (java.util.regex.Matcher)4 BreakpointActivatedEventImpl (org.eclipse.che.api.debug.shared.model.impl.event.BreakpointActivatedEventImpl)4 ArrayList (java.util.ArrayList)3 BreakpointActivatedEvent (org.eclipse.che.api.debug.shared.model.event.BreakpointActivatedEvent)3 DebuggerEvent (org.eclipse.che.api.debug.shared.model.event.DebuggerEvent)3 SuspendEventImpl (org.eclipse.che.api.debug.shared.model.impl.event.SuspendEventImpl)3 IOException (java.io.IOException)2 SuspendEvent (org.eclipse.che.api.debug.shared.model.event.SuspendEvent)2 GdbParseException (org.eclipse.che.plugin.gdb.server.exception.GdbParseException)2 GdbTerminatedException (org.eclipse.che.plugin.gdb.server.exception.GdbTerminatedException)2 ExpressionParser (org.eclipse.che.plugin.jdb.server.expression.ExpressionParser)2 NodeJsOutput (org.eclipse.che.plugin.nodejsdbg.server.NodeJsOutput)2 JsonElement (com.google.gson.JsonElement)1 JsonObject (com.google.gson.JsonObject)1