Esempio n. 1
0
 public static String niceProtocolNameFor(URIish uri) {
   TransportProtocol p = protocolFor(uri);
   if (p == null) {
     return null;
   }
   if (p.getSchemes().contains("file")) {
     return null;
   }
   String jGitProtocolName = p.getName();
   if (jGitProtocolName.equals(JGitText.get().transportProtoGitAnon)) {
     return "Git";
   }
   return jGitProtocolName;
 }
Esempio n. 2
0
 public static TransportProtocol protocolFor(URIish uri) {
   for (TransportProtocol p : getTransportProtocols()) {
     if (p.canHandle(uri)) return p;
   }
   return null;
 }
  private boolean canHandleProtocol(URIish u) {
    for (TransportProtocol proto : Transport.getTransportProtocols())
      if (proto.canHandle(u)) return true;

    return false;
  }