directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1227245 - /directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServerActionFilterAdapter.java
Date Wed, 04 Jan 2012 18:05:57 GMT
Author: pamarcelot
Date: Wed Jan  4 18:05:56 2012
New Revision: 1227245

URL: http://svn.apache.org/viewvc?rev=1227245&view=rev
Log:
Tweaked contributed action to only show when the LDAP Perspective is available. (Forgot this
class in the last commit).

Modified:
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServerActionFilterAdapter.java

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServerActionFilterAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServerActionFilterAdapter.java?rev=1227245&r1=1227244&r2=1227245&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServerActionFilterAdapter.java
(original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServerActionFilterAdapter.java
Wed Jan  4 18:05:56 2012
@@ -21,6 +21,7 @@
 package org.apache.directory.studio.ldapservers.model;
 
 
+import org.apache.directory.studio.ldapservers.actions.CreateConnectionActionHelper;
 import org.eclipse.ui.IActionFilter;
 
 
@@ -45,6 +46,7 @@ public class LdapServerActionFilterAdapt
     private static final Object EXTENSION_VERSION = "extensionVersion";
     private static final Object EXTENSION_VENDOR = "extensionVendor";
     private static final Object HAS_CONFIGURATION_PAGE = "hasConfigurationPage";
+    private static final Object IS_LDAP_PERSPECTIVE_AVAILABLE = "isLdapPerspectiveAvailable";
 
     /** The class instance */
     private static LdapServerActionFilterAdapter INSTANCE = new LdapServerActionFilterAdapter();
@@ -150,6 +152,14 @@ public class LdapServerActionFilterAdapt
 
                 return value.equalsIgnoreCase( hasConfigurationPage ? "true" : "false" );
             }
+            // IS LDAP PERSPECTIVE AVAILABLE
+            else if ( IS_LDAP_PERSPECTIVE_AVAILABLE.equals( name ) )
+            {
+                boolean isLdapPerspectiveAvailable = CreateConnectionActionHelper.isLdapBrowserPluginsAvailable();
+                boolean booleanValue = Boolean.parseBoolean( value );
+
+                return isLdapPerspectiveAvailable == booleanValue;
+            }
         }
 
         return false;



Mime
View raw message