當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。