mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs] simplify: extract method
This commit is contained in:
+9
-6
@@ -395,15 +395,11 @@ public class PatchApplier<BinaryType extends FilePatch> {
|
||||
new Consumer<VcsDirtyScopeManager>() {
|
||||
@Override
|
||||
public void consume(final VcsDirtyScopeManager vcsDirtyScopeManager) {
|
||||
vcsDirtyScopeManager.filePathsDirty(directlyAffected, null);
|
||||
vcsDirtyScopeManager.filesDirty(indirectlyAffected, null);
|
||||
markDirty(vcsDirtyScopeManager, directlyAffected, indirectlyAffected);
|
||||
}
|
||||
}, null);
|
||||
} else {
|
||||
final VcsDirtyScopeManager vcsDirtyScopeManager = VcsDirtyScopeManager.getInstance(project);
|
||||
// will schedule update
|
||||
vcsDirtyScopeManager.filePathsDirty(directlyAffected, null);
|
||||
vcsDirtyScopeManager.filesDirty(indirectlyAffected, null);
|
||||
markDirty(VcsDirtyScopeManager.getInstance(project), directlyAffected, indirectlyAffected);
|
||||
if (context != null) {
|
||||
context.ping();
|
||||
}
|
||||
@@ -412,6 +408,13 @@ public class PatchApplier<BinaryType extends FilePatch> {
|
||||
});
|
||||
}
|
||||
|
||||
private static void markDirty(@NotNull VcsDirtyScopeManager vcsDirtyScopeManager,
|
||||
@NotNull Collection<FilePath> directlyAffected,
|
||||
@NotNull Collection<VirtualFile> indirectlyAffected) {
|
||||
vcsDirtyScopeManager.filePathsDirty(directlyAffected, null);
|
||||
vcsDirtyScopeManager.filesDirty(indirectlyAffected, null);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private ApplyPatchStatus actualApply(final PathsVerifier<BinaryType> verifier, final CommitContext commitContext) {
|
||||
final List<Pair<VirtualFile, ApplyTextFilePatch>> textPatches = verifier.getTextPatches();
|
||||
|
||||
Reference in New Issue
Block a user