SelectInTarget (@NotNull String id, Project project) { SelectInManager manager = project == null || project.isDisposed() ? null : getInstance(project); List<SelectInTarget> targets = manager == null ? null : manager.getTargetList(); if (targets != null) { for (SelectInTarget target : targets) { if (target != null && Objects.equals(id, target.getToolWindowId())) { return target; } } } return null; }