XBreakpointFileGroup (@NotNull final B breakpoint, @NotNull final Collection<? extends XBreakpointFileGroup> groups) { if (!(breakpoint instanceof XLineBreakpoint)) { return null; } XSourcePosition position = ((XLineBreakpoint<?>)breakpoint).getSourcePosition(); if (position == null) return null; VirtualFile file = position.getFile(); for (XBreakpointFileGroup group : groups) { if (group.getFile().equals(file)) { return group; } } return new XBreakpointFileGroup(file); }