コード例 #1
0
 @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
ファイル: GitVcsSupport.java プロジェクト: idlsoft/git-plugin
 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)";
     }
   }
 }