本文整理汇总了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());
}