本文整理汇总了Java中com.intellij.openapi.vcs.history.VcsFileRevision.getRevisionDate方法的典型用法代码示例。如果您正苦于以下问题:Java VcsFileRevision.getRevisionDate方法的具体用法?Java VcsFileRevision.getRevisionDate怎么用?Java VcsFileRevision.getRevisionDate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.vcs.history.VcsFileRevision
的用法示例。
在下文中一共展示了VcsFileRevision.getRevisionDate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: showAffectedPaths
import com.intellij.openapi.vcs.history.VcsFileRevision; //导入方法依赖的package包/类
@Override
protected void showAffectedPaths(int lineNum) {
if (lineNum < myLineRevisions.length) {
final VcsFileRevision revision = myLineRevisions[lineNum];
final int changeset = ((VcsRevisionNumber.Int)revision.getRevisionNumber()).getValue();
final CommittedChangeList changeList =
new TFSChangeList(myWorkspace, changeset, revision.getAuthor(), revision.getRevisionDate(), revision.getCommitMessage(), myVcs);
String changesetString = ((TfsRevisionNumber)revision.getRevisionNumber()).getChangesetString();
final String progress = MessageFormat.format("Loading changeset {0}...", changesetString);
ProgressManager.getInstance().runProcessWithProgressSynchronously(new Runnable() {
public void run() {
changeList.getChanges();
}
}, progress, false, myVcs.getProject());
final String title = MessageFormat.format("Changeset {0}", changesetString);
AbstractVcsHelper.getInstance(myVcs.getProject()).showChangesListBrowser(changeList, title);
}
}
示例2: create
import com.intellij.openapi.vcs.history.VcsFileRevision; //导入方法依赖的package包/类
@NotNull
public static LastRevision create(@NotNull VcsFileRevision revision) {
VcsRevisionNumber number = revision.getRevisionNumber();
String author = StringUtil.notNullize(revision.getAuthor(), "Unknown");
Date date = revision.getRevisionDate();
String message = StringUtil.notNullize(revision.getCommitMessage());
return new LastRevision(number, author, date, message);
}
示例3: loadFromVersionControl
import com.intellij.openapi.vcs.history.VcsFileRevision; //导入方法依赖的package包/类
@Nullable
private byte[] loadFromVersionControl(long date, VirtualFile f) {
try {
final AbstractVcs vcs = VcsUtil.getVcsFor(myProject, f);
if (vcs == null) return null;
final VcsHistoryProvider historyProvider = vcs.getVcsHistoryProvider();
if (historyProvider == null) return null;
final FilePath filePath = VcsContextFactory.SERVICE.getInstance().createFilePathOn(f);
final VcsHistorySession session = historyProvider.createSessionFor(filePath);
if (session == null) return null;
final List<VcsFileRevision> list = session.getRevisionList();
if (list != null) {
for (VcsFileRevision revision : list) {
final Date revisionDate = revision.getRevisionDate();
if (revisionDate == null) {
return null;
}
if (revisionDate.getTime() < date) {
return revision.loadContent();
}
}
}
}
catch (Exception e) {
LOG.info(e);
return null;
}
return null;
}