本文整理汇总了Java中com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer.isEquals方法的典型用法代码示例。如果您正苦于以下问题:Java ChangeDiffRequestProducer.isEquals方法的具体用法?Java ChangeDiffRequestProducer.isEquals怎么用?Java ChangeDiffRequestProducer.isEquals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer
的用法示例。
在下文中一共展示了ChangeDiffRequestProducer.isEquals方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: loadRequestFast
import com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer; //导入方法依赖的package包/类
@Nullable
@CalledInAwt
@Contract("null, _ -> !null")
protected DiffRequest loadRequestFast(@Nullable Change change, boolean useCache) {
if (change == null) return NoDiffRequest.INSTANCE;
if (useCache) {
Pair<Change, DiffRequest> pair = myRequestCache.get(change);
if (pair != null) {
Change oldChange = pair.first;
if (ChangeDiffRequestProducer.isEquals(oldChange, change)) {
return pair.second;
}
}
}
if (change.getBeforeRevision() instanceof FakeRevision || change.getAfterRevision() instanceof FakeRevision) {
return new LoadingDiffRequest(ChangeDiffRequestProducer.getRequestTitle(change));
}
return null;
}
示例2: refresh
import com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer; //导入方法依赖的package包/类
@CalledInAwt
public void refresh() {
List<Change> selectedChanges = getSelectedChanges();
if (selectedChanges.isEmpty()) {
myCurrentChange = null;
updateRequest();
return;
}
Change selectedChange = myCurrentChange != null ? ContainerUtil.find(selectedChanges, myCurrentChange) : null;
if (selectedChange == null) {
myCurrentChange = selectedChanges.get(0);
updateRequest();
return;
}
if (!ChangeDiffRequestProducer.isEquals(myCurrentChange, selectedChange)) {
myCurrentChange = selectedChange;
updateRequest();
}
}