@Nullable
 public GerritPublisher createPublisher(@NotNull Map<String, String> params) {
   Collection<ServerSshKeyManager> extensions =
       myExtensionHolder.getExtensions(ServerSshKeyManager.class);
   if (extensions.isEmpty()) {
     return new GerritPublisher(null, myLinks, params);
   } else {
     return new GerritPublisher(extensions.iterator().next(), myLinks, params);
   }
 }
예제 #2
0
 private void initDisplayNameIfRequired() {
   if (myDisplayName == null) {
     if (myExtensionHolder != null) {
       boolean communityPluginFound = false;
       final Collection<VcsSupportContext> vcsPlugins =
           myExtensionHolder.getServices(VcsSupportContext.class);
       for (VcsSupportContext plugin : vcsPlugins) {
         if (plugin.getCore().getName().equals("git")) {
           communityPluginFound = true;
         }
       }
       if (communityPluginFound) {
         myDisplayName = "Git (JetBrains plugin)";
       } else {
         myDisplayName = "Git";
       }
     } else {
       myDisplayName = "Git (JetBrains plugin)";
     }
   }
 }