mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[vcs-log] add javadoc
This commit is contained in:
@@ -20,11 +20,34 @@ import com.intellij.openapi.vfs.VirtualFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* Enables showing diff between revisions and comparing file or directory state between a revision and a local version in log-based file history.
|
||||
* Methods of this class could be called from EDT, so it should deal with it appropriately by starting a background task for long operations,
|
||||
* eg for loading revisions content.
|
||||
*/
|
||||
public interface VcsLogDiffHandler {
|
||||
|
||||
/**
|
||||
* Show diff between (the after-state of) two revisions in the specified files or directories.
|
||||
*
|
||||
* @param root repository root.
|
||||
* @param leftPath path to the file on the left, null means file is missing in this revision.
|
||||
* @param leftHash hash of the revision on the left.
|
||||
* @param rightPath path to the file on the right, null means file is missing in this revision.
|
||||
* @param rightHash hash of the revision on the right.
|
||||
*/
|
||||
void showDiff(@NotNull VirtualFile root,
|
||||
@Nullable FilePath leftPath, @NotNull Hash leftHash,
|
||||
@Nullable FilePath rightPath, @NotNull Hash rightHash);
|
||||
|
||||
/**
|
||||
* Show diff between (the after-state of) specified revision and local version for the specified file or directory.
|
||||
*
|
||||
* @param root repository root.
|
||||
* @param revisionPath path to the file in the specified revision, null means file is not present in the revision.
|
||||
* @param hash hash of the revision.
|
||||
* @param localPath local path to the file.
|
||||
*/
|
||||
void showDiffWithLocal(@NotNull VirtualFile root,
|
||||
@Nullable FilePath revisionPath,
|
||||
@NotNull Hash hash, @NotNull FilePath localPath);
|
||||
|
||||
@@ -147,6 +147,11 @@ public interface VcsLogProvider {
|
||||
@Nullable
|
||||
String getCurrentBranch(@NotNull VirtualFile root);
|
||||
|
||||
/**
|
||||
* Returns {@link VcsLogDiffHandler} for this provider in order to support comparing commits and with local version from log-based file history.
|
||||
*
|
||||
* @return diff handler or null if unsupported.
|
||||
*/
|
||||
@Nullable
|
||||
VcsLogDiffHandler getDiffHandler();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user