List<ProjectWindowAction> (String projectName) { List<ProjectWindowAction> result = null; final AnAction[] children = getChildren(null); for (AnAction child : children) { if (!(child instanceof ProjectWindowAction windowAction)) { continue; } if (projectName.equals(windowAction.getProjectName())) { if (result == null) { result = new ArrayList<>(); } result.add(windowAction); } } if (result == null) { return Collections.emptyList(); } return result; }