@NotNull private static ColumnInfo[] cols(int cols) { ColumnInfo<UsageNode, UsageNode> o = new ColumnInfo<UsageNode, UsageNode>("") { @Nullable @Override public UsageNode valueOf(UsageNode node) { return node; } }; List<ColumnInfo<UsageNode, UsageNode>> list = Collections.nCopies(cols, o); return list.toArray(new ColumnInfo[list.size()]); }
@NotNull private static List<UsageNode> collectData( @NotNull List<Usage> usages, @NotNull Collection<UsageNode> visibleNodes, @NotNull UsageViewImpl usageView, @NotNull UsageViewPresentation presentation) { @NotNull List<UsageNode> data = new ArrayList<UsageNode>(); int filtered = filtered(usages, usageView); if (filtered != 0) { data.add(createStringNode(UsageViewBundle.message("usages.were.filtered.out", filtered))); } data.addAll(visibleNodes); if (data.isEmpty()) { String progressText = UsageViewManagerImpl.getProgressTitle(presentation); data.add(createStringNode(progressText)); } Collections.sort(data, USAGE_NODE_COMPARATOR); return data; }