Java 类com.intellij.openapi.actionSystem.ex.QuickListsManager 实例源码

项目:intellij-ce-playground    文件:QuickListPanel.java   
public void setItem(@Nullable QuickList item) {
  apply();

  this.item = item;
  if (item == null) {
    return;
  }

  myName.setText(item.getName());
  myName.setEnabled(QuickListsManager.getInstance().getSchemeManager().isMetadataEditable(item));
  myDescription.setText(item.getDescription());

  actionsModel.removeAll();
  for (String id : item.getActionIds()) {
    includeActionId(id);
  }
}
项目:intellij-ce-playground    文件:QuickListsUi.java   
@Override
public void apply(@NotNull List<QuickList> settings) throws ConfigurationException {
  itemPanel.apply();

  editor.ensureNonEmptyNames("Quick list should have non empty name");
  editor.processModifiedItems(new PairProcessor<QuickList, QuickList>() {
    @Override
    public boolean process(QuickList newItem, QuickList oldItem) {
      if (!oldItem.getName().equals(newItem.getName())) {
        keymapListener.quickListRenamed(oldItem, newItem);
      }
      return true;
    }
  });

  if (isModified(settings)) {
    java.util.List<QuickList> result = editor.apply();
    keymapListener.processCurrentKeymapChanged(result.toArray(new QuickList[result.size()]));
    QuickListsManager.getInstance().setQuickLists(result);
  }
}
项目:consulo    文件:QuickListsPanel.java   
@Override
public void reset() {
  myQuickListsModel.removeAllElements();
  for (QuickList list : QuickListsManager.getInstance().getAllQuickLists()) {
    myQuickListsModel.addElement(list);
  }

  SwingUtilities.invokeLater(new Runnable() {
    @Override
    public void run() {
      if (!myQuickListsModel.isEmpty()) {
        myQuickListsList.setSelectedIndex(0);
      }
    }
  });
}
项目:tools-idea    文件:QuickListsPanel.java   
public void reset() {
  myQuickListsModel.removeAllElements();
  QuickList[] allQuickLists = QuickListsManager.getInstance().getAllQuickLists();
  for (QuickList list : allQuickLists) {
    myQuickListsModel.addElement(list);
  }

  SwingUtilities.invokeLater(new Runnable() {
    public void run() {
      if (myQuickListsModel.size() > 0) {
        myQuickListsList.setSelectedIndex(0);
      }
    }
  });
}
项目:tools-idea    文件:QuickListsPanel.java   
public void apply() {
  QuickListsManager.getInstance().removeAllQuickLists();
  final QuickList[] currentQuickLists = getCurrentQuickListIds();
  for (QuickList quickList : currentQuickLists) {
    QuickListsManager.getInstance().registerQuickList(quickList);
  }
  QuickListsManager.getInstance().registerActions();
}
项目:intellij-ce-playground    文件:QuickListsPanel.java   
@NotNull
@Override
protected List<QuickList> getSettings() {
  return QuickListsManager.getInstance().getSchemeManager().getAllSchemes();
}
项目:intellij-ce-playground    文件:QuickListsUi.java   
@Override
public boolean isRemovable(@NotNull QuickList item) {
  return QuickListsManager.getInstance().getSchemeManager().isMetadataEditable(item);
}
项目:tools-idea    文件:QuickListsPanel.java   
public boolean isModified() {
  QuickList[] storedLists = QuickListsManager.getInstance().getAllQuickLists();
  QuickList[] modelLists = getCurrentQuickListIds();
  return !Comparing.equal(storedLists, modelLists);
}
项目:consulo    文件:QuickListsPanel.java   
@Override
public boolean isModified() {
  QuickList[] storedLists = QuickListsManager.getInstance().getAllQuickLists();
  QuickList[] modelLists = getCurrentQuickListIds();
  return !Comparing.equal(storedLists, modelLists);
}
项目:consulo    文件:QuickListsPanel.java   
@Override
public void apply() {
  QuickListsManager.getInstance().setQuickLists(getCurrentQuickListIds());
}