This commit is contained in:
Vladimir Krivosheev
2014-09-25 12:47:37 +02:00
parent 28342ab790
commit 4ee1f6d781
3 changed files with 9 additions and 6 deletions
@@ -36,6 +36,6 @@ public interface MergeProvider2 extends MergeProvider {
* @return the merge session instance.
*/
@NotNull
MergeSession createMergeSession(List<VirtualFile> files);
MergeSession createMergeSession(@NotNull List<VirtualFile> files);
}
@@ -17,6 +17,7 @@ package com.intellij.openapi.vcs.merge;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.ui.ColumnInfo;
import org.jetbrains.annotations.NotNull;
/**
* Represents the state of a multiple file merge operation.
@@ -36,6 +37,7 @@ public interface MergeSession {
*
* @return the list of columns, or an empty list if no additional columns should be displayed.
*/
@NotNull
ColumnInfo[] getMergeInfoColumns();
/**
@@ -44,7 +46,7 @@ public interface MergeSession {
* @param file a file shown in the dialog.
* @return true if the merge dialog can be shown, false otherwise.
*/
boolean canMerge(VirtualFile file);
boolean canMerge(@NotNull VirtualFile file);
/**
* Called when the user executes one of the resolve actions (merge, accept yours, accept theirs) for
@@ -54,6 +56,6 @@ public interface MergeSession {
* @param file the conflicting file.
* @param resolution the used resolution.
*/
void conflictResolvedForFile(VirtualFile file, Resolution resolution);
void conflictResolvedForFile(@NotNull VirtualFile file, @NotNull Resolution resolution);
}
@@ -223,7 +223,7 @@ public class GitMergeProvider implements MergeProvider2 {
@Override
@NotNull
public MergeSession createMergeSession(List<VirtualFile> files) {
public MergeSession createMergeSession(@NotNull List<VirtualFile> files) {
return new MyMergeSession(files);
}
@@ -309,19 +309,20 @@ public class GitMergeProvider implements MergeProvider2 {
}
}
@NotNull
@Override
public ColumnInfo[] getMergeInfoColumns() {
return new ColumnInfo[]{new StatusColumn(false), new StatusColumn(true)};
}
@Override
public boolean canMerge(VirtualFile file) {
public boolean canMerge(@NotNull VirtualFile file) {
Conflict c = myConflicts.get(file);
return c != null;
}
@Override
public void conflictResolvedForFile(VirtualFile file, Resolution resolution) {
public void conflictResolvedForFile(VirtualFile file, @NotNull Resolution resolution) {
Conflict c = myConflicts.get(file);
assert c != null : "Conflict was not loaded for the file: " + file.getPath();
try {