예제 #1
0
  public void addProgress(@NotNull ProgressIndicatorEx original, @NotNull TaskInfo info) {
    synchronized (myOriginals) {
      final boolean veryFirst = !hasProgressIndicators();

      myOriginals.add(original);
      myInfos.add(info);

      final InlineProgressIndicator expanded = createInlineDelegate(info, original, false);
      final InlineProgressIndicator compact = createInlineDelegate(info, original, true);

      myPopup.addIndicator(expanded);
      myProgressIcon.resume();

      if (veryFirst && !myPopup.isShowing()) {
        buildInInlineIndicator(compact);
      } else {
        buildInProcessCount();
        if (myInfos.size() > 1 && Registry.is("ide.windowSystem.autoShowProcessPopup")) {
          openProcessPopup(false);
        }
      }

      runQuery();
    }
  }
예제 #2
0
 public Collection<Item> getSelection() {
   ArrayList<Item> result = new ArrayList<Item>();
   int[] selectedRows = getSelectedRows();
   if (selectedRows == null) return result;
   final List<Item> items = getItems();
   if (!items.isEmpty()) {
     for (int selectedRow : selectedRows) {
       final int modelIndex = convertRowIndexToModel(selectedRow);
       if (modelIndex >= 0 && modelIndex < items.size()) {
         result.add(items.get(modelIndex));
       }
     }
   }
   return result;
 }