Examples of RevisionInformation


Examples of org.eclipse.jface.text.revisions.RevisionInformation

    /*
     * @see org.eclipse.jface.text.source.IAnnotationHoverExtension#getHoverControlCreator()
     */
    public IInformationControlCreator getHoverControlCreator() {
      RevisionInformation revisionInfo= fRevisionInfo;
      if (revisionInfo != null) {
        IInformationControlCreator creator= revisionInfo.getHoverControlCreator();
        if (creator != null)
          return creator;
      }
      return new HoverInformationControlCreator(false);
    }
View Full Code Here

Examples of org.eclipse.jface.text.revisions.RevisionInformation

    /*
         * @see org.eclipse.jface.text.information.IInformationProviderExtension2#getInformationPresenterControlCreator()
         */
        public IInformationControlCreator getInformationPresenterControlCreator() {
      RevisionInformation revisionInfo= fRevisionInfo;
      if (revisionInfo != null) {
        IInformationControlCreator creator= revisionInfo.getInformationPresenterControlCreator();
        if (creator != null)
          return creator;
      }
      return new HoverInformationControlCreator(true);
        }
View Full Code Here

Examples of org.eclipse.jface.text.revisions.RevisionInformation

    this.page = page;
    this.lineNumberToReveal = lineNumberToReveal;
  }

  public void execute(IProgressMonitor monitor) throws CoreException {
    final RevisionInformation info = new RevisionInformation();

    final BlameCommand command = new BlameCommand(repository)
        .setFollowFileRenames(true).setFilePath(path);
    if (startCommit != null)
      command.setStartCommit(startCommit);
    else {
      try {
        command.setStartCommit(repository.resolve(Constants.HEAD));
      } catch (IOException e) {
        Activator
            .error("Error resolving HEAD for showing annotations in repository: " + repository, e); //$NON-NLS-1$
        return;
      }
    }
    if (Activator.getDefault().getPreferenceStore()
        .getBoolean(UIPreferences.BLAME_IGNORE_WHITESPACE))
      command.setTextComparator(RawTextComparator.WS_IGNORE_ALL);

    BlameResult result;
    try {
      result = command.call();
    } catch (Exception e1) {
      Activator.error(e1.getMessage(), e1);
      return;
    }
    if (result == null)
      return;

    Map<RevCommit, BlameRevision> revisions = new HashMap<RevCommit, BlameRevision>();
    int lineCount = result.getResultContents().size();
    BlameRevision previous = null;
    for (int i = 0; i < lineCount; i++) {
      RevCommit commit = result.getSourceCommit(i);
      String sourcePath = result.getSourcePath(i);
      if (commit == null) {
        // Unregister the current revision
        if (previous != null) {
          previous.register();
          previous = null;
        }
        continue;
      }
      BlameRevision revision = revisions.get(commit);
      if (revision == null) {
        revision = new BlameRevision();
        revision.setRepository(repository);
        revision.setCommit(commit);
        revision.setSourcePath(sourcePath);
        revisions.put(commit, revision);
        info.addRevision(revision);
      }
      revision.addSourceLine(i, result.getSourceLine(i));
      if (previous != null)
        if (previous == revision)
          previous.addLine();
View Full Code Here

Examples of org.eclipse.jface.text.revisions.RevisionInformation

    /*
     * @see org.eclipse.jface.text.source.IAnnotationHoverExtension#getHoverControlCreator()
     */
    public IInformationControlCreator getHoverControlCreator() {
      RevisionInformation revisionInfo= fRevisionInfo;
      if (revisionInfo != null) {
        IInformationControlCreator creator= revisionInfo.getHoverControlCreator();
        if (creator != null)
          return creator;
      }
      return new HoverInformationControlCreator(false);
    }
View Full Code Here

Examples of org.eclipse.jface.text.revisions.RevisionInformation

    /*
         * @see org.eclipse.jface.text.information.IInformationProviderExtension2#getInformationPresenterControlCreator()
         */
        public IInformationControlCreator getInformationPresenterControlCreator() {
      RevisionInformation revisionInfo= fRevisionInfo;
      if (revisionInfo != null) {
        IInformationControlCreator creator= revisionInfo.getInformationPresenterControlCreator();
        if (creator != null)
          return creator;
      }
      return new HoverInformationControlCreator(true);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.