当前位置: 首页>>代码示例>>Java>>正文


Java ChangeDiffRequestProducer类代码示例

本文整理汇总了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;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:CacheChangeProcessor.java

示例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();
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:CacheChangeProcessor.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:PatchDiffRequestFactory.java

示例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
  );
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:37,代码来源:CacheChangeProcessor.java

示例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());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:SvnPhantomChangeDiffRequestProvider.java

示例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()));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:SvnTreeConflictDiffRequestProvider.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:SvnChangeDiffViewerProvider.java

示例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);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:12,代码来源:PatchDiffRequestFactory.java

示例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
  );
}
 
开发者ID:consulo,项目名称:consulo,代码行数:37,代码来源:CacheChangeProcessor.java

示例10: getTitle

import com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer; //导入依赖的package包/类
@Nullable
@Override
public String getTitle() {
  return ChangeDiffRequestProducer.getRequestTitle(myChange);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:SvnPhantomChangeDiffRequestProvider.java

示例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);
}
 
开发者ID:ktisha,项目名称:Crucible4IDEA,代码行数:7,代码来源:CommentsDiffTool.java


注:本文中的com.intellij.openapi.vcs.changes.actions.diff.ChangeDiffRequestProducer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。