directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r986301 - in /directory/studio/trunk/plugins: ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/ ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/ ldap...
Date Tue, 17 Aug 2010 13:26:09 GMT
Author: pamarcelot
Date: Tue Aug 17 13:26:08 2010
New Revision: 986301

URL: http://svn.apache.org/viewvc?rev=986301&view=rev
Log:
Added a new action and runnable to open the configuration of a server by double-clicking it in the 'LDAP Servers' view.

Added:
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/OpenConfigurationAction.java
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/OpenConfigurationLdapServerRunnable.java
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/PathEditorInput.java
Modified:
    directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/ApacheDS153LdapServerAdapter.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/ApacheDS154LdapServerAdapter.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/ApacheDS155LdapServerAdapter.java
    directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/ApacheDS156LdapServerAdapter.java
    directory/studio/trunk/plugins/ldapservers/plugin.properties
    directory/studio/trunk/plugins/ldapservers/plugin.xml
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersPluginConstants.java
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages.properties
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages_de.properties
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages_fr.properties
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/DeleteLdapServerRunnable.java
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages.properties
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages_de.properties
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages_fr.properties
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServerAdapter.java
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/UnknownLdapServerAdapterExtension.java
    directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/views/ServersView.java

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/ApacheDS153LdapServerAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/ApacheDS153LdapServerAdapter.java?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/ApacheDS153LdapServerAdapter.java (original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v153/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v153/ApacheDS153LdapServerAdapter.java Tue Aug 17 13:26:08 2010
@@ -27,6 +27,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 
+import org.apache.directory.studio.apacheds.configuration.editor.ServerConfigurationEditor;
 import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
 import org.apache.directory.studio.apacheds.configuration.model.ServerXmlIOException;
 import org.apache.directory.studio.apacheds.configuration.model.v153.ServerConfigurationV153;
@@ -34,11 +35,15 @@ import org.apache.directory.studio.apach
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapservers.LdapServersManager;
 import org.apache.directory.studio.ldapservers.LdapServersUtils;
+import org.apache.directory.studio.ldapservers.jobs.PathEditorInput;
 import org.apache.directory.studio.ldapservers.model.LdapServer;
 import org.apache.directory.studio.ldapservers.model.LdapServerAdapter;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.debug.core.ILaunch;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
 import org.osgi.framework.Bundle;
 
 
@@ -114,7 +119,7 @@ public class ApacheDS153LdapServerAdapte
     /**
      * {@inheritDoc}
      */
-    public void delete( LdapServer server ) throws Exception
+    public void delete( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
         // Nothing to do (nothing more than the default behavior of 
         // the delete action before this method is called)
@@ -124,6 +129,32 @@ public class ApacheDS153LdapServerAdapte
     /**
      * {@inheritDoc}
      */
+    public void openConfiguration( final LdapServer server, final StudioProgressMonitor monitor ) throws Exception
+    {
+        // Opening the editor
+        Display.getDefault().syncExec( new Runnable()
+        {
+            public void run()
+            {
+                try
+                {
+                    PathEditorInput input = new PathEditorInput( LdapServersManager.getServerFolder( server )
+                        .append( "conf" ).append( "server.xml" ) ); //$NON-NLS-1$ //$NON-NLS-2$
+                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+                        .openEditor( input, ServerConfigurationEditor.ID );
+                }
+                catch ( PartInitException e )
+                {
+                    monitor.reportError( e );
+                }
+            }
+        } );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public void start( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
         // Launching Apache DS

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/ApacheDS154LdapServerAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/ApacheDS154LdapServerAdapter.java?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/ApacheDS154LdapServerAdapter.java (original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v154/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v154/ApacheDS154LdapServerAdapter.java Tue Aug 17 13:26:08 2010
@@ -27,6 +27,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 
+import org.apache.directory.studio.apacheds.configuration.editor.ServerConfigurationEditor;
 import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
 import org.apache.directory.studio.apacheds.configuration.model.ServerXmlIOException;
 import org.apache.directory.studio.apacheds.configuration.model.v154.ServerConfigurationV154;
@@ -34,11 +35,15 @@ import org.apache.directory.studio.apach
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapservers.LdapServersManager;
 import org.apache.directory.studio.ldapservers.LdapServersUtils;
+import org.apache.directory.studio.ldapservers.jobs.PathEditorInput;
 import org.apache.directory.studio.ldapservers.model.LdapServer;
 import org.apache.directory.studio.ldapservers.model.LdapServerAdapter;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.debug.core.ILaunch;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
 import org.osgi.framework.Bundle;
 
 
@@ -116,7 +121,7 @@ public class ApacheDS154LdapServerAdapte
     /**
      * {@inheritDoc}
      */
-    public void delete( LdapServer server ) throws Exception
+    public void delete( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
         // Nothing to do (nothing more than the default behavior of 
         // the delete action before this method is called)
@@ -126,6 +131,32 @@ public class ApacheDS154LdapServerAdapte
     /**
      * {@inheritDoc}
      */
+    public void openConfiguration( final LdapServer server, final StudioProgressMonitor monitor ) throws Exception
+    {
+        // Opening the editor
+        Display.getDefault().syncExec( new Runnable()
+        {
+            public void run()
+            {
+                try
+                {
+                    PathEditorInput input = new PathEditorInput( LdapServersManager.getServerFolder( server )
+                        .append( "conf" ).append( "server.xml" ) ); //$NON-NLS-1$ //$NON-NLS-2$
+                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+                        .openEditor( input, ServerConfigurationEditor.ID );
+                }
+                catch ( PartInitException e )
+                {
+                    monitor.reportError( e );
+                }
+            }
+        } );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public void start( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
         // Launching Apache DS

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/ApacheDS155LdapServerAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/ApacheDS155LdapServerAdapter.java?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/ApacheDS155LdapServerAdapter.java (original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v155/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v155/ApacheDS155LdapServerAdapter.java Tue Aug 17 13:26:08 2010
@@ -27,6 +27,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 
+import org.apache.directory.studio.apacheds.configuration.editor.ServerConfigurationEditor;
 import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
 import org.apache.directory.studio.apacheds.configuration.model.ServerXmlIOException;
 import org.apache.directory.studio.apacheds.configuration.model.v155.ServerConfigurationV155;
@@ -34,11 +35,15 @@ import org.apache.directory.studio.apach
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapservers.LdapServersManager;
 import org.apache.directory.studio.ldapservers.LdapServersUtils;
+import org.apache.directory.studio.ldapservers.jobs.PathEditorInput;
 import org.apache.directory.studio.ldapservers.model.LdapServer;
 import org.apache.directory.studio.ldapservers.model.LdapServerAdapter;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.debug.core.ILaunch;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
 import org.osgi.framework.Bundle;
 
 
@@ -116,7 +121,7 @@ public class ApacheDS155LdapServerAdapte
     /**
      * {@inheritDoc}
      */
-    public void delete( LdapServer server ) throws Exception
+    public void delete( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
         // Nothing to do (nothing more than the default behavior of 
         // the delete action before this method is called)
@@ -126,6 +131,32 @@ public class ApacheDS155LdapServerAdapte
     /**
      * {@inheritDoc}
      */
+    public void openConfiguration( final LdapServer server, final StudioProgressMonitor monitor ) throws Exception
+    {
+        // Opening the editor
+        Display.getDefault().syncExec( new Runnable()
+        {
+            public void run()
+            {
+                try
+                {
+                    PathEditorInput input = new PathEditorInput( LdapServersManager.getServerFolder( server )
+                        .append( "conf" ).append( "server.xml" ) ); //$NON-NLS-1$ //$NON-NLS-2$
+                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+                        .openEditor( input, ServerConfigurationEditor.ID );
+                }
+                catch ( PartInitException e )
+                {
+                    monitor.reportError( e );
+                }
+            }
+        } );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public void start( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
         // Launching Apache DS

Modified: directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/ApacheDS156LdapServerAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/ApacheDS156LdapServerAdapter.java?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/ApacheDS156LdapServerAdapter.java (original)
+++ directory/studio/trunk/plugins/ldapservers.apacheds.v156/src/main/java/org/apache/directory/studio/ldapservers/apacheds/v156/ApacheDS156LdapServerAdapter.java Tue Aug 17 13:26:08 2010
@@ -27,6 +27,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 
+import org.apache.directory.studio.apacheds.configuration.editor.ServerConfigurationEditor;
 import org.apache.directory.studio.apacheds.configuration.model.ServerConfiguration;
 import org.apache.directory.studio.apacheds.configuration.model.ServerXmlIOException;
 import org.apache.directory.studio.apacheds.configuration.model.v156.ServerConfigurationV156;
@@ -34,11 +35,15 @@ import org.apache.directory.studio.apach
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
 import org.apache.directory.studio.ldapservers.LdapServersManager;
 import org.apache.directory.studio.ldapservers.LdapServersUtils;
+import org.apache.directory.studio.ldapservers.jobs.PathEditorInput;
 import org.apache.directory.studio.ldapservers.model.LdapServer;
 import org.apache.directory.studio.ldapservers.model.LdapServerAdapter;
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.debug.core.ILaunch;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
 import org.osgi.framework.Bundle;
 
 
@@ -121,7 +126,7 @@ public class ApacheDS156LdapServerAdapte
     /**
      * {@inheritDoc}
      */
-    public void delete( LdapServer server ) throws Exception
+    public void delete( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
         // Nothing to do (nothing more than the default behavior of 
         // the delete action before this method is called)
@@ -131,6 +136,32 @@ public class ApacheDS156LdapServerAdapte
     /**
      * {@inheritDoc}
      */
+    public void openConfiguration( final LdapServer server, final StudioProgressMonitor monitor ) throws Exception
+    {
+        // Opening the editor
+        Display.getDefault().syncExec( new Runnable()
+        {
+            public void run()
+            {
+                try
+                {
+                    PathEditorInput input = new PathEditorInput( LdapServersManager.getServerFolder( server )
+                        .append( "conf" ).append( "server.xml" ) ); //$NON-NLS-1$ //$NON-NLS-2$
+                    PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
+                        .openEditor( input, ServerConfigurationEditor.ID );
+                }
+                catch ( PartInitException e )
+                {
+                    monitor.reportError( e );
+                }
+            }
+        } );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public void start( LdapServer server, StudioProgressMonitor monitor ) throws Exception
     {
         // Launching Apache DS

Modified: directory/studio/trunk/plugins/ldapservers/plugin.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/plugin.properties?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/plugin.properties (original)
+++ directory/studio/trunk/plugins/ldapservers/plugin.properties Tue Aug 17 13:26:08 2010
@@ -53,6 +53,10 @@ Cmd_Properties_id=org.apache.directory.s
 Cmd_Properties_name=Properties
 Cmd_Properties_description=Shows the properties of the server
 
+Cmd_OpenConfiguration_id=org.apache.directory.studio.ldapservers.commands.openConfiguration
+Cmd_OpenConfiguration_name=Open Configuration
+Cmd_OpenConfiguration_description=Open Configuration
+
 Ctx_ServersView_id=org.apache.directory.studio.ldapservers.contexts.serversView
 Ctx_ServersView_name=In LDAP Servers View
 Ctx_ServersView_description=In LDAP Servers View
\ No newline at end of file

Modified: directory/studio/trunk/plugins/ldapservers/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/plugin.xml?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/plugin.xml (original)
+++ directory/studio/trunk/plugins/ldapservers/plugin.xml Tue Aug 17 13:26:08 2010
@@ -94,6 +94,12 @@
             id="%Cmd_Properties_id"
             name="%Cmd_Properties_name">
       </command>
+      <command
+            categoryId="%Cmd_Category_id"
+            description="%Cmd_OpenConfiguration_description"
+            id="%Cmd_OpenConfiguration_id"
+            name="%Cmd_OpenConfiguration_name">
+      </command>
    </extension>
    
    <extension
@@ -138,5 +144,10 @@
             contextId="%Ctx_ServersView_id"
             schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
             sequence="ALT+RETURN"/>
+      <key
+            commandId="%Cmd_OpenConfiguration_id"
+            contextId="%Ctx_ServersView_id"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="F3"/>
    </extension>
 </plugin>

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersPluginConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersPluginConstants.java?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersPluginConstants.java (original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersPluginConstants.java Tue Aug 17 13:26:08 2010
@@ -21,6 +21,8 @@
 package org.apache.directory.studio.ldapservers;
 
 
+
+
 /**
  * Constants used in the LDAP Servers plugin.
  *
@@ -59,6 +61,8 @@ public interface LdapServersPluginConsta
         .getString( "Cmd_Delete_id" ); //$NON-NLS-1$
     public static final String CMD_NEW_SERVER = LdapServersPlugin.getDefault().getPluginProperties()
         .getString( "Cmd_NewServer_id" ); //$NON-NLS-1$
+    public static final String CMD_OPEN_CONFIGURATION = LdapServersPlugin.getDefault().getPluginProperties()
+        .getString( "Cmd_OpenConfiguration_id" );
     public static final String CMD_PROPERTIES = LdapServersPlugin.getDefault().getPluginProperties()
         .getString( "Cmd_Properties_id" ); //$NON-NLS-1$
     public static final String CMD_RENAME = LdapServersPlugin.getDefault().getPluginProperties()

Added: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/OpenConfigurationAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/OpenConfigurationAction.java?rev=986301&view=auto
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/OpenConfigurationAction.java (added)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/OpenConfigurationAction.java Tue Aug 17 13:26:08 2010
@@ -0,0 +1,283 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.directory.studio.ldapservers.actions;
+
+
+import org.apache.directory.studio.ldapservers.LdapServersPluginConstants;
+import org.apache.directory.studio.ldapservers.jobs.OpenConfigurationLdapServerRunnable;
+import org.apache.directory.studio.ldapservers.jobs.StudioLdapServerJob;
+import org.apache.directory.studio.ldapservers.model.LdapServer;
+import org.apache.directory.studio.ldapservers.views.ServersView;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.IPathEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the open action for a server.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class OpenConfigurationAction extends Action implements IWorkbenchWindowActionDelegate
+{
+    /** The associated view */
+    private ServersView view;
+
+
+    /**
+     * Creates a new instance of OpenConfigurationAction.
+     */
+    public OpenConfigurationAction()
+    {
+        super( Messages.getString( "OpenConfigurationAction.OpenConfiguration" ) ); //$NON-NLS-1$
+        init();
+    }
+
+
+    /**
+     * Creates a new instance of OpenConfigurationAction.
+     * 
+     * @param view
+     *      the associated view
+     */
+    public OpenConfigurationAction( ServersView view )
+    {
+        super( Messages.getString( "OpenConfigurationAction.OpenConfiguration" ) ); //$NON-NLS-1$
+        this.view = view;
+        init();
+    }
+
+
+    /**
+     * Initializes the action.
+     */
+    private void init()
+    {
+        setId( LdapServersPluginConstants.CMD_OPEN_CONFIGURATION );
+        setActionDefinitionId( LdapServersPluginConstants.CMD_OPEN_CONFIGURATION );
+        setToolTipText( Messages.getString( "OpenConfigurationAction.OpenConfigurationToolTip" ) ); //$NON-NLS-1$
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.action.Action#run()
+     */
+    public void run()
+    {
+        if ( view != null )
+        {
+            // Getting the selection
+            StructuredSelection selection = ( StructuredSelection ) view.getViewer().getSelection();
+            if ( ( !selection.isEmpty() ) && ( selection.size() == 1 ) )
+            {
+                // Getting the server
+                LdapServer server = ( LdapServer ) selection.getFirstElement();
+
+                // Creating and scheduling the job to start the server
+                StudioLdapServerJob job = new StudioLdapServerJob( new OpenConfigurationLdapServerRunnable( server ) );
+                job.schedule();
+            }
+        }
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
+     */
+    public void run( IAction action )
+    {
+        run();
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#dispose()
+     */
+    public void dispose()
+    {
+        // Nothing to do
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IWorkbenchWindowActionDelegate#init(org.eclipse.ui.IWorkbenchWindow)
+     */
+    public void init( IWorkbenchWindow window )
+    {
+        // Nothing to do
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.ui.IActionDelegate#selectionChanged(org.eclipse.jface.action.IAction, org.eclipse.jface.viewers.ISelection)
+     */
+    public void selectionChanged( IAction action, ISelection selection )
+    {
+        // Nothing to do
+    }
+
+    /**
+     * This IEditorInput is used to open files that are located in the local file system.
+     * 
+     * Inspired from org.eclipse.ui.internal.editors.text.NonExistingFileEditorInput.java
+     *
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     */
+    class PathEditorInput implements IPathEditorInput
+    {
+        /** The absolute path in local file system */
+        private IPath path;
+
+
+        /**
+         * 
+         * Creates a new instance of PathEditorInput.
+         *
+         * @param path the absolute path
+         */
+        public PathEditorInput( IPath path )
+        {
+            if ( path == null )
+            {
+                throw new IllegalArgumentException();
+            }
+
+            this.path = path;
+        }
+
+
+        /**
+         * Returns hash code of the path.
+         */
+        public int hashCode()
+        {
+            return path.hashCode();
+        }
+
+
+        /** 
+         * This implemention just compares the paths
+         */
+        public boolean equals( Object o )
+        {
+            if ( this == o )
+            {
+                return true;
+            }
+
+            if ( o instanceof PathEditorInput )
+            {
+                PathEditorInput input = ( PathEditorInput ) o;
+                return path.equals( input.path );
+            }
+
+            return false;
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public boolean exists()
+        {
+            return path.toFile().exists();
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public ImageDescriptor getImageDescriptor()
+        {
+            return PlatformUI.getWorkbench().getEditorRegistry().getImageDescriptor( path.toString() );
+        }
+
+
+        /**
+         * Returns the file name only.
+         */
+        public String getName()
+        {
+            return path.toFile().getName();
+            //return path.toString();
+        }
+
+
+        /**
+         * Returns the complete path. 
+         */
+        public String getToolTipText()
+        {
+            return path.makeRelative().toOSString();
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public IPath getPath()
+        {
+            return path;
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        @SuppressWarnings("unchecked")
+        public Object getAdapter( Class adapter )
+        {
+            return Platform.getAdapterManager().getAdapter( this, adapter );
+        }
+
+
+        /**
+         * {@inheritDoc}
+         */
+        public IPersistableElement getPersistable()
+        {
+            return null;
+        }
+
+
+        /**
+         * Returns the path.
+         */
+        public IPath getErrorMessage( Object element )
+        {
+            if ( element instanceof PathEditorInput )
+            {
+                PathEditorInput input = ( PathEditorInput ) element;
+                return input.getPath();
+            }
+
+            return null;
+        }
+    }
+}

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages.properties?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages.properties (original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages.properties Tue Aug 17 13:26:08 2010
@@ -18,15 +18,22 @@
 DeleteAction.Delete=&Delete
 DeleteAction.DeleteToolTip=Delete
 DeleteAction.ErrorWhileStopping=An error occurred when stopping the server.\n\n
+
 NewServerAction.NewServer=New &Server
 NewServerAction.NewServerToolTip=New Server
+
+OpenConfigurationAction.OpenConfiguration=&Open Configuration
+OpenConfigurationAction.OpenConfigurationToolTip=Open Configuration
+
 PropertiesAction.Properties=&Properties
 PropertiesAction.PropertiesFor=Properties for "{0}"
 PropertiesAction.PropertiesToolTip=Properties
+
 RenameAction.ErrorNameInUse=The name is already in use. Specify a different name.
 RenameAction.Rename=R&ename...
 RenameAction.RenameToolTip=Rename...
 RenameAction.Server=Server
+
 StartAction.ChangePasswordPort=ChangePassword (port {0})
 StartAction.Continue=Do you wish to continue?
 StartAction.DNSPort=DNS (port {0})
@@ -42,6 +49,7 @@ StartAction.PortsOfProtocolsInUse=The po
 StartAction.Start=&Run
 StartAction.StartToolTip=Run
 StartAction.UnableReadServerConfiguration=Unable to read the server configuration.
+
 StopAction.ErrorWhenStopping=An error occurred when stopping the server.\n\n
 StopAction.ErrorWhenWriting=An error occurred when writing to the Info console message stream.\n\n
 StopAction.ServerStopped=Server stopped.\n

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages_de.properties?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages_de.properties (original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages_de.properties Tue Aug 17 13:26:08 2010
@@ -18,14 +18,21 @@
 DeleteAction.Delete=&L\u00F6schen
 DeleteAction.DeleteToolTip=L\u00F6schen
 DeleteAction.ErrorWhileStopping=Beim Stoppen des Servers ist ein Fehler aufgetreten.\n\n
+
 NewServerAction.NewServer=Neuer &Server
 NewServerAction.NewServerToolTip=Neuer Server
+
+OpenConfigurationAction.OpenConfiguration=Konfiguration &\u00F6ffnen
+OpenConfigurationAction.OpenConfigurationToolTip=Konfiguration \u00F6ffnen
+
 PropertiesAction.Properties=&Eigenschaften
 PropertiesAction.PropertiesFor=Eigenschaften f\u00FCr "{0}"
 PropertiesAction.PropertiesToolTip=Eigenschaften
+
 RenameAction.ErrorNameInUse=Der Name wird bereits verwendet. Geben Sie einen anderen Namen an.
 RenameAction.Rename=Umb&enennen...
 RenameAction.RenameToolTip=Umbenennen...
+
 StartAction.Continue=Wollen Sie weiterfahren?
 StartAction.FollowingErrorOccurred=Folgender Fehler ist aufgetreten\: 
 StartAction.PortInUse=Der Port wird bereits verwendet
@@ -35,6 +42,7 @@ StartAction.PortsOfProtocolsInUse=Die Po
 StartAction.UnableReadServerConfiguration=Unf\u00E4hig die Server Konfiguration zu lesen.
 StartAction.Start=&Starten
 StartAction.StartToolTip=Starten
+
 StopAction.Stop=S&toppen
 StopAction.StopToolTip=Stoppen
 StopAction.ErrorWhenStopping=Beim Stoppen des Servers ist ein Fehler aufgetreten.\n\n

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages_fr.properties?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages_fr.properties (original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages_fr.properties Tue Aug 17 13:26:08 2010
@@ -26,15 +26,22 @@
 DeleteAction.Delete=&Supprimer
 DeleteAction.DeleteToolTip=Supprimer
 DeleteAction.ErrorWhileStopping=Une erreur est survenue lors de l'arr\u00EAt du serveur.\n\n
+
 NewServerAction.NewServer=&Nouveau serveur
 NewServerAction.NewServerToolTip=Nouveau serveur
+
+OpenConfigurationAction.OpenConfiguration=&Ouvrir la configuration
+OpenConfigurationAction.OpenConfigurationToolTip=Ouvrir la configuration
+
 PropertiesAction.Properties=&Propri\u00E9t\u00E9s
 PropertiesAction.PropertiesFor=Propri\u00E9t\u00E9s du serveur "{0}"
 PropertiesAction.PropertiesToolTip=Propri\u00E9t\u00E9s
+
 RenameAction.ErrorNameInUse=Ce nom est d\u00E9j\u00E0 utilis\u00E9. Veuillez en s\u00E9lectionner un autre.
 RenameAction.Rename=&Renommer...
 RenameAction.RenameToolTip=Renommer...
 RenameAction.Server=Serveur
+
 StartAction.Continue=Voulez-vous poursuivre l'op\u00E9ration ?
 StartAction.FollowingErrorOccurred=L'erreur suivante est survenue \:
 StartAction.PortInUse=Le port est d\u00E9j\u00E0 utilis\u00E9
@@ -44,6 +51,7 @@ StartAction.PortsOfProtocolsInUse=Les po
 StartAction.Start=&D\u00E9marrer
 StartAction.StartToolTip=D\u00E9marrer
 StartAction.UnableReadServerConfiguration=Impossible de lire la configuration du serveur.
+
 StopAction.ErrorWhenStopping=Une erreur est survenue lors de l'arr\u00EAt du serveur.\n\n
 StopAction.ErrorWhenWriting=Une erreur est survenue lors de l'\u00E9criture dans la console d'information.\n\n
 StopAction.ServerStopped=Le serveur est arr\u00EAt\u00E9.\n

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/DeleteLdapServerRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/DeleteLdapServerRunnable.java?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/DeleteLdapServerRunnable.java (original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/DeleteLdapServerRunnable.java Tue Aug 17 13:26:08 2010
@@ -61,7 +61,7 @@ public class DeleteLdapServerRunnable im
      */
     public String getErrorMessage()
     {
-        return NLS.bind( "Unable to start server ''{0}''", new String[]
+        return NLS.bind( "Unable to delete server ''{0}''", new String[]
             { server.getName() } );
     }
 
@@ -81,8 +81,8 @@ public class DeleteLdapServerRunnable im
      */
     public String getName()
     {
-        return NLS
-            .bind( Messages.getString( "DeleteLdapServerRunnable.DeleteServer" ), new String[] { server.getName() } ); //$NON-NLS-1$
+        return NLS.bind(
+            Messages.getString( "DeleteLdapServerRunnable.DeleteServer" ), new String[] { server.getName() } ); //$NON-NLS-1$
     }
 
 
@@ -113,7 +113,7 @@ public class DeleteLdapServerRunnable im
             deleteDirectory( LdapServersManager.getServerFolder( server ).toFile() );
 
             // Letting the LDAP Server Adapter finish the deletion of the server
-            server.getLdapServerAdapterExtension().getInstance().delete( server );
+            server.getLdapServerAdapterExtension().getInstance().delete( server, monitor );
         }
         catch ( InterruptedException e )
         {

Added: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/OpenConfigurationLdapServerRunnable.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/OpenConfigurationLdapServerRunnable.java?rev=986301&view=auto
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/OpenConfigurationLdapServerRunnable.java (added)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/OpenConfigurationLdapServerRunnable.java Tue Aug 17 13:26:08 2010
@@ -0,0 +1,102 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+
+package org.apache.directory.studio.ldapservers.jobs;
+
+
+import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
+import org.apache.directory.studio.common.core.jobs.StudioRunnableWithProgress;
+import org.apache.directory.studio.ldapservers.model.LdapServer;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.osgi.util.NLS;
+
+
+/**
+ * This class implements a {@link Job} that is used to delete an LDAP Server.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class OpenConfigurationLdapServerRunnable implements StudioRunnableWithProgress
+{
+    /** The server */
+    private LdapServer server;
+
+
+    /**
+     * Creates a new instance of StartLdapServerRunnable.
+     * 
+     * @param server
+     *            the LDAP Server
+     */
+    public OpenConfigurationLdapServerRunnable( LdapServer server )
+    {
+        super();
+        this.server = server;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getErrorMessage()
+    {
+        return NLS.bind( "Unable to open configuration for server ''{0}''", new String[]
+            { server.getName() } );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public Object[] getLockedObjects()
+    {
+        return new Object[]
+            { server };
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getName()
+    {
+        return NLS
+            .bind(
+                Messages.getString( "OpenConfigurationLdapServerRunnable.OpenConfigurationForServer" ), new String[] { server.getName() } ); //$NON-NLS-1$
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void run( StudioProgressMonitor monitor )
+    {
+        try
+        {
+            // Letting the LDAP Server Adapter open the configuration of the server
+            server.getLdapServerAdapterExtension().getInstance().openConfiguration( server, monitor );
+        }
+        catch ( Exception e )
+        {
+            // Reporting the error to the monitor
+            monitor.reportError( e );
+        }
+    }
+}

Added: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/PathEditorInput.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/PathEditorInput.java?rev=986301&view=auto
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/PathEditorInput.java (added)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/PathEditorInput.java Tue Aug 17 13:26:08 2010
@@ -0,0 +1,147 @@
+package org.apache.directory.studio.ldapservers.jobs;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.IPathEditorInput;
+import org.eclipse.ui.IPersistableElement;
+import org.eclipse.ui.PlatformUI;
+
+/**
+ * This IEditorInput is used to open files that are located in the local file system.
+ * 
+ * Inspired from org.eclipse.ui.internal.editors.text.NonExistingFileEditorInput.java
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class PathEditorInput implements IPathEditorInput
+{
+    /** The absolute path in local file system */
+    private IPath path;
+
+
+    /**
+     * 
+     * Creates a new instance of PathEditorInput.
+     *
+     * @param path the absolute path
+     */
+    public PathEditorInput( IPath path )
+    {
+        if ( path == null )
+        {
+            throw new IllegalArgumentException();
+        }
+
+        this.path = path;
+    }
+
+
+    /**
+     * Returns hash code of the path.
+     */
+    public int hashCode()
+    {
+        return path.hashCode();
+    }
+
+
+    /** 
+     * This implemention just compares the paths
+     */
+    public boolean equals( Object o )
+    {
+        if ( this == o )
+        {
+            return true;
+        }
+
+        if ( o instanceof PathEditorInput )
+        {
+            PathEditorInput input = ( PathEditorInput ) o;
+            return path.equals( input.path );
+        }
+
+        return false;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean exists()
+    {
+        return path.toFile().exists();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public ImageDescriptor getImageDescriptor()
+    {
+        return PlatformUI.getWorkbench().getEditorRegistry().getImageDescriptor( path.toString() );
+    }
+
+
+    /**
+     * Returns the file name only.
+     */
+    public String getName()
+    {
+        return path.toFile().getName();
+        //return path.toString();
+    }
+
+
+    /**
+     * Returns the complete path. 
+     */
+    public String getToolTipText()
+    {
+        return path.makeRelative().toOSString();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public IPath getPath()
+    {
+        return path;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    @SuppressWarnings("rawtypes")
+    public Object getAdapter( Class adapter )
+    {
+        return Platform.getAdapterManager().getAdapter( this, adapter );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public IPersistableElement getPersistable()
+    {
+        return null;
+    }
+
+
+    /**
+     * Returns the path.
+     */
+    public IPath getErrorMessage( Object element )
+    {
+        if ( element instanceof PathEditorInput )
+        {
+            PathEditorInput input = ( PathEditorInput ) element;
+            return input.getPath();
+        }
+
+        return null;
+    }
+}
\ No newline at end of file

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages.properties?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages.properties (original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages.properties Tue Aug 17 13:26:08 2010
@@ -16,5 +16,6 @@
 #  under the License.
 
 DeleteLdapServerRunnable.DeleteServer=Delete Server ''{0}''
+OpenConfigurationLdapServerRunnable.OpenConfigurationForServer=Open Configuration For Server ''{0}''
 StartLdapServerRunnable.StartServer=Start Server ''{0}''
 StopLdapServerRunnable.StopServer=Stop Server ''{0}''

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages_de.properties?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages_de.properties (original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages_de.properties Tue Aug 17 13:26:08 2010
@@ -16,5 +16,6 @@
 #  under the License.
 
 DeleteLdapServerRunnable.DeleteServer=TODO:Delete Server ''{0}''
+OpenConfigurationLdapServerRunnable.OpenConfigurationForServer=TODO:Open Configuration For Server ''{0}''
 StartLdapServerRunnable.StartServer=TODO:Start Server ''{0}''
 StopLdapServerRunnable.StopServer=TODO:Stop Server ''{0}''

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages_fr.properties?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages_fr.properties (original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/jobs/messages_fr.properties Tue Aug 17 13:26:08 2010
@@ -16,5 +16,6 @@
 #  under the License.
 
 DeleteLdapServerRunnable.DeleteServer=Supprimer le serveur ''{0}''
+OpenConfigurationLdapServerRunnable.OpenConfigurationForServer=Ouvrir la configuration du serveur ''{0}''
 StartLdapServerRunnable.StartServer=D\u00E9marrer le serveur ''{0}''
 StopLdapServerRunnable.StopServer=ArrĂȘter le serveur ''{0}''

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServerAdapter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServerAdapter.java?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServerAdapter.java (original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/LdapServerAdapter.java Tue Aug 17 13:26:08 2010
@@ -37,6 +37,8 @@ public interface LdapServerAdapter
      *
      * @param server
      *      the server
+     * @param monitor
+     *      the progress monitor
      * @throws Exception
      */
     public void add( LdapServer server, StudioProgressMonitor monitor ) throws Exception;
@@ -47,9 +49,23 @@ public interface LdapServerAdapter
      *
      * @param server
      *      the server
+     * @param monitor
+     *      the progress monitor
+     * @throws Exception
+     */
+    public void delete( LdapServer server, StudioProgressMonitor monitor ) throws Exception;
+
+
+    /**
+     * This method is called when a server is double-clicked in the 'LDAP Servers' view.
+     *
+     * @param server
+     *      the server
+     * @param monitor
+     *      the progress monitor
      * @throws Exception
      */
-    public void delete( LdapServer server ) throws Exception;
+    public void openConfiguration( LdapServer server, StudioProgressMonitor monitor ) throws Exception;
 
 
     /**

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/UnknownLdapServerAdapterExtension.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/UnknownLdapServerAdapterExtension.java?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/UnknownLdapServerAdapterExtension.java (original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/model/UnknownLdapServerAdapterExtension.java Tue Aug 17 13:26:08 2010
@@ -22,7 +22,9 @@ package org.apache.directory.studio.ldap
 
 
 import org.apache.directory.studio.common.core.jobs.StudioProgressMonitor;
+import org.apache.directory.studio.common.ui.CommonUiUtils;
 import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
 
 
 /**
@@ -33,15 +35,18 @@ import org.eclipse.osgi.util.NLS;
  */
 public class UnknownLdapServerAdapterExtension extends LdapServerAdapterExtension
 {
+    /**
+     * Creates a new instance of UnknownLdapServerAdapterExtension.
+     */
     public UnknownLdapServerAdapterExtension()
     {
         // Setting behavior for this particular LDAP Server Adapter Extension
         setInstance( new LdapServerAdapter()
         {
             /**
-            * {@inheritDoc}
-            */
-            public void stop( LdapServer server, StudioProgressMonitor monitor ) throws Exception
+             * {@inheritDoc}
+             */
+            public void add( LdapServer server, StudioProgressMonitor monitor ) throws Exception
             {
                 // Will never occur
             }
@@ -50,28 +55,44 @@ public class UnknownLdapServerAdapterExt
             /**
              * {@inheritDoc}
              */
-            public void start( LdapServer server, StudioProgressMonitor monitor ) throws Exception
+            public void delete( LdapServer server, StudioProgressMonitor monitor ) throws Exception
             {
-                throw new Exception(
-                    NLS.bind(
-                        "This server was created with a server adapter which is no longer available. You need install it (again) using the update site of the vendor. \nServer adapter information: ID=''{0}'', Name=''{1}'', Vendor=''{2}'', Version=''{3}''",
-                        new String[]
-                            { getId(), getName(), getVendor(), getVersion() } ) );
+                // Nothing to do
             }
 
 
             /**
              * {@inheritDoc}
              */
-            public void delete( LdapServer server ) throws Exception
+            public void openConfiguration( LdapServer server, StudioProgressMonitor monitor ) throws Exception
             {
+                Display.getDefault().asyncExec( new Runnable()
+                {
+                    public void run()
+                    {
+                        CommonUiUtils.reportError( "test" );
+                    }
+                } );
             }
 
 
             /**
              * {@inheritDoc}
              */
-            public void add( LdapServer server, StudioProgressMonitor monitor ) throws Exception
+            public void start( LdapServer server, StudioProgressMonitor monitor ) throws Exception
+            {
+                throw new Exception(
+                    NLS.bind(
+                        "This server was created with a server adapter which is no longer available. You need install it (again) using the update site of the vendor. \nServer adapter information: ID=''{0}'', Name=''{1}'', Vendor=''{2}'', Version=''{3}''",
+                        new String[]
+                            { getId(), getName(), getVendor(), getVersion() } ) );
+            }
+
+
+            /**
+             * {@inheritDoc}
+             */
+            public void stop( LdapServer server, StudioProgressMonitor monitor ) throws Exception
             {
                 // Will never occur
             }

Modified: directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/views/ServersView.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/views/ServersView.java?rev=986301&r1=986300&r2=986301&view=diff
==============================================================================
--- directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/views/ServersView.java (original)
+++ directory/studio/trunk/plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/views/ServersView.java Tue Aug 17 13:26:08 2010
@@ -25,6 +25,7 @@ import org.apache.directory.studio.ldaps
 import org.apache.directory.studio.ldapservers.LdapServersPluginConstants;
 import org.apache.directory.studio.ldapservers.actions.DeleteAction;
 import org.apache.directory.studio.ldapservers.actions.NewServerAction;
+import org.apache.directory.studio.ldapservers.actions.OpenConfigurationAction;
 import org.apache.directory.studio.ldapservers.actions.PropertiesAction;
 import org.apache.directory.studio.ldapservers.actions.RenameAction;
 import org.apache.directory.studio.ldapservers.actions.StartAction;
@@ -36,6 +37,8 @@ import org.eclipse.jface.action.IToolBar
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
 import org.eclipse.jface.commands.ActionHandler;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
@@ -90,7 +93,7 @@ public class ServersView extends ViewPar
 
     // Actions
     private NewServerAction newServer;
-    //    private OpenConfigurationAction openConfiguration;
+    private OpenConfigurationAction openConfiguration;
     private DeleteAction delete;
     private RenameAction rename;
     private StartAction start;
@@ -245,9 +248,9 @@ public class ServersView extends ViewPar
     {
         newServer = new NewServerAction();
 
-        //        openConfiguration = new OpenConfigurationAction( this );
-        //        openConfiguration.setEnabled( false );
-        //
+        openConfiguration = new OpenConfigurationAction( this );
+        openConfiguration.setEnabled( false );
+
         delete = new DeleteAction( this );
         delete.setEnabled( false );
 
@@ -262,7 +265,7 @@ public class ServersView extends ViewPar
 
         //        createConnection = new CreateConnectionAction( this );
         //        createConnection.setEnabled( false );
-        //
+
         properties = new PropertiesAction( this );
         properties.setEnabled( false );
     }
@@ -295,7 +298,7 @@ public class ServersView extends ViewPar
                 MenuManager newManager = new MenuManager( Messages.getString( "ServersView.new" ) ); //$NON-NLS-1$
                 newManager.add( newServer );
                 manager.add( newManager );
-                //                manager.add( openConfiguration );
+                manager.add( openConfiguration );
                 manager.add( new Separator() );
                 manager.add( delete );
                 manager.add( rename );
@@ -327,13 +330,13 @@ public class ServersView extends ViewPar
         LdapServersManager serversHandler = LdapServersManager.getDefault();
         serversHandler.addListener( ldapServersManagerListener );
 
-        //        tableViewer.addDoubleClickListener( new IDoubleClickListener()
-        //        {
-        //            public void doubleClick( DoubleClickEvent event )
-        //            {
-        //                openConfiguration.run();
-        //            }
-        //        } );
+        tableViewer.addDoubleClickListener( new IDoubleClickListener()
+        {
+            public void doubleClick( DoubleClickEvent event )
+            {
+                openConfiguration.run();
+            }
+        } );
 
         tableViewer.addSelectionChangedListener( new ISelectionChangedListener()
         {
@@ -358,7 +361,7 @@ public class ServersView extends ViewPar
                     if ( commandService != null )
                     {
                         commandService.getCommand( newServer.getActionDefinitionId() ).setHandler( null );
-                        //                        commandService.getCommand( openConfiguration.getActionDefinitionId() ).setHandler( null ); // TODO
+                        commandService.getCommand( openConfiguration.getActionDefinitionId() ).setHandler( null );
                         commandService.getCommand( delete.getActionDefinitionId() ).setHandler( null );
                         commandService.getCommand( rename.getActionDefinitionId() ).setHandler( null );
                         commandService.getCommand( start.getActionDefinitionId() ).setHandler( null );
@@ -392,8 +395,8 @@ public class ServersView extends ViewPar
                     {
                         commandService.getCommand( newServer.getActionDefinitionId() ).setHandler(
                             new ActionHandler( newServer ) );
-                        //                        commandService.getCommand( openConfiguration.getActionDefinitionId() ).setHandler(  // TODO
-                        //                            new ActionHandler( openConfiguration ) ); // TODO
+                        commandService.getCommand( openConfiguration.getActionDefinitionId() ).setHandler(
+                            new ActionHandler( openConfiguration ) );
                         commandService.getCommand( delete.getActionDefinitionId() ).setHandler(
                             new ActionHandler( delete ) );
                         commandService.getCommand( rename.getActionDefinitionId() ).setHandler(



Mime
View raw message