Examples of FileHistory


Examples of org.jboss.aesh.history.FileHistory

        undoManager = new UndoManager();
        pasteManager = new PasteManager();
        buffer = new Buffer(null);
        if(settings.isHistoryPersistent())
            history = new FileHistory(settings.getHistoryFile().getAbsolutePath(),
                    settings.getHistorySize());
        else
            history = new InMemoryHistory(settings.getHistorySize());

View Full Code Here

Examples of org.jboss.aesh.history.FileHistory

        undoManager = new UndoManager();
        pasteManager = new PasteManager();
        buffer = new Buffer(null);
        if(settings.isHistoryPersistent())
            history = new FileHistory(settings.getHistoryFile().getAbsolutePath(),
                    settings.getHistorySize());
        else
            history = new InMemoryHistory(settings.getHistorySize());

View Full Code Here

Examples of org.jboss.aesh.history.FileHistory

        undoManager = new UndoManager();
        pasteManager = new PasteManager();
        buffer = new Buffer(null);
        if(settings.isHistoryPersistent())
            history = new FileHistory(settings.getHistoryFile().getAbsolutePath(),
                    settings.getHistorySize());
        else
            history = new InMemoryHistory(settings.getHistorySize());

View Full Code Here

Examples of org.jboss.aesh.history.FileHistory

        undoManager = new UndoManager();
        pasteManager = new PasteManager();
        buffer = new Buffer(null);
        if(settings.isHistoryPersistent())
            history = new FileHistory(settings.getHistoryFile().getAbsolutePath(),
                    settings.getHistorySize());
        else
            history = new InMemoryHistory(settings.getHistorySize());

View Full Code Here

Examples of org.jboss.aesh.history.FileHistory

        undoManager = new UndoManager();
        pasteManager = new PasteManager();
        buffer = new Buffer(settings.isAnsiConsole(), null);
        if(settings.isHistoryPersistent())
            history = new FileHistory(settings.getHistoryFile().getAbsolutePath(),
                    settings.getHistorySize());
        else
            history = new InMemoryHistory(settings.getHistorySize());

View Full Code Here

Examples of org.jboss.aesh.history.FileHistory

        undoManager = new UndoManager();
        pasteManager = new PasteManager();
        buffer = new Buffer(null);
        if(settings.isHistoryPersistent())
            history = new FileHistory(settings.getHistoryFile().getAbsolutePath(),
                    settings.getHistorySize());
        else
            history = new InMemoryHistory(settings.getHistorySize());

View Full Code Here

Examples of org.jboss.aesh.history.FileHistory

                throw new IllegalArgumentException("ConsoleBuffer must be provided to create InputProcessor");

            if(settings != null && !settings.isHistoryDisabled()) {
                if(settings != null) {
                    if(settings.isHistoryPersistent())
                        history = new FileHistory(settings.getHistoryFile(), settings.getHistorySize());
                    else
                        history = new InMemoryHistory(settings.getHistorySize());

                }

            }
            else {
                if(persistHistory && historyFile != null)
                    history = new FileHistory(historyFile, historySize);
                else
                    history = new InMemoryHistory(historySize);
            }

            return new AeshInputProcessor(consoleBuffer, history, completion, interruptHook, enableHistory, enableSearch);
View Full Code Here

Examples of org.tmatesoft.hg.internal.FileHistory

   * <p>NOTE, clogRevIndexEnd has to list name of the supplied file in the corresponding manifest,
   * as it's not possible to trace rename history otherwise.
   */
  public FileHistory prepare(HgDataFile df, int clogRevIndexStart, int clogRevIndexEnd) throws HgRuntimeException {
    assert clogRevIndexStart <= clogRevIndexEnd;
    FileHistory fileHistory = new FileHistory(df, clogRevIndexStart, clogRevIndexEnd);
    fileHistory.build();
    int cacheHint = 5; // cache comes useful when we follow merge branches and don't want to
    // parse base revision twice. There's no easy way to determine max(distance(all(base,merge))),
    // hence the heuristics to use the longest history chunk:
    for (FileRevisionHistoryChunk c : fileHistory.iterate(OldToNew)) {
      // iteration order is not important here
      if (c.revisionCount() > cacheHint) {
        cacheHint = c.revisionCount();
      }
    }
    linesCache = new FileLinesCache(cacheHint);
    for (FileRevisionHistoryChunk fhc : fileHistory.iterate(OldToNew)) {
      // iteration order is not important here
      linesCache.useFileUpTo(fhc.getFile(), fhc.getEndChangeset());
    }
    return fileHistory;
  }
View Full Code Here

Examples of org.tmatesoft.hg.internal.FileHistory

      }
      final CancelSupport cancel = getCancelSupport(insp, true);
      BlameHelper bh = new BlameHelper(insp);
      final int startRevIndex = clogRevIndexStart.get(0);
      final int endRevIndex = clogRevIndexEnd.get(TIP);
      FileHistory fileHistory = bh.prepare(df, startRevIndex, endRevIndex);
      //
      cancel.checkCancelled();
      int totalWork = 0;
      for (FileRevisionHistoryChunk fhc : fileHistory.iterate(iterateDirection)) {
        totalWork += fhc.revisionCount();
      }
      progress = getProgressSupport(insp);
      progress.start(totalWork + 1);
      progress.worked(1); // BlameHelper.prepare
      //
      int[] fileClogParentRevs = new int[2];
      int[] fileParentRevs = new int[2];
      for (FileRevisionHistoryChunk fhc : fileHistory.iterate(iterateDirection)) {
        for (int fri : fhc.fileRevisions(iterateDirection)) {
          int clogRevIndex = fhc.changeset(fri);
          // the way we built fileHistory ensures we won't walk past [changelogRevIndexStart..changelogRevIndexEnd]
          assert clogRevIndex >= startRevIndex;
          assert clogRevIndex <= endRevIndex;
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.