public boolean isImportant() { if (myImportant != null) { return myImportant; } return getListener() != null || !ContainerUtil.isEmpty(myActions); }
public static ClassFilter[] readFilters(List<Element> children) throws InvalidDataException { if (ContainerUtil.isEmpty(children)) { return ClassFilter.EMPTY_ARRAY; } ClassFilter[] filters = new ClassFilter[children.size()]; for (int i = 0, size = children.size(); i < size; i++) { filters[i] = create(children.get(i)); } return filters; }
public void update(@NotNull AnActionEvent e) { Project project = e.getData(CommonDataKeys.PROJECT); List<VirtualFile> files = e.getData(ChangesListView.UNVERSIONED_FILES_DATA_KEY); e.getPresentation().setEnabled(project != null && !ContainerUtil.isEmpty(files)); }