Examples of reset()


Examples of org.eclipse.ecf.protocol.bittorrent.internal.torrent.Piece.reset()

              piece.setAsCompleted();
              hasPiece[count] = true;
              completedPieces++;
              remaining -= piece.getLength();
            } else {
              piece.reset();
            }
            incompletePieces.remove(piece);
            fireHashCheckedEvent(count);
            count++;
            read = 0;
View Full Code Here

Examples of org.eclipse.jdt.internal.compiler.codegen.CodeStream.reset()

    int codeAttributeOffset = classFile.contentsOffset;
    classFile.generateCodeAttributeHeader();
    CodeStream codeStream = classFile.codeStream;
    resolve(classScope);

    codeStream.reset(this, classFile);
    TypeDeclaration declaringType = classScope.referenceContext;

    // initialize local positions - including initializer scope.
    MethodScope staticInitializerScope = declaringType.staticInitializerScope;
    staticInitializerScope.computeLocalVariablePositions(0, codeStream);
View Full Code Here

Examples of org.eclipse.jdt.internal.formatter.align.Alignment.reset()

      } else if (targetAlignment.wasSplit) {
        // reset the nearest already broken outermost alignment.
        // Note that it's not done twice to avoid infinite loop while raising
        // the exception on an innermost alignment...
        if (!targetAlignment.wasReset()) {
          targetAlignment.reset();
          if (msgArgsDepth > alignmentException.relativeDepth) {
            alignmentException.relativeDepth = msgArgsDepth;
          }
          throw alignmentException;
        }
View Full Code Here

Examples of org.eclipse.jetty.http2.api.Stream.reset()

        FuturePromise<Stream> promise = new FuturePromise<>();
        client.newStream(requestFrame, promise, new Stream.Listener.Adapter());
        Stream stream = promise.get(5, TimeUnit.SECONDS);
        ResetFrame resetFrame = new ResetFrame(stream.getId(), ErrorCodes.CANCEL_STREAM_ERROR);
        FutureCallback resetCallback = new FutureCallback();
        stream.reset(resetFrame, resetCallback);
        resetCallback.get(5, TimeUnit.SECONDS);
        // After reset the stream should be gone.
        Assert.assertEquals(0, client.getStreams().size());
    }
View Full Code Here

Examples of org.eclipse.jgit.api.Git.reset()

            public File operateOn(Repository repo) throws Exception
            {
                Git git = new Git(repo);
                if (repo.getAllRefs().containsKey("refs/heads/master"))
                {
                    git.reset().setMode(ResetCommand.ResetType.HARD).setRef("HEAD").call();
                    for (String path : git.status().call().getUntracked())
                    {
                        new File(repo.getWorkTree(), path).delete();
                    }
                }
View Full Code Here

Examples of org.eclipse.jgit.fnmatch.FileNameMatcher.reset()

    final String pattern = "helloworld";
    final FileNameMatcher matcher = new FileNameMatcher(pattern, null);
    matcher.append("helloworld");
    assertEquals(true, matcher.isMatch());
    assertEquals(false, matcher.canAppendMatch());
    matcher.reset();
    matcher.append("hello");
    assertEquals(false, matcher.isMatch());
    assertEquals(true, matcher.canAppendMatch());
    matcher.append("world");
    assertEquals(true, matcher.isMatch());
View Full Code Here

Examples of org.eclipse.jgit.revwalk.RevWalk.reset()

          }

          // The branch rewound. Walk the list of commits removed from
          // the reference. If any matches to a tag, this has to be removed.
          boolean err = false;
          rw.reset();
          rw.markStart(savedCommit);
          rw.markUninteresting(currentCommit);
          rw.sort(RevSort.TOPO, true);
          RevCommit c;
          while ((c = rw.next()) != null) {
View Full Code Here

Examples of org.eclipse.jgit.treewalk.CanonicalTreeParser.reset()

          if (head == null)
            throw new NoHeadException(JGitText.get().cannotReadTree);
          CanonicalTreeParser p = new CanonicalTreeParser();
          ObjectReader reader = repo.newObjectReader();
          try {
            p.reset(reader, head);
          } finally {
            reader.release();
          }
          oldTree = p;
        }
View Full Code Here

Examples of org.eclipse.jgit.treewalk.NameConflictTreeWalk.reset()

    }

    // iterate again, now produce the result string
    NameConflictTreeWalk tw = new NameConflictTreeWalk(db);
    tw.setRecursive(true);
    tw.reset();
    tw.addTree(new DirCacheIterator(dc));
    while (tw.next()) {
      DirCacheIterator dcIt = tw.getTree(0, DirCacheIterator.class);
      sb.append("["+tw.getPathString()+", mode:" + dcIt.getEntryFileMode());
      int stage = dcIt.getDirCacheEntry().getStage();
View Full Code Here

Examples of org.eclipse.jgit.treewalk.TreeWalk.reset()

      // came from so we can properly show the rename or copy,
      // then continue digging backwards.
      //
      a.reset();
      b.reset();
      walk.reset();
      walk.addTree(a);
      walk.addTree(b);
      walk.setFilter(filter);

      if (renameDetector == null)
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.