コード例 #1
0
 private Breakpoint createBreakpoint(String category, Element breakpointNode)
     throws InvalidDataException {
   XBreakpoint xBreakpoint = null;
   if (category.equals(LineBreakpoint.CATEGORY.toString())) {
     xBreakpoint = createXLineBreakpoint(JavaLineBreakpointType.class, breakpointNode);
   } else if (category.equals(MethodBreakpoint.CATEGORY.toString())) {
     if (breakpointNode.getAttribute("url") != null) {
       xBreakpoint = createXLineBreakpoint(JavaMethodBreakpointType.class, breakpointNode);
     } else {
       xBreakpoint = createXBreakpoint(JavaWildcardMethodBreakpointType.class, breakpointNode);
     }
   } else if (category.equals(FieldBreakpoint.CATEGORY.toString())) {
     xBreakpoint = createXLineBreakpoint(JavaFieldBreakpointType.class, breakpointNode);
   } else if (category.equals(ExceptionBreakpoint.CATEGORY.toString())) {
     xBreakpoint = createXBreakpoint(JavaExceptionBreakpointType.class, breakpointNode);
   }
   if (xBreakpoint == null) {
     throw new IllegalStateException("Unknown breakpoint category " + category);
   }
   return myBreakpoints.get(xBreakpoint);
 }
コード例 #2
0
 public void setBreakpointDefaults(
     Key<? extends Breakpoint> category, BreakpointDefaults defaults) {
   Class typeCls = null;
   if (LineBreakpoint.CATEGORY.toString().equals(category.toString())) {
     typeCls = JavaLineBreakpointType.class;
   } else if (MethodBreakpoint.CATEGORY.toString().equals(category.toString())) {
     typeCls = JavaMethodBreakpointType.class;
   } else if (FieldBreakpoint.CATEGORY.toString().equals(category.toString())) {
     typeCls = JavaFieldBreakpointType.class;
   } else if (ExceptionBreakpoint.CATEGORY.toString().equals(category.toString())) {
     typeCls = JavaExceptionBreakpointType.class;
   }
   if (typeCls != null) {
     XBreakpointType<XBreakpoint<?>, ?> type =
         XDebuggerUtil.getInstance().findBreakpointType(typeCls);
     ((XBreakpointManagerImpl) getXBreakpointManager())
         .getBreakpointDefaults(type)
         .setSuspendPolicy(Breakpoint.transformSuspendPolicy(defaults.getSuspendPolicy()));
   }
   // myBreakpointDefaults.put(category, defaults);
 }