Package org.eclipse.jgit.events

Examples of org.eclipse.jgit.events.ListenerList


      public void onIndexChanged(IndexChangedEvent event) {
        throw new ReceivedEventMarkerException();
      }
    };

    ListenerList l = db.getListenerList();
    l.addIndexChangedListener(listener);
    DirCacheBuilder b = dc.builder();

    entOrig = new DirCacheEntry(path);
    entOrig.setFileMode(mode);
    entOrig.setLastModified(lastModified);
    entOrig.setLength(length);
    b.add(entOrig);
    try {
      b.commit();
    } catch (ReceivedEventMarkerException e) {
      receivedEvent = true;
    }
    if (!receivedEvent)
      fail("did not receive IndexChangedEvent");

    // do the same again, as this doesn't change index compared to first
    // round we should get no event this time
    dc = db.lockDirCache();
    listener = new IndexChangedListener() {

      public void onIndexChanged(IndexChangedEvent event) {
        throw new ReceivedEventMarkerException();
      }
    };

    l = db.getListenerList();
    l.addIndexChangedListener(listener);
    b = dc.builder();

    entOrig = new DirCacheEntry(path);
    entOrig.setFileMode(mode);
    entOrig.setLastModified(lastModified);
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.events.ListenerList

Copyright © 2018 www.massapicom. 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.