本文整理匯總了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;
}
示例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;
}
示例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);
}
示例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);
}
示例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;
}
示例6: shouldRunProgress
import com.intellij.openapi.util.Comparing; //導入方法依賴的package包/類
protected boolean shouldRunProgress() {
return myLastRoots == null || !Comparing.haveEqualElements(myLastRoots, getRoots());
}