Eclipse SVN annotation from another plugin [message #1069598] |
Tue, 16 July 2013 08:06 |
Yaron Burg Messages: 9 Registered: July 2009 |
Junior Member |
|
|
Hi,
I'm writing an Eclipse plugin, which should automatically add SVN annotations (AKA "Blame") to the open file in the editor (like you would do with Team->Show Annotation).
I managed to get the active file, team repository and revisions, however I can't find a way to do the "Show Annotation" action.
Here is the relevant code (in research stages as you can see)
clickAction = new Action() {
public void run() {
RepositoryProvider provider = RepositoryProvider.getProvider(activeFile.getProject());
IFileHistory hist = provider.getFileHistoryProvider().getFileHistoryFor(activeFile, IFileHistoryProvider.NONE,
new NullProgressMonitor());
String a = hist.getFileRevisions()[hist.getFileRevisions().length-1].getAuthor();
System.out.print(a);
}
};
"Show Annotation" feature will save me the need to get the list of changed lines and do the annotation and calculations myself in the editor.
Any idea how to do that?
Thanks,
Yaron
|
|
|
Powered by
FUDForum. Page generated in 0.03170 seconds