Vcs History implementation questions

I've managed to implement vcs history for my plugin, but I have some questions...

Can auto-refresh of history be turned off? This would be useful to keep files with long histories from taxing the vcs with constant data requests.

I see I can override VcsHistoryProvider#isDateOmittable to return true, but I am not sure how to add my own custom date column from there. Do I need to deal with getRevisionColumns?

And on getRevisionColumns... are there some implementation examples for this?

Thanks in advance for any feedback.

3 comments
Comment actions Permalink

i did not try it myself, but there is a method com.intellij.openapi.vcs.history.VcsHistorySession#allowAsyncRefresh which might be worth testing.

As for the getRevisionsColumn i've used it my plugin,
here is my implementation of it

[] getRevisionColumns() {
		final ColumnInfo myColumnInfo = new ColumnInfo("change package") {
			@Override
			public String valueOf(VcsFileRevision vcsFileRevision) {

				if (vcsFileRevision instanceof MksVcsFileRevision) {
					return ((MksVcsFileRevision) vcsFileRevision).getCpid();
				} else {
					return "unknown";
				}
			}
		};
		//noinspection unchecked
		final ColumnInfo[] array = (ColumnInfo[]) Array.newInstance(myColumnInfo.getClass(), 1);
		array[0] = myColumnInfo;
		return array;
	}//return null if your revisions cannot be tree

]]>

Hope this helps
note : if you look for the whole history provider, you can find it here http://ideamksplugin.googlecode.com/svn/branches/feature_mks_listener/src/main/java/org/intellij/vcs/mks/history/MksVcsHistoryProvider.java

Message was edited by:
Thibaut (formatted code)

0
Comment actions Permalink

Your ColumnInfo example is quite useful. Thanks for posting it.

I tested allowSyncRefresh, overriding it to return false. That seems to have decreased the number of history calls, but not completely. Whenever I change focus away from IDEA and then back, it refreshes the data.

0
Comment actions Permalink

Can someone from Jetbrains please respond to my question regarding auto-refresh of vcs history? I would like to disable reloading history data unless the "refresh" button is pressed by the user.

Thanks.

0

Please sign in to leave a comment.