Package org.eclipse.egit.core.op

Examples of org.eclipse.egit.core.op.ListRemoteOperation.run()


                  InterruptedException {
                monitor
                    .beginTask(
                        UIText.RefSpecDialog_GettingRemoteRefsMonitorMessage,
                        IProgressMonitor.UNKNOWN);
                lop.run(monitor);
                monitor.done();
              }
            });
        for (Ref ref : lop.getRemoteRefs())
          if (ref.getName().startsWith(Constants.R_HEADS)
View Full Code Here


                        .getInt(UIPreferences.REMOTE_CONNECTION_TIMEOUT));
              } catch (URISyntaxException e) {
                throw new InvocationTargetException(e);
              }

              listOp.run(monitor);
              changeRefs = new ArrayList<Change>();
              for (Ref ref : listOp.getRemoteRefs()) {
                Change change = Change.fromRef(ref.getName());
                if (change != null)
                  changeRefs.add(change);
View Full Code Here

            .setCredentialsProvider(new UsernamePasswordCredentialsProvider(
                credentials.getUser(), credentials.getPassword()));
      getContainer().run(true, true, new IRunnableWithProgress() {
        public void run(IProgressMonitor monitor)
            throws InvocationTargetException, InterruptedException {
          listRemotesOp.run(monitor);
        }
      });
    } catch (InvocationTargetException e) {
      final Throwable cause = e.getCause();
      transportError(cause.getMessage());
View Full Code Here

                  InterruptedException {
                monitor
                    .beginTask(
                        UIText.FetchSourcePage_GettingRemoteRefsTaskname,
                        IProgressMonitor.UNKNOWN);
                lop.run(monitor);
                monitor.done();
              }
            });
        for (Ref ref : lop.getRemoteRefs()) {
          if (ref.getName().startsWith(Constants.R_HEADS)
View Full Code Here

  protected static Collection<Ref> getRemoteRefs(URIish uri) throws Exception {
    final Repository db = FileRepositoryBuilder.create(new File("/tmp")); //$NON-NLS-1$
    int timeout = 20;
    ListRemoteOperation listRemoteOp = new ListRemoteOperation(db, uri,
        timeout);
    listRemoteOp.run(null);
    return listRemoteOp.getRemoteRefs();
  }
}
View Full Code Here

                credentials.getUser(), credentials
                    .getPassword()));
      getContainer().run(true, true, new IRunnableWithProgress() {
        public void run(IProgressMonitor monitor)
            throws InvocationTargetException, InterruptedException {
          listRemoteOp.run(monitor);
        }
      });
    } catch (InvocationTargetException e) {
      Throwable why = e.getCause();
      transportError(why);
View Full Code Here

    URIish uri = new URIish("file:///"
        + repository2.getRepository().getDirectory().getPath());
    ListRemoteOperation lrop = new ListRemoteOperation(repository1
        .getRepository(), uri, 0);
    lrop.run(null);
    assertEquals(4, lrop.getRemoteRefs().size());
    assertNotNull(lrop.getRemoteRef("refs/heads/test"));

    uri = new URIish("file:///"
        + repository1.getRepository().getDirectory().getPath());
View Full Code Here

    assertNotNull(lrop.getRemoteRef("refs/heads/test"));

    uri = new URIish("file:///"
        + repository1.getRepository().getDirectory().getPath());
    lrop = new ListRemoteOperation(repository2.getRepository(), uri, 0);
    lrop.run(new NullProgressMonitor());
    assertEquals(2, lrop.getRemoteRefs().size());
    assertNotNull(lrop.getRemoteRef("refs/heads/master"));
  }

  /**
 
View Full Code Here

    URIish uri = new URIish("file:///" + "no/path");
    ListRemoteOperation lrop = new ListRemoteOperation(repository1
        .getRepository(), uri, 0);
    try {
      lrop.run(new NullProgressMonitor());
      fail("Expected Exception not thrown");
    } catch (InvocationTargetException e) {
      // expected
    }
  }
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.