mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
vcs: @NotNull
This commit is contained in:
@@ -24,6 +24,7 @@ import com.intellij.openapi.vcs.RepositoryLocation;
|
||||
import com.intellij.openapi.vcs.VcsBundle;
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -36,7 +37,7 @@ public class CurrentRevision implements VcsFileRevision {
|
||||
public static final String CURRENT = VcsBundle.message("vcs.revision.name.current");
|
||||
private final VcsRevisionNumber myRevisionNumber;
|
||||
|
||||
public CurrentRevision(VirtualFile file, VcsRevisionNumber revision) {
|
||||
public CurrentRevision(@NotNull VirtualFile file, @NotNull VcsRevisionNumber revision) {
|
||||
myFile = file;
|
||||
myRevisionNumber = revision;
|
||||
}
|
||||
@@ -77,6 +78,7 @@ public class CurrentRevision implements VcsFileRevision {
|
||||
return "";
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public VcsRevisionNumber getRevisionNumber() {
|
||||
return myRevisionNumber;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ package com.intellij.openapi.vcs.history;
|
||||
import com.intellij.openapi.vcs.RepositoryLocation;
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -25,6 +26,7 @@ import java.util.Date;
|
||||
|
||||
public interface VcsFileRevision extends VcsFileContent, VcsRevisionDescription {
|
||||
VcsFileRevision NULL = new VcsFileRevision() {
|
||||
@NotNull
|
||||
public VcsRevisionNumber getRevisionNumber() {
|
||||
return VcsRevisionNumber.NULL;
|
||||
}
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.vcs.history;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.util.Date;
|
||||
@@ -27,6 +28,7 @@ import java.util.Date;
|
||||
* To change this template use File | Settings | File Templates.
|
||||
*/
|
||||
public interface VcsRevisionDescription {
|
||||
@NotNull
|
||||
VcsRevisionNumber getRevisionNumber();
|
||||
|
||||
Date getRevisionDate();
|
||||
|
||||
+4
-1
@@ -15,6 +15,8 @@
|
||||
*/
|
||||
package com.intellij.openapi.vcs.history;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
@@ -30,7 +32,7 @@ public class VcsRevisionDescriptionImpl implements VcsRevisionDescription {
|
||||
private String myAuthor;
|
||||
private String myMessage;
|
||||
|
||||
public VcsRevisionDescriptionImpl(VcsRevisionNumber number, Date date, String author, String message) {
|
||||
public VcsRevisionDescriptionImpl(@NotNull VcsRevisionNumber number, Date date, String author, String message) {
|
||||
myNumber = number;
|
||||
myDate = date;
|
||||
myAuthor = author;
|
||||
@@ -41,6 +43,7 @@ public class VcsRevisionDescriptionImpl implements VcsRevisionDescription {
|
||||
myNumber = number;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public VcsRevisionNumber getRevisionNumber() {
|
||||
return myNumber;
|
||||
|
||||
@@ -61,6 +61,7 @@ class TreeNodeOnVcsRevision extends DefaultMutableTreeNode implements VcsFileRev
|
||||
return myRevision.loadContent();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public VcsRevisionNumber getRevisionNumber() {
|
||||
return myRevision.getRevisionNumber();
|
||||
}
|
||||
|
||||
+1
@@ -180,6 +180,7 @@ public class CvsAnnotationProvider implements AnnotationProvider{
|
||||
myDate = date;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public VcsRevisionNumber getRevisionNumber() {
|
||||
return myNumber;
|
||||
}
|
||||
|
||||
+2
@@ -28,6 +28,7 @@ import com.intellij.openapi.vcs.RepositoryLocation;
|
||||
import com.intellij.openapi.vcs.VcsException;
|
||||
import com.intellij.openapi.vcs.history.VcsFileRevision;
|
||||
import com.intellij.openapi.vcs.history.VcsRevisionNumber;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import java.io.IOException;
|
||||
@@ -81,6 +82,7 @@ public class ComparableVcsRevisionOnOperation implements VcsFileRevision {
|
||||
return myOperation.isLoaded();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public VcsRevisionNumber getRevisionNumber() {
|
||||
return getRevision();
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.util.text.StringUtil;
|
||||
import com.intellij.openapi.vcs.RepositoryLocation;
|
||||
import com.intellij.openapi.vcs.history.VcsRevisionNumber;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.netbeans.lib.cvsclient.command.log.LogInformation;
|
||||
import org.netbeans.lib.cvsclient.command.log.Revision;
|
||||
@@ -149,6 +150,7 @@ public class CvsFileRevisionImpl extends CvsFileContent implements CvsFileRevisi
|
||||
return result;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public VcsRevisionNumber getRevisionNumber() {
|
||||
if (myCvsRevision != null) {
|
||||
return new CvsRevisionNumber(myCvsRevision.getNumber());
|
||||
|
||||
@@ -77,6 +77,7 @@ public class GitFileRevision extends VcsFileRevisionEx implements Comparable<Vcs
|
||||
return null;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public VcsRevisionNumber getRevisionNumber() {
|
||||
return myRevision;
|
||||
}
|
||||
|
||||
@@ -107,6 +107,7 @@ public class SvnFileRevision implements VcsFileRevision {
|
||||
}
|
||||
|
||||
|
||||
@NotNull
|
||||
public VcsRevisionNumber getRevisionNumber() {
|
||||
return myRevisionNumber;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user