protected static LineBreakpoint create(Project project, Document document, int lineIndex) {
    VirtualFile virtualFile = FileDocumentManager.getInstance().getFile(document);
    if (virtualFile == null) {
      return null;
    }

    final RangeHighlighter highlighter = createHighlighter(project, document, lineIndex);
    if (highlighter == null) {
      return null;
    }

    LineBreakpoint breakpoint = new LineBreakpoint(project, highlighter);
    return (LineBreakpoint) breakpoint.init();
  }
  @Nullable
  public LineBreakpoint addLineBreakpoint(Document document, int lineIndex) {
    ApplicationManager.getApplication().assertIsDispatchThread();
    if (!LineBreakpoint.canAddLineBreakpoint(myProject, document, lineIndex)) {
      return null;
    }
    XLineBreakpoint xLineBreakpoint =
        addXLineBreakpoint(JavaLineBreakpointType.class, document, lineIndex);
    LineBreakpoint breakpoint = LineBreakpoint.create(myProject, xLineBreakpoint);
    if (breakpoint == null) {
      return null;
    }

    addBreakpoint(breakpoint);
    return breakpoint;
  }
 public CheckedTreeNode append(CheckedTreeNode node) {
   if (!myGroupByMethods) {
     return node;
   }
   final TreeDescriptor descriptor = getDescriptor(node);
   if (!(descriptor instanceof BreakpointDescriptor)) {
     return node;
   }
   final Breakpoint breakpoint = ((BreakpointDescriptor) descriptor).getBreakpoint();
   if (!(breakpoint instanceof LineBreakpoint)) {
     return node;
   }
   final LineBreakpoint lineBreakpoint = (LineBreakpoint) breakpoint;
   final String methodName = lineBreakpoint.getMethodName();
   final String className = lineBreakpoint.getShortClassName();
   final String packageName = lineBreakpoint.getPackageName();
   if (methodName == null || className == null || packageName == null) {
     return node;
   }
   return attachNodeToParent(new MethodDescriptor(methodName, className, packageName), node);
 }
 public static LineBreakpoint create(@NotNull Project project, XBreakpoint xBreakpoint) {
   LineBreakpoint breakpoint = new LineBreakpoint(project, xBreakpoint);
   return (LineBreakpoint) breakpoint.init();
 }