directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1045094 - in /directory/studio/trunk/plugins: apacheds.configuration/ apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/ apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/config...
Date Mon, 13 Dec 2010 12:32:15 GMT
Author: pamarcelot
Date: Mon Dec 13 12:32:15 2010
New Revision: 1045094

URL: http://svn.apache.org/viewvc?rev=1045094&view=rev
Log:
Moved the 'isIDEEnvironment()' method to the 'CommonUIUtils' class in the 'common.ui' plugin.

Removed:
    directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/ApacheDSConfigurationPluginUtils.java
Modified:
    directory/studio/trunk/plugins/apacheds.configuration/pom.xml
    directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java
    directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIUtils.java
    directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonActivator.java
    directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java
    directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java

Modified: directory/studio/trunk/plugins/apacheds.configuration/pom.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/pom.xml?rev=1045094&r1=1045093&r2=1045094&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/pom.xml (original)
+++ directory/studio/trunk/plugins/apacheds.configuration/pom.xml Mon Dec 13 12:32:15 2010
@@ -111,6 +111,7 @@
             <Eclipse-LazyStart>true</Eclipse-LazyStart>
             <Bundle-Activator>org.apache.directory.studio.apacheds.configuration.ApacheDSConfigurationPlugin</Bundle-Activator>
             <Require-Bundle>org.apache.directory.shared.ldap;bundle-version="${org.apache.directory.shared.validversion}",
+ org.apache.directory.studio.common.ui,
  org.eclipse.core.resources,
  org.eclipse.core.runtime,
  org.eclipse.jface.text,
@@ -157,6 +158,13 @@
       <scope>provided</scope>
     </dependency>
     
+  	<!-- Apache Directory Studio plugins dependencies -->
+    <dependency>
+      <groupId>org.apache.directory.studio</groupId>
+      <artifactId>common.ui</artifactId>
+      <scope>provided</scope>
+    </dependency>
+    
 	<!-- Eclipse plugins dependencies -->
     <dependency>
       <groupId>org.eclipse.swt.gtk.linux</groupId>

Modified: directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java?rev=1045094&r1=1045093&r2=1045094&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java
(original)
+++ directory/studio/trunk/plugins/apacheds.configuration/src/main/java/org/apache/directory/studio/apacheds/configuration/editor/ServerConfigurationEditor.java
Mon Dec 13 12:32:15 2010
@@ -32,7 +32,6 @@ import java.lang.reflect.InvocationTarge
 
 import org.apache.directory.studio.apacheds.configuration.ApacheDSConfigurationPlugin;
 import org.apache.directory.studio.apacheds.configuration.ApacheDSConfigurationPluginConstants;
-import org.apache.directory.studio.apacheds.configuration.ApacheDSConfigurationPluginUtils;
 import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
 import org.apache.directory.studio.apacheds.configuration.model.ServerXmlIO;
 import org.apache.directory.studio.apacheds.configuration.model.ServerXmlIOException;
@@ -44,6 +43,7 @@ import org.apache.directory.studio.apach
 import org.apache.directory.studio.apacheds.configuration.model.v155.ServerXmlIOV155;
 import org.apache.directory.studio.apacheds.configuration.model.v156.ServerXmlIOV156;
 import org.apache.directory.studio.apacheds.configuration.model.v157.ServerXmlIOV157;
+import org.apache.directory.studio.common.ui.CommonUIUtils;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.ResourcesPlugin;
 import org.eclipse.core.runtime.CoreException;
@@ -648,7 +648,7 @@ public class ServerConfigurationEditor e
     {
         // detect IDE or RCP:
         // check if perspective org.eclipse.ui.resourcePerspective is available
-        boolean isIDE = ApacheDSConfigurationPluginUtils.isIDEEnvironment();
+        boolean isIDE = CommonUIUtils.isIDEEnvironment();
 
         if ( isIDE )
         {

Modified: directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIUtils.java?rev=1045094&r1=1045093&r2=1045094&view=diff
==============================================================================
--- directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIUtils.java
(original)
+++ directory/studio/trunk/plugins/common.ui/src/main/java/org/apache/directory/studio/common/ui/CommonUIUtils.java
Mon Dec 13 12:32:15 2010
@@ -20,6 +20,10 @@
 package org.apache.directory.studio.common.ui;
 
 
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.IExtension;
+import org.eclipse.core.runtime.IExtensionPoint;
+import org.eclipse.core.runtime.Platform;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
 import org.eclipse.ui.PlatformUI;
@@ -117,4 +121,42 @@ public class CommonUIUtils
                 { IDialogConstants.OK_LABEL }, MessageDialog.OK );
         dialog.open();
     }
+
+
+    /**
+     * Checks, if this plugins runs in the Eclipse IDE or in RCP environment.
+     * This is done by looking for the Resource perspective extensions.
+     *
+     * @return true if this plugin runs in IDE environment
+     */
+    public static boolean isIDEEnvironment()
+    {
+        IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(
+            "org.eclipse.ui.perspectives" ); //$NON-NLS-1$
+        if ( extensionPoint != null )
+        {
+            IExtension[] extensions = extensionPoint.getExtensions();
+            if ( extensions != null )
+            {
+                for ( int i = 0; i < extensions.length; i++ )
+                {
+                    IExtension extension = extensions[i];
+                    IConfigurationElement[] elements = extension.getConfigurationElements();
+                    for ( int j = 0; j < elements.length; j++ )
+                    {
+                        IConfigurationElement element = elements[j];
+                        if ( element.getName().equals( "perspective" ) ) //$NON-NLS-1$
+                        {
+                            if ( "org.eclipse.ui.resourcePerspective".equals( element.getAttribute(
"id" ) ) ) //$NON-NLS-1$ //$NON-NLS-2$
+                            {
+                                return true;
+                            }
+                        }
+                    }
+                }
+            }
+        }
+
+        return false;
+    }
 }

Modified: directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonActivator.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonActivator.java?rev=1045094&r1=1045093&r2=1045094&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonActivator.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonActivator.java
Mon Dec 13 12:32:15 2010
@@ -322,44 +322,6 @@ public class BrowserCommonActivator exte
 
 
     /**
-     * Checks, if this plugins runs in the Eclipse IDE or in RCP environment.
-     * This is done by looking for the Resource perspective extensions.
-     *
-     * @return true if this plugin runs in IDE environment
-     */
-    public static boolean isIDEEnvironment()
-    {
-        IExtensionPoint extensionPoint = Platform.getExtensionRegistry().getExtensionPoint(
-            "org.eclipse.ui.perspectives" ); //$NON-NLS-1$
-        if ( extensionPoint != null )
-        {
-            IExtension[] extensions = extensionPoint.getExtensions();
-            if ( extensions != null )
-            {
-                for ( int i = 0; i < extensions.length; i++ )
-                {
-                    IExtension extension = extensions[i];
-                    IConfigurationElement[] elements = extension.getConfigurationElements();
-                    for ( int j = 0; j < elements.length; j++ )
-                    {
-                        IConfigurationElement element = elements[j];
-                        if ( element.getName().equals( "perspective" ) ) //$NON-NLS-1$
-                        {
-                            if ( "org.eclipse.ui.resourcePerspective".equals( element.getAttribute(
"id" ) ) ) //$NON-NLS-1$ //$NON-NLS-2$
-                            {
-                                return true;
-                            }
-                        }
-                    }
-                }
-            }
-        }
-
-        return false;
-    }
-
-
-    /**
      * Gets the event runner.
      *
      * @return the event runner

Modified: directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java?rev=1045094&r1=1045093&r2=1045094&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java
(original)
+++ directory/studio/trunk/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java
Mon Dec 13 12:32:15 2010
@@ -21,8 +21,8 @@
 package org.apache.directory.studio.ldapbrowser.ui.perspective;
 
 
+import org.apache.directory.studio.common.ui.CommonUIUtils;
 import org.apache.directory.studio.connection.ui.wizards.NewConnectionWizard;
-import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
 import org.apache.directory.studio.ldapbrowser.common.wizards.NewContextEntryWizard;
 import org.apache.directory.studio.ldapbrowser.common.wizards.NewEntryWizard;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
@@ -136,7 +136,7 @@ public class BrowserPerspective implemen
         logFolder.addPlaceholder( "*" ); //$NON-NLS-1$
 
         // non-closable?
-        boolean isIDE = BrowserCommonActivator.isIDEEnvironment();
+        boolean isIDE = CommonUIUtils.isIDEEnvironment();
         if ( !isIDE )
         {
             layout.getViewLayout( BrowserView.getId() ).setCloseable( false );

Modified: directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java?rev=1045094&r1=1045093&r2=1045094&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java
(original)
+++ directory/studio/trunk/plugins/ldifeditor/src/main/java/org/apache/directory/studio/ldifeditor/editor/LdifEditor.java
Mon Dec 13 12:32:15 2010
@@ -24,6 +24,7 @@ package org.apache.directory.studio.ldif
 import java.io.File;
 import java.util.ResourceBundle;
 
+import org.apache.directory.studio.common.ui.CommonUIUtils;
 import org.apache.directory.studio.common.ui.widgets.BaseWidgetUtils;
 import org.apache.directory.studio.connection.core.Connection;
 import org.apache.directory.studio.connection.core.ConnectionFolder;
@@ -719,7 +720,7 @@ public class LdifEditor extends TextEdit
     {
         // detect IDE or RCP:
         // check if perspective org.eclipse.ui.resourcePerspective is available
-        boolean isIDE = BrowserCommonActivator.isIDEEnvironment();
+        boolean isIDE = CommonUIUtils.isIDEEnvironment();
 
         if ( isIDE )
         {



Mime
View raw message