當前位置: 首頁>>代碼示例>>Java>>正文


Java Comparing.haveEqualElements方法代碼示例

本文整理匯總了Java中com.intellij.openapi.util.Comparing.haveEqualElements方法的典型用法代碼示例。如果您正苦於以下問題:Java Comparing.haveEqualElements方法的具體用法?Java Comparing.haveEqualElements怎麽用?Java Comparing.haveEqualElements使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.openapi.util.Comparing的用法示例。


在下文中一共展示了Comparing.haveEqualElements方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: checkIfProjectLogMatches

import com.intellij.openapi.util.Comparing; //導入方法依賴的package包/類
private static boolean checkIfProjectLogMatches(@NotNull Project project,
                                                @NotNull GitVcs vcs,
                                                @NotNull ContentManager cm,
                                                @NotNull List<VirtualFile> requestedRoots) {
  VirtualFile[] projectRoots = ProjectLevelVcsManager.getInstance(project).getRootsUnderVcs(vcs);
  if (Comparing.haveEqualElements(requestedRoots, Arrays.asList(projectRoots))) {
    Content[] contents = cm.getContents();
    for (Content content : contents) {
      if (VcsLogContentProvider.TAB_NAME.equals(content.getDisplayName())) {
        cm.setSelectedContent(content);
        return true;
      }
    }
  }
  return false;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:17,代碼來源:GitShowExternalLogAction.java

示例2: add

import com.intellij.openapi.util.Comparing; //導入方法依賴的package包/類
public boolean add(ThreadState state) {
  if (myOriginalState.isEDT()) return false;
  if (!Comparing.equal(state.myState, myOriginalState.myState)) return false;
  if (state.myEmptyStackTrace != myOriginalState.myEmptyStackTrace) return false;
  if (state.isDaemon != myOriginalState.isDaemon) return false;
  if (!Comparing.equal(state.myJavaThreadState, myOriginalState.myJavaThreadState)) return false;
  if (!Comparing.equal(state.myThreadStateDetail, myOriginalState.myThreadStateDetail)) return false;
  if (!Comparing.equal(state.myExtraState, myOriginalState.myExtraState)) return false;
  if (!Comparing.haveEqualElements(state.myThreadsWaitingForMyLock, myOriginalState.myThreadsWaitingForMyLock)) return false;
  if (!Comparing.haveEqualElements(state.myDeadlockedThreads, myOriginalState.myDeadlockedThreads)) return false;
  if (!Comparing.equal(getMergeableStackTrace(state.myStackTrace, true), getMergeableStackTrace(myOriginalState.myStackTrace, true))) return false;
  myCounter++;
  return true;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:15,代碼來源:ThreadState.java

示例3: MultipleChangeListBrowser

import com.intellij.openapi.util.Comparing; //導入方法依賴的package包/類
public MultipleChangeListBrowser(final Project project, final List<? extends ChangeList> changeLists, final List<Change> changes,
                                 Disposable parentDisposable,
                                 final ChangeList initialListSelection,
                                 final boolean capableOfExcludingChanges,
                                 final boolean highlightProblems, final Runnable rebuildListListener, @Nullable final Runnable inclusionListener,
                                 final AnAction... additionalActions) {
  super(project, changeLists, changes, initialListSelection, capableOfExcludingChanges, highlightProblems, inclusionListener, MyUseCase.LOCAL_CHANGES, null);
  myParentDisposable = parentDisposable;
  myRebuildListListener = rebuildListListener;

  myChangeListChooser = new ChangeListChooser(changeLists);
  myHeaderPanel.add(myChangeListChooser, BorderLayout.EAST);
  myShowingAllChangeLists = Comparing.haveEqualElements((List<LocalChangeList>) changeLists, ChangeListManager.getInstance(project).getChangeLists());
  ChangeListManager.getInstance(myProject).addChangeListListener(myChangeListListener);

  myExtender = new Extender(project, this, additionalActions);

  ActionManager actionManager = ActionManager.getInstance();
  final AnAction moveAction = actionManager.getAction(IdeActions.MOVE_TO_ANOTHER_CHANGE_LIST);
  actionManager.addAnActionListener(new AnActionListener.Adapter() {
    @Override
    public void afterActionPerformed(AnAction action, DataContext dataContext, AnActionEvent event) {
      if (moveAction.equals(action)) {
        rebuildList();
      }
    }
  }, myParentDisposable);

}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:30,代碼來源:MultipleChangeListBrowser.java

示例4: equals

import com.intellij.openapi.util.Comparing; //導入方法依賴的package包/類
@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (!(o instanceof ExcludesConfigurationState)) return false;

  ExcludesConfigurationState state = (ExcludesConfigurationState)o;
  return myDetectionEnabled == state.myDetectionEnabled && Comparing.haveEqualElements(myFiles, state.myFiles)
         && Comparing.haveEqualElements(myFrameworkTypes, state.myFrameworkTypes);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:10,代碼來源:ExcludesConfigurationState.java

示例5: checkIfAlreadyOpened

import com.intellij.openapi.util.Comparing; //導入方法依賴的package包/類
private static boolean checkIfAlreadyOpened(@NotNull ContentManager cm, @NotNull Collection<VirtualFile> roots) {
  for (Content content : cm.getContents()) {
    final JComponent component = content.getComponent();
    if (component instanceof MyContentComponent) {
      if (Comparing.haveEqualElements(roots, ((MyContentComponent)component).myRoots)) {
        cm.setSelectedContent(content);
        return true;
      }
    }
  }
  return false;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:13,代碼來源:GitShowExternalLogAction.java

示例6: shouldRunProgress

import com.intellij.openapi.util.Comparing; //導入方法依賴的package包/類
protected boolean shouldRunProgress() {
  return myLastRoots == null || !Comparing.haveEqualElements(myLastRoots, getRoots());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:4,代碼來源:FrameworkDetectionStep.java


注:本文中的com.intellij.openapi.util.Comparing.haveEqualElements方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。