當前位置: 首頁>>代碼示例>>Java>>正文


Java ApplyPatchStatus.ALREADY_APPLIED屬性代碼示例

本文整理匯總了Java中com.intellij.openapi.diff.impl.patch.ApplyPatchStatus.ALREADY_APPLIED屬性的典型用法代碼示例。如果您正苦於以下問題:Java ApplyPatchStatus.ALREADY_APPLIED屬性的具體用法?Java ApplyPatchStatus.ALREADY_APPLIED怎麽用?Java ApplyPatchStatus.ALREADY_APPLIED使用的例子?那麽, 這裏精選的屬性代碼示例或許可以為您提供幫助。您也可以進一步了解該屬性所在com.intellij.openapi.diff.impl.patch.ApplyPatchStatus的用法示例。


在下文中一共展示了ApplyPatchStatus.ALREADY_APPLIED屬性的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getStatus

public ApplyPatchStatus getStatus() {
  if (! myNotExact.isEmpty()) {
    return ApplyPatchStatus.FAILURE;
  } else {
    if (myTransformations.isEmpty() && myHadAlreadyAppliedMet) return ApplyPatchStatus.ALREADY_APPLIED;
    boolean haveAlreadyApplied = myHadAlreadyAppliedMet;
    boolean haveTrue = false;
    for (MyAppliedData data : myTransformations.values()) {
      if (data.isHaveAlreadyApplied()) {
        haveAlreadyApplied |= true;
      } else {
        haveTrue = true;
      }
    }
    if (haveAlreadyApplied && ! haveTrue) return ApplyPatchStatus.ALREADY_APPLIED;
    if (haveAlreadyApplied) return ApplyPatchStatus.PARTIAL;
    return ApplyPatchStatus.SUCCESS;
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:19,代碼來源:GenericPatchApplier.java

示例2: getApplyPatchStatus

@CalledInAwt
@Nonnull
private ApplyPatchStatus getApplyPatchStatus(@Nonnull final TriggerAdditionOrDeletion trigger) {
  final Ref<ApplyPatchStatus> refStatus = Ref.create(null);
  try {
    setConfirmationToDefault();
    CommandProcessor.getInstance().executeCommand(myProject, new Runnable() {
      @Override
      public void run() {
        //consider pre-check status only if not successful, otherwise we could not detect already applied status
        if (createFiles() != ApplyPatchStatus.SUCCESS) {
          refStatus.set(createFiles());
        }
        addSkippedItems(trigger);
        trigger.prepare();
        refStatus.set(ApplyPatchStatus.and(refStatus.get(), executeWritable()));
      }
    }, VcsBundle.message("patch.apply.command"), null);
  }
  finally {
    returnConfirmationBack();
    VcsFileListenerContextHelper.getInstance(myProject).clearContext();
  }
  final ApplyPatchStatus status = refStatus.get();
  return status == null ? ApplyPatchStatus.ALREADY_APPLIED : status;
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:26,代碼來源:PatchApplier.java

示例3: nonWriteActionPreCheck

public ApplyPatchStatus nonWriteActionPreCheck() {
  final boolean value = myVerifier.nonWriteActionPreCheck();
  if (! value) return ApplyPatchStatus.FAILURE;

  final List<FilePatch> skipped = myVerifier.getSkipped();
  final boolean applyAll = skipped.isEmpty();
  myPatches.removeAll(skipped);
  return applyAll ? ApplyPatchStatus.SUCCESS : ((skipped.size() == myPatches.size()) ? ApplyPatchStatus.ALREADY_APPLIED : ApplyPatchStatus.PARTIAL) ;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:9,代碼來源:PatchApplier.java

示例4: nonWriteActionPreCheck

@Nonnull
public ApplyPatchStatus nonWriteActionPreCheck() {
  final List<FilePatch> failedPreCheck = myVerifier.nonWriteActionPreCheck();
  myFailedPatches.addAll(failedPreCheck);
  myPatches.removeAll(failedPreCheck);
  final List<FilePatch> skipped = myVerifier.getSkipped();
  final boolean applyAll = skipped.isEmpty();
  myPatches.removeAll(skipped);
  if (!failedPreCheck.isEmpty()) return ApplyPatchStatus.FAILURE;
  return applyAll
         ? ApplyPatchStatus.SUCCESS
         : ((skipped.size() == myPatches.size()) ? ApplyPatchStatus.ALREADY_APPLIED : ApplyPatchStatus.PARTIAL);
}
 
開發者ID:consulo,項目名稱:consulo,代碼行數:13,代碼來源:PatchApplier.java


注:本文中的com.intellij.openapi.diff.impl.patch.ApplyPatchStatus.ALREADY_APPLIED屬性示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。