本文整理汇总了Java中com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer类的典型用法代码示例。如果您正苦于以下问题:Java ChangeDiffRequestProducer类的具体用法?Java ChangeDiffRequestProducer怎么用?Java ChangeDiffRequestProducer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ChangeDiffRequestProducer类属于com.intellij.openapi.vcs.changes.actions.diff包,在下文中一共展示了ChangeDiffRequestProducer类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
}
示例3: createDiffRequest
import com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer; //导入依赖的package包/类
@NotNull
public static DiffRequest createDiffRequest(@Nullable Project project,
@NotNull Change change,
@NotNull String name,
@NotNull UserDataHolder context,
@NotNull ProgressIndicator indicator)
throws DiffRequestProducerException {
ChangeDiffRequestProducer proxyProducer = ChangeDiffRequestProducer.create(project, change);
if (proxyProducer == null) throw new DiffRequestProducerException("Can't show diff for '" + name + "'");
return proxyProducer.process(context, indicator);
}
示例4: updateRequest
import com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer; //导入依赖的package包/类
@CalledInAwt
public void updateRequest(final boolean force, boolean useCache, @Nullable final ScrollToPolicy scrollToChangePolicy) {
if (isDisposed()) return;
final Change change = myCurrentChange;
DiffRequest cachedRequest = loadRequestFast(change, useCache);
if (cachedRequest != null) {
applyRequest(cachedRequest, force, scrollToChangePolicy);
return;
}
// TODO: check if current loading change is the same as we want to load now? (and not interrupt loading)
myQueue.executeAndTryWait(
new Function<ProgressIndicator, Runnable>() {
@Override
public Runnable fun(ProgressIndicator indicator) {
final DiffRequest request = loadRequest(change, indicator);
return new Runnable() {
@Override
@CalledInAwt
public void run() {
myRequestCache.put(change, Pair.create(change, request));
applyRequest(request, force, scrollToChangePolicy);
}
};
}
},
new Runnable() {
@Override
public void run() {
applyRequest(new LoadingDiffRequest(ChangeDiffRequestProducer.getRequestTitle(change)), force, scrollToChangePolicy);
}
},
ProgressWindow.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS
);
}
示例5: process
import com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer; //导入依赖的package包/类
@NotNull
@Override
public DiffRequest process(@NotNull ChangeDiffRequestProducer presentable,
@NotNull UserDataHolder context,
@NotNull ProgressIndicator indicator) throws DiffRequestProducerException, ProcessCanceledException {
indicator.checkCanceled();
return new SvnPhantomDiffRequest(presentable.getChange());
}
示例6: process
import com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer; //导入依赖的package包/类
@NotNull
@Override
public DiffRequest process(@NotNull ChangeDiffRequestProducer presentable,
@NotNull UserDataHolder context,
@NotNull ProgressIndicator indicator) throws DiffRequestProducerException, ProcessCanceledException {
return new SvnTreeConflictDiffRequest(((ConflictedSvnChange)presentable.getChange()));
}
示例7: process
import com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer; //导入依赖的package包/类
@NotNull
@Override
public DiffViewerWrapper process(@NotNull ChangeDiffRequestProducer presentable,
@NotNull UserDataHolder context,
@NotNull ProgressIndicator indicator) throws DiffRequestProducerException, ProcessCanceledException {
// TODO: support properties conflict for three-way-diff
DiffRequest propertyRequest = createPropertyRequest(presentable.getChange(), indicator);
return new SvnDiffViewerWrapper(propertyRequest);
}
示例8: createDiffRequest
import com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer; //导入依赖的package包/类
@Nonnull
public static DiffRequest createDiffRequest(@Nullable Project project,
@Nonnull Change change,
@Nonnull String name,
@Nonnull UserDataHolder context,
@Nonnull ProgressIndicator indicator)
throws DiffRequestProducerException {
ChangeDiffRequestProducer proxyProducer = ChangeDiffRequestProducer.create(project, change);
if (proxyProducer == null) throw new DiffRequestProducerException("Can't show diff for '" + name + "'");
return proxyProducer.process(context, indicator);
}
示例9: updateRequest
import com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer; //导入依赖的package包/类
@CalledInAwt
public void updateRequest(final boolean force, boolean useCache, @Nullable final ScrollToPolicy scrollToChangePolicy) {
if (isDisposed()) return;
final Change change = myCurrentChange;
DiffRequest cachedRequest = loadRequestFast(change, useCache);
if (cachedRequest != null) {
applyRequest(cachedRequest, force, scrollToChangePolicy);
return;
}
// TODO: check if current loading change is the same as we want to load now? (and not interrupt loading)
myQueue.executeAndTryWait(
new Function<ProgressIndicator, Runnable>() {
@Override
public Runnable fun(ProgressIndicator indicator) {
final DiffRequest request = loadRequest(change, indicator);
return new Runnable() {
@Override
@CalledInAwt
public void run() {
myRequestCache.put(change, Pair.create(change, request));
applyRequest(request, force, scrollToChangePolicy);
}
};
}
},
new Runnable() {
@Override
public void run() {
applyRequest(new LoadingDiffRequest(ChangeDiffRequestProducer.getRequestTitle(change)), force, scrollToChangePolicy);
}
},
ProgressWindow.DEFAULT_PROGRESS_DIALOG_POSTPONE_TIME_MILLIS
);
}
示例10: getTitle
import com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer; //导入依赖的package包/类
@Nullable
@Override
public String getTitle() {
return ChangeDiffRequestProducer.getRequestTitle(myChange);
}
示例11: canShow
import com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer; //导入依赖的package包/类
@Override
public boolean canShow(@NotNull DiffContext context, @NotNull DiffRequest request) {
if (context.getUserData(CrucibleUserDataKeys.REVIEW) == null) return false;
if (request.getUserData(ChangeDiffRequestProducer.CHANGE_KEY) == null) return false;
return SimpleDiffViewer.canShowRequest(context, request);
}