geertjanw closed pull request #317: Excluding svnkit
URL: https://github.com/apache/incubator-netbeans/pull/317
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/nbbuild/cluster.properties b/nbbuild/cluster.properties
index 047d576bc..e9ca269bd 100644
--- a/nbbuild/cluster.properties
+++ b/nbbuild/cluster.properties
@@ -409,7 +409,6 @@ nb.cluster.ide=\
         libs.smack,\
         libs.svnClientAdapter,\
         libs.svnClientAdapter.javahl,\
-        libs.svnClientAdapter.svnkit,\
         libs.xerces,\
         localhistory,\
         localtasks,\
diff --git a/subversion/nbproject/project.xml b/subversion/nbproject/project.xml
index 96066ea3e..0052366e3 100644
--- a/subversion/nbproject/project.xml
+++ b/subversion/nbproject/project.xml
@@ -345,11 +345,6 @@
                         
<code-name-base>org.netbeans.libs.svnClientAdapter.javahl</code-name-base>
                         <compile-dependency/>
                     </test-dependency>
-                    <test-dependency>
-                        
<code-name-base>org.netbeans.libs.svnClientAdapter.svnkit</code-name-base>
-                        <recursive/>
-                        <compile-dependency/>
-                    </test-dependency>
                     <test-dependency>
                         
<code-name-base>org.netbeans.modules.diff</code-name-base>
                         <recursive/>
diff --git 
a/subversion/src/org/netbeans/modules/subversion/client/SvnClientFactory.java 
b/subversion/src/org/netbeans/modules/subversion/client/SvnClientFactory.java
index d466c8a90..18272c929 100644
--- 
a/subversion/src/org/netbeans/modules/subversion/client/SvnClientFactory.java
+++ 
b/subversion/src/org/netbeans/modules/subversion/client/SvnClientFactory.java
@@ -128,6 +128,10 @@ public static boolean isSvnKit() {
         return factory.connectionType() == ConnectionType.svnkit;
     }
 
+    public static boolean hasSvnKit() {
+        return 
SvnClientAdapterFactory.getInstance(SvnClientAdapterFactory.Client.SVNKIT) != 
null;
+    }
+
     /**
      * Returns a SvnClient, which isn't configured in any way.
      * Knows no username, password, has no SvnProgressSupport<br/>
diff --git 
a/subversion/src/org/netbeans/modules/subversion/options/SvnOptionsController.java
 
b/subversion/src/org/netbeans/modules/subversion/options/SvnOptionsController.java
index 6294fd314..d7153929b 100644
--- 
a/subversion/src/org/netbeans/modules/subversion/options/SvnOptionsController.java
+++ 
b/subversion/src/org/netbeans/modules/subversion/options/SvnOptionsController.java
@@ -37,6 +37,7 @@
 import javax.swing.DefaultListCellRenderer;
 import javax.swing.JFileChooser;
 import javax.swing.JList;
+import javax.swing.JPanel;
 import javax.swing.JTextField;
 import javax.swing.event.HyperlinkEvent;
 import javax.swing.event.HyperlinkListener;
@@ -97,7 +98,12 @@ public Component getListCellRendererComponent (JList list, 
Object value, int ind
                 return super.getListCellRendererComponent(list, value, index, 
isSelected, cellHasFocus);
             }
         });
-        panel.cmbPreferredClient.setModel(new DefaultComboBoxModel(new 
Object[] { panel.panelCLI, panel.panelJavahl, panel.panelSvnkit }));
+        List<JPanel> clients = new ArrayList<>();
+        clients.addAll(Arrays.asList(panel.panelCLI, panel.panelJavahl));
+        if (SvnClientFactory.hasSvnKit()) {
+            clients.add(panel.panelSvnkit);
+        }
+        panel.cmbPreferredClient.setModel(new 
DefaultComboBoxModel(clients.toArray(new Object[0])));
         panel.textPaneClient.addHyperlinkListener(new HyperlinkListener() {
             @Override
             public void hyperlinkUpdate (HyperlinkEvent e) {


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to