mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge branch 'AnnotateShowsComment' of https://github.com/jgindin/intellij-community
This commit is contained in:
@@ -118,4 +118,6 @@ hg4idea.exception.file.not.under.hg=The file {0} is not under Mercurial.
|
||||
|
||||
hg4idea.history.copy.revision.number=Copy Revision Number
|
||||
|
||||
hg4idea.changelist.column.branch=Branch
|
||||
hg4idea.changelist.column.branch=Branch
|
||||
|
||||
hg4idea.annotation.tool.tip=commit {0}\nAuthor: {1}\nDate: {2}\n\n{3}
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.intellij.openapi.vcs.history.VcsFileRevision;
|
||||
import com.intellij.openapi.vcs.history.VcsRevisionNumber;
|
||||
import org.zmlx.hg4idea.HgFile;
|
||||
import org.zmlx.hg4idea.HgFileRevision;
|
||||
import org.zmlx.hg4idea.HgVcsMessages;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.LinkedList;
|
||||
@@ -84,7 +85,25 @@ public class HgAnnotation implements FileAnnotation {
|
||||
}
|
||||
|
||||
public String getToolTip(int lineNumber) {
|
||||
return null;
|
||||
|
||||
if ( lines.size() <= lineNumber || lineNumber < 0 ) {
|
||||
return "";
|
||||
}
|
||||
|
||||
HgAnnotationLine info = lines.get(lineNumber);
|
||||
if (info == null) {
|
||||
return "";
|
||||
}
|
||||
|
||||
for (HgFileRevision revision : vcsFileRevisions) {
|
||||
if ( revision.getRevisionNumber().equals(info.getVcsRevisionNumber()) ) {
|
||||
|
||||
return HgVcsMessages.message( "hg4idea.annotation.tool.tip", revision.getRevisionNumber().asString(),
|
||||
revision.getAuthor(), revision.getRevisionDate(), revision.getCommitMessage() );
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getAnnotatedContent() {
|
||||
|
||||
Reference in New Issue
Block a user