コード例 #1
0
    @Override
    public boolean equals(Object o) {
      if (this == o) return true;
      if (o == null || getClass() != o.getClass()) return false;

      RevisionPack that = (RevisionPack) o;

      return myRevision.equals(that.getRevision());
    }
コード例 #2
0
  public void initialize(
      @NotNull final String vcsContent, @NotNull RevisionPack baseRevisionNumber) {
    myApplication.assertIsDispatchThread();

    synchronized (myLock) {
      try {
        if (myReleased) return;
        if (myBaseRevisionNumber != null && myBaseRevisionNumber.contains(baseRevisionNumber))
          return;

        myBaseRevisionNumber = baseRevisionNumber;

        myVcsDocument.setReadOnly(false);
        myVcsDocument.setText(vcsContent);
        myVcsDocument.setReadOnly(true);
        reinstallRanges();

        if (myDocumentListener == null) {
          myDocumentListener = new MyDocumentListener();
          myDocument.addDocumentListener(myDocumentListener);
        }
      } finally {
        myInitialized = true;
      }
    }
  }
コード例 #3
0
 public boolean contains(final RevisionPack previous) {
   if (myRevision.equals(previous.getRevision()) && !myRevision.equals(VcsRevisionNumber.NULL))
     return true;
   return myNumber >= previous.getNumber();
 }