List<AnAction> () { List<AnAction> result = new ArrayList<>(); for (Filter filter : myTreeModel.getFilters()) { result.add(new TreeActionWrapper(filter, this)); } if (myTreeModel instanceof ProvidingTreeModel) { for (NodeProvider<?> provider : ((ProvidingTreeModel)myTreeModel).getNodeProviders()) { result.add(new TreeActionWrapper(provider, this)); } } return result; }