本文整理汇总了Java中com.intellij.openapi.vcs.AbstractVcs.getProject方法的典型用法代码示例。如果您正苦于以下问题:Java AbstractVcs.getProject方法的具体用法?Java AbstractVcs.getProject怎么用?Java AbstractVcs.getProject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.vcs.AbstractVcs
的用法示例。
在下文中一共展示了AbstractVcs.getProject方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: FileHistorySessionPartner
import com.intellij.openapi.vcs.AbstractVcs; //导入方法依赖的package包/类
public FileHistorySessionPartner(final VcsHistoryProvider vcsHistoryProvider,
@NotNull final FilePath path,
final AbstractVcs vcs,
final FileHistoryRefresherI refresherI) {
myVcsHistoryProvider = vcsHistoryProvider;
myPath = path;
myLimitHistoryCheck = new LimitHistoryCheck(vcs.getProject(), path.getPath());
myVcs = vcs;
myRefresherI = refresherI;
Consumer<List<VcsFileRevision>> sessionRefresher = new Consumer<List<VcsFileRevision>>() {
public void consume(List<VcsFileRevision> vcsFileRevisions) {
// TODO: Logic should be revised to we could just append some revisions to history panel instead of creating and showing new history
// TODO: session
mySession.getRevisionList().addAll(vcsFileRevisions);
final VcsHistorySession copy = mySession.copyWithCachedRevision();
ApplicationManager.getApplication().invokeLater(new Runnable() {
public void run() {
ensureHistoryPanelCreated().getHistoryPanelRefresh().consume(copy);
}
});
}
};
myBuffer = new BufferedListConsumer<VcsFileRevision>(5, sessionRefresher, 1000) {
@Override
protected void invokeConsumer(@NotNull Runnable consumerRunnable) {
// Do not invoke in arbitrary background thread as due to parallel execution this could lead to cases when invokeLater() (from
// sessionRefresher) is scheduled at first for history session with (as an example) 10 revisions (new buffered list) and then with
// 5 revisions (previous buffered list). And so incorrect UI is shown to the user.
consumerRunnable.run();
}
};
}