You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2021/04/03 07:39:42 UTC

[directory-studio] branch master updated: DIRSTUDIO-1272: Remove Network Connections preferences page (socks proxy settings)

This is an automated email from the ASF dual-hosted git repository.

seelmann pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-studio.git


The following commit(s) were added to refs/heads/master by this push:
     new 4d6eb0d  DIRSTUDIO-1272: Remove Network Connections preferences page (socks proxy settings)
4d6eb0d is described below

commit 4d6eb0d61c11b92f65c9a8b21860ebec6955f218
Author: Stefan Seelmann <ma...@stefan-seelmann.de>
AuthorDate: Sat Apr 3 09:39:26 2021 +0200

    DIRSTUDIO-1272: Remove Network Connections preferences page (socks proxy settings)
---
 plugins/rcp/plugin.xml                             |  5 +++++
 plugins/rcp/pom-first.xml                          |  1 -
 .../studio/ApplicationWorkbenchAdvisor.java        | 24 ----------------------
 .../studio/test/integration/ui/RcpAppTest.java     |  2 +-
 4 files changed, 6 insertions(+), 26 deletions(-)

diff --git a/plugins/rcp/plugin.xml b/plugins/rcp/plugin.xml
index ee4e53d..5f14094 100644
--- a/plugins/rcp/plugin.xml
+++ b/plugins/rcp/plugin.xml
@@ -149,6 +149,11 @@
     <activityPatternBinding
         activityId="%RCP_Hide_id"
         isEqualityPattern="false"
+        pattern="org.eclipse.ui.net.*"/>
+
+    <activityPatternBinding
+        activityId="%RCP_Hide_id"
+        isEqualityPattern="false"
         pattern="org.eclipse.ui.ide.application.*"/>
 
     <activityPatternBinding
diff --git a/plugins/rcp/pom-first.xml b/plugins/rcp/pom-first.xml
index fe60e17..8c2ad2b 100644
--- a/plugins/rcp/pom-first.xml
+++ b/plugins/rcp/pom-first.xml
@@ -51,7 +51,6 @@
             
             <Require-Bundle>
  org.eclipse.core.filesystem,
- org.eclipse.core.net,
  org.eclipse.core.resources,
  org.eclipse.core.runtime,
  org.eclipse.e4.ui.css.swt.theme,
diff --git a/plugins/rcp/src/main/java/org/apache/directory/studio/ApplicationWorkbenchAdvisor.java b/plugins/rcp/src/main/java/org/apache/directory/studio/ApplicationWorkbenchAdvisor.java
index 05e0b52..8e40805 100644
--- a/plugins/rcp/src/main/java/org/apache/directory/studio/ApplicationWorkbenchAdvisor.java
+++ b/plugins/rcp/src/main/java/org/apache/directory/studio/ApplicationWorkbenchAdvisor.java
@@ -22,8 +22,6 @@ package org.apache.directory.studio;
 
 
 import org.apache.directory.studio.preferences.ShutdownPreferencesPage;
-import org.eclipse.core.net.proxy.IProxyService;
-import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.eclipse.core.runtime.preferences.InstanceScope;
 import org.eclipse.jface.dialogs.Dialog;
@@ -37,8 +35,6 @@ import org.eclipse.ui.application.IWorkbenchConfigurer;
 import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
 import org.eclipse.ui.application.WorkbenchAdvisor;
 import org.eclipse.ui.application.WorkbenchWindowAdvisor;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.ServiceReference;
 
 
 /**
@@ -131,31 +127,11 @@ public class ApplicationWorkbenchAdvisor extends WorkbenchAdvisor
     public void postStartup()
     {
         super.postStartup();
-        activateProxyService();
         removeDefaultJvmSetting();
     }
 
 
     /**
-     * Activate the proxy service, this sets the relevant system properties.
-     */
-    private void activateProxyService()
-    {
-        Bundle bundle = Platform.getBundle( "org.eclipse.ui.ide" ); //$NON-NLS-1$
-        
-        if ( bundle != null )
-        {
-            ServiceReference<?> ref = bundle.getBundleContext().getServiceReference( IProxyService.class.getName() );
-        
-            if ( ref != null )
-            {
-                bundle.getBundleContext().getService( ref );
-            }
-        }
-    }
-
-
-    /**
      * DIRSTUDIO-1188: When launching ApacheDS the first time the same Studio JVM is used and stored in the preferences
      * (~/.ApacheDirectoryStudio/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.launching.prefs).
      * Afterwards that JVM is always used when starting ApacheDS, even if the Studio JVM changes. As there is no
diff --git a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/RcpAppTest.java b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/RcpAppTest.java
index 28252b2..ca7069e 100644
--- a/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/RcpAppTest.java
+++ b/tests/test.integration.ui/src/main/java/org/apache/directory/studio/test/integration/ui/RcpAppTest.java
@@ -315,7 +315,6 @@ public class RcpAppTest extends AbstractLdapTestUnit
         assertTrue( prefs.pageExists( "Apache Directory Studio", "Schema Editor", "Search View" ) );
         assertTrue( prefs.pageExists( "Apache Directory Studio", "Shutdown" ) );
 
-        assertTrue( prefs.pageExists( "General", "Network Connections" ) );
         assertTrue( prefs.pageExists( "General", "Appearance" ) );
         assertTrue( prefs.pageExists( "General", "Appearance", "Text Editors" ) );
         assertTrue( prefs.pageExists( "General", "Appearance", "Colors and Fonts" ) );
@@ -342,6 +341,7 @@ public class RcpAppTest extends AbstractLdapTestUnit
         assertFalse( prefs.pageExists( "Maven" ) );
         assertFalse( prefs.pageExists( "Java" ) );
         assertFalse( prefs.pageExists( "General", "Quick Search" ) );
+        assertFalse( prefs.pageExists( "General", "Network Connections" ) );
 
         prefs.clickCancelButton();
     }