コード例 #1
0
  @Test(dataProvider = "parse")
  public void testParse(String output, String script, int line) throws Exception {
    NodeJsOutput nodeJsOutput = NodeJsOutput.of(output);

    Location location = parser.parse(nodeJsOutput);

    assertEquals(location.getTarget(), script);
    assertEquals(location.getLineNumber(), line);
  }
コード例 #2
0
ファイル: JavaDebugger.java プロジェクト: yanxch/che
 @Override
 public void deleteBreakpoint(Location location) throws DebuggerException {
   final String className = location.getTarget();
   final int lineNumber = location.getLineNumber();
   EventRequestManager requestManager = getEventManager();
   List<BreakpointRequest> snapshot = new ArrayList<>(requestManager.breakpointRequests());
   for (BreakpointRequest breakpointRequest : snapshot) {
     com.sun.jdi.Location jdiLocation = breakpointRequest.location();
     if (jdiLocation.declaringType().name().equals(className)
         && jdiLocation.lineNumber() == lineNumber) {
       requestManager.deleteEventRequest(breakpointRequest);
       LOG.debug("Delete breakpoint: {}", location);
     }
   }
 }