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