AnAction[] (Project project, final Runnable update) { if (ProjectViewDirectoryHelper.getInstance(project).supportsHideEmptyMiddlePackages()) { return new AnAction[]{new CompactEmptyMiddlePackagesAction(update)}; } return AnAction.EMPTY_ARRAY; }