当前位置: 首页>>代码示例>>Java>>正文


Java VcsFileRevision.getAuthor方法代码示例

本文整理汇总了Java中com.intellij.openapi.vcs.history.VcsFileRevision.getAuthor方法的典型用法代码示例。如果您正苦于以下问题:Java VcsFileRevision.getAuthor方法的具体用法?Java VcsFileRevision.getAuthor怎么用?Java VcsFileRevision.getAuthor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.vcs.history.VcsFileRevision的用法示例。


在下文中一共展示了VcsFileRevision.getAuthor方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
  }
}
 
开发者ID:Microsoft,项目名称:vso-intellij,代码行数:19,代码来源:TFSFileAnnotation.java

示例2: computeBgColors

import com.intellij.openapi.vcs.history.VcsFileRevision; //导入方法依赖的package包/类
@Nullable
private static Map<String, Color> computeBgColors(FileAnnotation fileAnnotation) {
  final Map<String, Color> bgColors = new HashMap<String, Color>();
  final Map<String, Color> revNumbers = new HashMap<String, Color>();
  final int length = BG_COLORS.length;
  final List<VcsFileRevision> fileRevisionList = fileAnnotation.getRevisions();
  final boolean darcula = UIUtil.isUnderDarcula();
  if (fileRevisionList != null) {
    for (VcsFileRevision revision : fileRevisionList) {
      final String author = revision.getAuthor();
      final String revNumber = revision.getRevisionNumber().asString();
      if (author != null && !bgColors.containsKey(author)) {
        final int size = bgColors.size();
        Color color = BG_COLORS[size < length ? size : size % length];
        if (darcula) {
          color = ColorUtil.shift(color, 0.3);
        }
        bgColors.put(author, color);
      }
      if (revNumber != null && !revNumbers.containsKey(revNumber)) {
        revNumbers.put(revNumber, bgColors.get(author));
      }
    }
  }
  return bgColors.size() < 2 ? null : revNumbers;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:AnnotateToggleAction.java

示例3: revisionToCommit

import com.intellij.openapi.vcs.history.VcsFileRevision; //导入方法依赖的package包/类
private Commit revisionToCommit(VcsFileRevision revision) {
    String committer = null;
    String committerEmail = null;
    String authorEmail = null;
    if (revision instanceof VcsFileRevisionEx) {
        committer = ((VcsFileRevisionEx) revision).getCommitterName();
        committerEmail = ((VcsFileRevisionEx) revision).getCommitterEmail();
        authorEmail = ((VcsFileRevisionEx) revision).getAuthorEmail();
    }
    String author = revision.getAuthor();
    return new Commit(
            revision,
            author,
            authorEmail,
            committer,
            committerEmail);
}
 
开发者ID:janotav,项目名称:ali-idea-plugin,代码行数:18,代码来源:DevMotivePanel.java

示例4: createDefaultAuthorsMappingProvider

import com.intellij.openapi.vcs.history.VcsFileRevision; //导入方法依赖的package包/类
@Nullable
private static AuthorsMappingProvider createDefaultAuthorsMappingProvider(@Nonnull FileAnnotation annotation) {
  List<VcsFileRevision> revisions = annotation.getRevisions();
  if (revisions == null) return null;

  Map<VcsRevisionNumber, String> authorsMapping = new HashMap<>();
  for (VcsFileRevision revision : revisions) {
    String author = revision.getAuthor();
    if (author != null) authorsMapping.put(revision.getRevisionNumber(), author);
  }

  return () -> authorsMapping;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:14,代码来源:FileAnnotation.java


注:本文中的com.intellij.openapi.vcs.history.VcsFileRevision.getAuthor方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。