XBreakpointPackageGroup (@NotNull B breakpoint, @NotNull Collection<? extends XBreakpointPackageGroup> groups) { String packageName = null; if (breakpoint instanceof XBreakpoint) { Breakpoint javaBreakpoint = BreakpointManager.getJavaBreakpoint((XBreakpoint)breakpoint); if (javaBreakpoint != null) { packageName = javaBreakpoint.getPackageName(); } } if (packageName == null) { return null; } for (XBreakpointPackageGroup group : groups) { if (StringUtil.equals(group.getPackageName(), packageName)) { return group; } } return new XBreakpointPackageGroup(packageName); }