本文整理汇总了Java中com.intellij.util.containers.ContainerUtil.equalsIdentity方法的典型用法代码示例。如果您正苦于以下问题:Java ContainerUtil.equalsIdentity方法的具体用法?Java ContainerUtil.equalsIdentity怎么用?Java ContainerUtil.equalsIdentity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.containers.ContainerUtil
的用法示例。
在下文中一共展示了ContainerUtil.equalsIdentity方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: logClassPathOnce
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
private void logClassPathOnce(@NotNull Project project) {
List<VirtualFile> files = GradleBuildClasspathManager.getInstance(project).getAllClasspathEntries();
if (ContainerUtil.equalsIdentity(files, myLastClassPath)) {
return;
}
myLastClassPath = files;
List<String> paths = ContainerUtil.map(files, new NotNullFunction<VirtualFile, String>() {
@NotNull
@Override
public String fun(VirtualFile vf) {
return vf.getPath();
}
});
String classPath = Joiner.on(':').join(paths);
LOG.info(String.format("Android DSL resolver classpath (project %1$s): %2$s", project.getName(), classPath));
}
示例2: updateList
import com.intellij.util.containers.ContainerUtil; //导入方法依赖的package包/类
private boolean updateList(boolean onExplicitAction, boolean reused) {
if (!ApplicationManager.getApplication().isUnitTestMode()) {
ApplicationManager.getApplication().assertIsDispatchThread();
}
checkValid();
CollectionListModel<LookupElement> listModel = getListModel();
Pair<List<LookupElement>, Integer> pair;
synchronized (myList) {
pair = myPresentableArranger.arrangeItems(this, onExplicitAction || reused);
}
List<LookupElement> items = pair.first;
Integer toSelect = pair.second;
if (toSelect == null || toSelect < 0 || items.size() > 0 && toSelect >= items.size()) {
LOG.error("Arranger " + myPresentableArranger + " returned invalid selection index=" + toSelect + "; items=" + items);
toSelect = 0;
}
myOffsets.checkMinPrefixLengthChanges(items, this);
List<LookupElement> oldModel = listModel.toList();
listModel.removeAll();
if (!items.isEmpty()) {
listModel.add(items);
}
else {
addEmptyItem(listModel);
}
updateListHeight(listModel);
myList.setSelectedIndex(toSelect);
return !ContainerUtil.equalsIdentity(oldModel, items);
}