From 4ee1f6d781b06d332cd535dc06d445cc5b79ad27 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Thu, 25 Sep 2014 09:58:17 +0200 Subject: [PATCH] NotNull --- .../src/com/intellij/openapi/vcs/merge/MergeProvider2.java | 2 +- .../src/com/intellij/openapi/vcs/merge/MergeSession.java | 6 ++++-- plugins/git4idea/src/git4idea/merge/GitMergeProvider.java | 7 ++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/merge/MergeProvider2.java b/platform/vcs-api/src/com/intellij/openapi/vcs/merge/MergeProvider2.java index 628508ee4a66..c0f397a1335c 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/merge/MergeProvider2.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/merge/MergeProvider2.java @@ -36,6 +36,6 @@ public interface MergeProvider2 extends MergeProvider { * @return the merge session instance. */ @NotNull - MergeSession createMergeSession(List files); + MergeSession createMergeSession(@NotNull List files); } diff --git a/platform/vcs-api/src/com/intellij/openapi/vcs/merge/MergeSession.java b/platform/vcs-api/src/com/intellij/openapi/vcs/merge/MergeSession.java index 2036750e10fb..41ff125889d3 100644 --- a/platform/vcs-api/src/com/intellij/openapi/vcs/merge/MergeSession.java +++ b/platform/vcs-api/src/com/intellij/openapi/vcs/merge/MergeSession.java @@ -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); } diff --git a/plugins/git4idea/src/git4idea/merge/GitMergeProvider.java b/plugins/git4idea/src/git4idea/merge/GitMergeProvider.java index d7ccef902af9..a50f68a674e3 100644 --- a/plugins/git4idea/src/git4idea/merge/GitMergeProvider.java +++ b/plugins/git4idea/src/git4idea/merge/GitMergeProvider.java @@ -223,7 +223,7 @@ public class GitMergeProvider implements MergeProvider2 { @Override @NotNull - public MergeSession createMergeSession(List files) { + public MergeSession createMergeSession(@NotNull List 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 {