diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CompositeCommittedChangesProvider.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CompositeCommittedChangesProvider.java index b6a7370ff14f..ebfa495701ec 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CompositeCommittedChangesProvider.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/committed/CompositeCommittedChangesProvider.java @@ -83,6 +83,7 @@ public class CompositeCommittedChangesProvider implements CommittedChangesProvid return getLocationFor(root); } + @Nullable public VcsCommittedListsZipper getZipper() { throw new UnsupportedOperationException(); } diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/changeBrowser/CvsCommittedChangesProvider.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/changeBrowser/CvsCommittedChangesProvider.java index d5eaf4db6a21..35b5da869a11 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/changeBrowser/CvsCommittedChangesProvider.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/changeBrowser/CvsCommittedChangesProvider.java @@ -69,6 +69,7 @@ public class CvsCommittedChangesProvider implements CachingCommittedChangesProvi return new CvsVersionFilterComponent(showDateFilter); } + @Nullable public VcsCommittedListsZipper getZipper() { return new MyZipper(); } diff --git a/plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java b/plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java index a6ce3954f6cb..10413ee592c7 100644 --- a/plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java +++ b/plugins/git4idea/src/git4idea/changes/GitCommittedChangeListProvider.java @@ -35,63 +35,40 @@ import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.AsynchConsumer; import com.intellij.util.Consumer; import git4idea.GitBranch; -import git4idea.GitFileRevision; import git4idea.GitDeprecatedRemote; +import git4idea.GitFileRevision; import git4idea.GitUtil; import git4idea.commands.GitSimpleHandler; import git4idea.history.GitHistoryUtils; import git4idea.history.browser.GitCommit; import git4idea.history.browser.SymbolicRefs; -import org.jetbrains.annotations.Nls; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; -import java.io.DataInput; -import java.io.DataOutput; import java.io.File; -import java.io.IOException; import java.util.*; /** * The provider for committed change lists */ public class GitCommittedChangeListProvider implements CommittedChangesProvider { - /** - * the logger - */ + private static final Logger LOG = Logger.getInstance(GitCommittedChangeListProvider.class.getName()); + @NotNull private final Project myProject; - /** - * The project for the service - */ - private final Project myProject; - - /** - * The constructor - * - * @param project the project instance for this provider - */ - public GitCommittedChangeListProvider(Project project) { + public GitCommittedChangeListProvider(@NotNull Project project) { myProject = project; } - /** - * {@inheritDoc} - */ public ChangeBrowserSettings createDefaultSettings() { return new ChangeBrowserSettings(); } - /** - * {@inheritDoc} - */ public ChangesBrowserSettingsEditor createFilterUI(boolean showDateFilter) { return new GitVersionFilterComponent(showDateFilter); } - /** - * {@inheritDoc} - */ public RepositoryLocation getLocationFor(FilePath root) { // TODO !!! consider some caching for the case when we do not have tracked remote branch // TODO - in this case returned NULL is NOT cached (in ProjectKeyComponent) @@ -125,25 +102,17 @@ public class GitCommittedChangeListProvider implements CommittedChangesProvider< } } - /** - * {@inheritDoc} - */ public RepositoryLocation getLocationFor(FilePath root, String repositoryPath) { return getLocationFor(root); } - /** - * {@inheritDoc} - */ + @Nullable public VcsCommittedListsZipper getZipper() { return null; } - public void loadCommittedChanges(ChangeBrowserSettings settings, - RepositoryLocation location, - int maxCount, - final AsynchConsumer consumer) - throws VcsException { + public void loadCommittedChanges(ChangeBrowserSettings settings, RepositoryLocation location, int maxCount, + final AsynchConsumer consumer) throws VcsException { try { getCommittedChangesImpl(settings, location, maxCount, new Consumer() { @Override @@ -157,9 +126,6 @@ public class GitCommittedChangeListProvider implements CommittedChangesProvider< } } - /** - * {@inheritDoc} - */ public List getCommittedChanges(ChangeBrowserSettings settings, RepositoryLocation location, final int maxCount) throws VcsException { @@ -215,23 +181,14 @@ public class GitCommittedChangeListProvider implements CommittedChangesProvider< }, consumer, false); } - /** - * {@inheritDoc} - */ public ChangeListColumn[] getColumns() { return new ChangeListColumn[]{ChangeListColumn.NUMBER, ChangeListColumn.DATE, ChangeListColumn.DESCRIPTION, ChangeListColumn.NAME}; } - /** - * {@inheritDoc} - */ public VcsCommittedViewAuxiliary createActions(DecoratorManager manager, RepositoryLocation location) { return null; } - /** - * {@inheritDoc} - */ public int getUnlimitedCountValue() { return -1; } @@ -242,7 +199,9 @@ public class GitCommittedChangeListProvider implements CommittedChangesProvider< final List gitCommits = GitHistoryUtils.commitsDetails(myProject, filePath, new SymbolicRefs(), Collections.singletonList(number.asString())); - if (gitCommits == null || gitCommits.size() != 1) return null; + if (gitCommits.size() != 1) { + return null; + } final GitCommit gitCommit = gitCommits.get(0); final CommittedChangeList commit = new CommittedChangeListImpl(gitCommit.getDescription() + " (" + gitCommit.getShortHash().getString() + ")", gitCommit.getDescription(), gitCommit.getCommitter(), @@ -271,42 +230,4 @@ public class GitCommittedChangeListProvider implements CommittedChangesProvider< return null; } - public int getFormatVersion() { - return 0; - } - - public void writeChangeList(DataOutput stream, CommittedChangeList list) throws IOException { - } - - public CommittedChangeList readChangeList(RepositoryLocation location, DataInput stream) throws IOException { - return null; - } - - public boolean isMaxCountSupported() { - return false; - } - - public Collection getIncomingFiles(RepositoryLocation location) throws VcsException { - return null; - } - - public boolean refreshCacheByNumber() { - return false; - } - - @Nls - public String getChangelistTitle() { - return null; - } - - public boolean isChangeLocallyAvailable(FilePath filePath, - @Nullable VcsRevisionNumber localRevision, - VcsRevisionNumber changeRevision, - CommittedChangeList changeList) { - return false; - } - - public boolean refreshIncomingWithCommitted() { - return false; - } } diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgCachingCommitedChangesProvider.java b/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgCachingCommitedChangesProvider.java index 7a1cb0097b6c..d8f1341f1ec4 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgCachingCommitedChangesProvider.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgCachingCommitedChangesProvider.java @@ -182,6 +182,7 @@ public class HgCachingCommitedChangesProvider return getLocationFor(root); } + @Nullable public VcsCommittedListsZipper getZipper() { return null; } diff --git a/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnCommittedChangesProvider.java b/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnCommittedChangesProvider.java index bf3d93c9559c..4073ecebcc0c 100644 --- a/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnCommittedChangesProvider.java +++ b/plugins/svn4idea/src/org/jetbrains/idea/svn/history/SvnCommittedChangesProvider.java @@ -123,6 +123,7 @@ public class SvnCommittedChangesProvider implements CachingCommittedChangesProvi return new SvnLoadingRepositoryLocation(repositoryPath, myVcs); } + @Nullable public VcsCommittedListsZipper getZipper() { return myZipper; }