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