Commits

Anonymous committed 83411dc

Restored commands and key bindings.

git-svn-id: https://svn.apache.org/repos/asf/directory/studio/trunk@98602713f79535-47bb-0310-9956-ffa450edef68

  • Participants
  • Parent commits 08bdef8

Comments (0)

Files changed (15)

File plugins/ldapservers/plugin.properties

 # specific language governing permissions and limitations
 # under the License.
 
-Plugin_id=org.apache.directory.studio.ldapservers
+Plugin_id=org.apache.directory.studio.ldapservers
+
+View_Category_id=org.apache.directory.studio.ldapservers.category
+View_Category_name=LDAP Servers
+
+View_ServersView_id=org.apache.directory.studio.apacheds.serversView
+View_ServersView_name=Servers
+
+Prop_ServerPropertyPage_id=org.apache.directory.studio.apacheds.properties.serverProperties
+Prop_ServerPropertyPage_name=Info
+
+Cmd_Category_id=org.apache.directory.studio.ldapservers.commands
+Cmd_Category_name=LDAP Servers
+
+Cmd_NewServer_id=org.apache.directory.studio.ldapservers.commands.newServer
+Cmd_NewServer_name=New Server
+Cmd_NewServer_description=Creates a new server
+
+Cmd_Delete_id=org.apache.directory.studio.ldapservers.commands.delete
+Cmd_Delete_name=Delete
+Cmd_Delete_description=Deletes a server
+
+Cmd_Rename_id=org.apache.directory.studio.ldapservers.commands.rename
+Cmd_Rename_name=Rename
+Cmd_Rename_description=Renames the server
+
+Cmd_Start_id=org.apache.directory.studio.ldapservers.commands.start
+Cmd_Start_name=Start
+Cmd_Start_description=Starts the server
+
+Cmd_Stop_id=org.apache.directory.studio.ldapservers.commands.stop
+Cmd_Stop_name=Stop
+Cmd_Stop_description=Stops the server
+
+Cmd_Properties_id=org.apache.directory.studio.ldapservers.commands.properties
+Cmd_Properties_name=Properties
+Cmd_Properties_description=Shows the properties of the server
+
+Ctx_ServersView_id=org.apache.directory.studio.ldapservers.contexts.serversView
+Ctx_ServersView_name=In LDAP Servers View
+Ctx_ServersView_description=In LDAP Servers View

File plugins/ldapservers/plugin.xml

          </enabledWhen>
       </page>
    </extension>
+   
+   <extension
+         point="org.eclipse.ui.commands">
+      <category
+            id="%Cmd_Category_id"
+            name="%Cmd_Category_name">
+      </category>
+      <command
+            categoryId="%Cmd_Category_id"
+            description="%Cmd_NewServer_description"
+            id="%Cmd_NewServer_id"
+            name="%Cmd_NewServer_name">
+      </command>
+      <command
+            categoryId="%Cmd_Category_id"
+            description="%Cmd_Delete_description"
+            id="%Cmd_Delete_id"
+            name="%Cmd_Delete_name">
+      </command>
+      <command
+            categoryId="%Cmd_Category_id"
+            description="%Cmd_Rename_description"
+            id="%Cmd_Rename_id"
+            name="%Cmd_Rename_name">
+      </command>
+      <command
+            categoryId="%Cmd_Category_id"
+            description="%Cmd_Start_description"
+            id="%Cmd_Start_id"
+            name="%Cmd_Start_name">
+      </command>
+      <command
+            categoryId="%Cmd_Category_id"
+            description="%Cmd_Stop_description"
+            id="%Cmd_Stop_id"
+            name="%Cmd_Stop_name">
+      </command>
+      <command
+            categoryId="%Cmd_Category_id"
+            description="%Cmd_Properties_description"
+            id="%Cmd_Properties_id"
+            name="%Cmd_Properties_name">
+      </command>
+   </extension>
+   
+   <extension
+         point="org.eclipse.ui.contexts">
+      <context
+            description="%Ctx_ServersView_description"
+            id="%Ctx_ServersView_id"
+            name="%Ctx_ServersView_name"
+            parentId="org.eclipse.ui.contexts.window">
+      </context>
+   </extension>
+   
+   <extension
+         point="org.eclipse.ui.bindings">
+      <key
+            commandId="%Cmd_NewServer_id"
+            contextId="%Ctx_ServersView_id"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+E"/>
+      <key
+            commandId="%Cmd_Delete_id"
+            contextId="%Ctx_ServersView_id"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="DEL"/>
+      <key
+            commandId="%Cmd_Rename_id"
+            contextId="%Ctx_ServersView_id"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="F2"/>
+      <key
+            commandId="%Cmd_Start_id"
+            contextId="%Ctx_ServersView_id"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+R"/>
+      <key
+            commandId="%Cmd_Stop_id"
+            contextId="%Ctx_ServersView_id"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="M1+T"/>
+      <key
+            commandId="%Cmd_Properties_id"
+            contextId="%Ctx_ServersView_id"
+            schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+            sequence="ALT+RETURN"/>
+   </extension>
 </plugin>

File plugins/ldapservers/resources/icons/run.gif

Removed
Old image

File plugins/ldapservers/resources/icons/start.gif

Added
New image

File plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/LdapServersPluginConstants.java

     // IMAGES
     // ------
     public static final String IMG_FOLDER = "resources/icons/folder.gif";
-    public static final String IMG_RUN = "resources/icons/run.gif";
     public static final String IMG_SERVER_NEW = "resources/icons/server_new.gif";
     public static final String IMG_SERVER_NEW_WIZARD = "resources/icons/server_new_wizard.png";
     public static final String IMG_SERVER = "resources/icons/server.gif";
     public static final String IMG_SERVER_STOPPING1 = "resources/icons/server_stopping1.gif";
     public static final String IMG_SERVER_STOPPING2 = "resources/icons/server_stopping2.gif";
     public static final String IMG_SERVER_STOPPING3 = "resources/icons/server_stopping3.gif";
+    public static final String IMG_START = "resources/icons/start.gif";
     public static final String IMG_STOP = "resources/icons/stop.gif";
 
+    // --------
+    // COMMANDS
+    // --------
+    public static final String CMD_DELETE = LdapServersPlugin.getDefault().getPluginProperties()
+        .getString( "Cmd_Delete_id" );
+    public static final String CMD_NEW_SERVER = LdapServersPlugin.getDefault().getPluginProperties()
+        .getString( "Cmd_NewServer_id" );
+    public static final String CMD_PROPERTIES = LdapServersPlugin.getDefault().getPluginProperties()
+        .getString( "Cmd_Properties_id" );
+    public static final String CMD_RENAME = LdapServersPlugin.getDefault().getPluginProperties()
+        .getString( "Cmd_Rename_id" );
+    public static final String CMD_START = LdapServersPlugin.getDefault().getPluginProperties()
+        .getString( "Cmd_Start_id" );
+    public static final String CMD_STOP = LdapServersPlugin.getDefault().getPluginProperties()
+        .getString( "Cmd_Stop_id" );
+
     // --------------
     // PROPERTY PAGES
     // --------------
     public static final String PROP_SERVER_PROPERTY_PAGE = "org.apache.directory.studio.ldapservers.properties.ServerPropertyPage";
 
+    // -----
+    // VIEWS
+    // -----
+    public static final String VIEW_SERVERS_VIEW = LdapServersPlugin.getDefault().getPluginProperties()
+        .getString( "View_ServersView_id" );
+
+    // --------
+    // CONTEXTS
+    // --------
+    public static final String CONTEXTS_SERVERS_VIEW = LdapServersPlugin.getDefault().getPluginProperties()
+        .getString( "Ctx_ServersView_id" );
 }

File plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/DeleteAction.java

 import java.io.File;
 
 import org.apache.directory.studio.ldapservers.LdapServersManager;
+import org.apache.directory.studio.ldapservers.LdapServersPluginConstants;
 import org.apache.directory.studio.ldapservers.dialogs.DeleteServerDialog;
 import org.apache.directory.studio.ldapservers.model.LdapServer;
 import org.apache.directory.studio.ldapservers.model.LdapServerStatus;
      */
     private void init()
     {
-        //        setId( ApacheDsPluginConstants.CMD_DELETE ); // TODO
-        //        setActionDefinitionId( ApacheDsPluginConstants.CMD_DELETE ); // TODO
+        setId( LdapServersPluginConstants.CMD_DELETE );
+        setActionDefinitionId( LdapServersPluginConstants.CMD_DELETE );
         setToolTipText( Messages.getString( "DeleteAction.DeleteToolTip" ) ); //$NON-NLS-1$
         setImageDescriptor( PlatformUI.getWorkbench().getSharedImages()
             .getImageDescriptor( ISharedImages.IMG_TOOL_DELETE ) );

File plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/NewServerAction.java

      */
     public NewServerAction()
     {
-        super( "New Server" );
-        //        setId( ApacheDsPluginConstants.CMD_NEW_SERVER ); TODO
-        //        setActionDefinitionId( ApacheDsPluginConstants.CMD_NEW_SERVER ); // TODO
-        //        setToolTipText( Messages.getString( "NewServerAction.NewServerToolTip" ) ); //$NON-NLS-1$ // TODO
+        super( Messages.getString( "NewServerAction.NewServer" ) ); //$NON-NLS-1$
+        setId( LdapServersPluginConstants.CMD_NEW_SERVER );
+        setActionDefinitionId( LdapServersPluginConstants.CMD_NEW_SERVER );
+        setToolTipText( Messages.getString( "NewServerAction.NewServerToolTip" ) ); //$NON-NLS-1$
         setImageDescriptor( LdapServersPlugin.getDefault().getImageDescriptor(
             LdapServersPluginConstants.IMG_SERVER_NEW ) );
     }

File plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/PropertiesAction.java

      */
     private void init()
     {
-//        setId( ApacheDsPluginConstants.CMD_PROPERTIES ); // TODO
-//        setActionDefinitionId( ApacheDsPluginConstants.CMD_PROPERTIES ); // TODO
-//        setToolTipText( Messages.getString( "PropertiesAction.PropertiesToolTip" ) ); //$NON-NLS-1$ // TODO
+        setId( LdapServersPluginConstants.CMD_PROPERTIES );
+        setActionDefinitionId( LdapServersPluginConstants.CMD_PROPERTIES );
+        setToolTipText( Messages.getString( "PropertiesAction.PropertiesToolTip" ) ); //$NON-NLS-1$
     }
 
 

File plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/RenameAction.java

 
 
 import org.apache.directory.studio.ldapservers.LdapServersManager;
+import org.apache.directory.studio.ldapservers.LdapServersPluginConstants;
 import org.apache.directory.studio.ldapservers.model.LdapServer;
 import org.apache.directory.studio.ldapservers.views.ServersView;
 import org.eclipse.jface.action.Action;
      */
     private void init()
     {
-        //        setId( ApacheDsPluginConstants.CMD_RENAME ); // TODO
-        //        setActionDefinitionId( ApacheDsPluginConstants.CMD_RENAME ); // TODO
+        setId( LdapServersPluginConstants.CMD_RENAME );
+        setActionDefinitionId( LdapServersPluginConstants.CMD_RENAME );
         setToolTipText( Messages.getString( "RenameAction.RenameToolTip" ) ); //$NON-NLS-1$
     }
 

File plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/StartAction.java

      */
     public StartAction()
     {
-        super( Messages.getString( "StartAction.Run" ) ); //$NON-NLS-1$
+        super( Messages.getString( "StartAction.Start" ) ); //$NON-NLS-1$
         init();
     }
 
      */
     public StartAction( ServersView view )
     {
-        super( Messages.getString( "StartAction.Run" ) ); //$NON-NLS-1$
+        super( Messages.getString( "StartAction.Start" ) ); //$NON-NLS-1$
         this.view = view;
         init();
     }
      */
     private void init()
     {
-        //        setId( ApacheDsPluginConstants.CMD_RUN ); // TODO
-        //        setActionDefinitionId( ApacheDsPluginConstants.CMD_RUN ); // TODO
-        setToolTipText( Messages.getString( "StartAction.RunToolTip" ) ); //$NON-NLS-1$
-        setImageDescriptor( LdapServersPlugin.getDefault().getImageDescriptor( LdapServersPluginConstants.IMG_RUN ) );
+        setId( LdapServersPluginConstants.CMD_START );
+        setActionDefinitionId( LdapServersPluginConstants.CMD_START );
+        setToolTipText( Messages.getString( "StartAction.StartToolTip" ) ); //$NON-NLS-1$
+        setImageDescriptor( LdapServersPlugin.getDefault().getImageDescriptor( LdapServersPluginConstants.IMG_START ) );
     }
 
 

File plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/StopAction.java

      */
     private void init()
     {
-        //        setId( ApacheDsPluginConstants.CMD_STOP ); // TODO
-        //        setActionDefinitionId( ApacheDsPluginConstants.CMD_STOP ); // TODO
+        setId( LdapServersPluginConstants.CMD_STOP );
+        setActionDefinitionId( LdapServersPluginConstants.CMD_STOP );
         setToolTipText( Messages.getString( "StopAction.StopToolTip" ) ); //$NON-NLS-1$
         setImageDescriptor( LdapServersPlugin.getDefault().getImageDescriptor( LdapServersPluginConstants.IMG_STOP ) );
     }

File plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages.properties

 #  specific language governing permissions and limitations
 #  under the License.
 
-CreateConnectionAction.CreateAConnection=Create a Connection
-CreateConnectionAction.FollowingErrorOccurred=The following error occurred\: 
-CreateConnectionAction.LDAPAndLDAPSDisabled=LDAP and LDAPS protocols are disabled. A connection cannot be created.
-CreateConnectionAction.StopToolTip=Stop
-CreateConnectionAction.UnableCreateConnection=Unable to create a connection
-CreateConnectionAction.UnableReadServerConfiguration=Unable to read the server configuration.
-CreateConnectionActionHelper.ConnectionCalledCreated=A connection called "{0}" has been created.
-CreateConnectionActionHelper.ConnectionCalledCreatedSwitch=A connection called "{0}" has been created.\n\nDo you want to switch to the LDAP perspective ?
-CreateConnectionActionHelper.ConnectionCreated=Connection created
 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.ErrorWhenOpening=An error occurred when opening the Apache DS Configuration Editor.\n\n
-OpenConfigurationAction.OpenConfiguration=&Open Configuration
-OpenConfigurationAction.OpenConfigurationToolTip=Open Configuration
 PropertiesAction.Properties=&Properties
 PropertiesAction.PropertiesFor=Properties for "{0}"
 PropertiesAction.PropertiesToolTip=Properties
 StartAction.PortOfProtocolInUse=The port of the protocol {0} is already in use.
 StartAction.PortsInUse=Ports already in use
 StartAction.PortsOfProtocolsInUse=The ports of the following protocols are already in use\:
-StartAction.Run=&Run
-StartAction.RunToolTip=Run
+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

File plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages_de.properties

 #  specific language governing permissions and limitations
 #  under the License.
 
-CreateConnectionAction.CreateAConnection=Eine Verbindung erstellen
-CreateConnectionAction.FollowingErrorOccurred=Es ist folgender Fehler aufgetreten\: 
-CreateConnectionAction.LDAPAndLDAPSDisabled=Die Protokolle LDAP und LDAPS sind gesperrt. Es kann keine Verbindung erstellt werden.
-CreateConnectionAction.UnableCreateConnection=Unf\u00E4hig eine Verbindung zu erstellen
-CreateConnectionAction.UnableReadServerConfiguration=Unf\u00E4hig die Server Konfiguration zu lesen.
-CreateConnectionActionHelper.ConnectionCalledCreated=Eine Verbindung mit Namen "{0}" ist erstellt worden.
-CreateConnectionActionHelper.ConnectionCalledCreatedSwitch=Eine Verbindung mit Namen "{0}" ist erstellt worden.\n\nM\u00F6chten Sie zur LDAP Perspektive wechseln?
-CreateConnectionActionHelper.ConnectionCreated=Verbindung erstellt
 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.ErrorWhenOpening=Beim \u00D6ffnen des Apache DS Konfigurations-Editors ist ein Fehler aufgetreten.\n\n
-OpenConfigurationAction.OpenConfiguration=Konfiguration &\u00F6ffnen
-OpenConfigurationAction.OpenConfigurationToolTip=Konfiguration \u00F6ffnen
 PropertiesAction.Properties=&Eigenschaften
 PropertiesAction.PropertiesFor=Eigenschaften f\u00FCr "{0}"
 PropertiesAction.PropertiesToolTip=Eigenschaften
 StartAction.PortsInUse=Die Ports werden bereits verwendet
 StartAction.PortsOfProtocolsInUse=Die Ports folgender Protokolle werden bereits verwendet\:
 StartAction.UnableReadServerConfiguration=Unf\u00E4hig die Server Konfiguration zu lesen.
-StartAction.Run=&Starten
-StartAction.RunToolTip=Starten
+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

File plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/actions/messages_fr.properties

 # ^P : Propri\u00E9t\u00E9s
 # ^R : Renommer
 # ^S : Supprimer
-CreateConnectionAction.CreateAConnection=Cr\u00E9er une connexion
-CreateConnectionAction.FollowingErrorOccurred= L'erreur suivante est survenue \:
-CreateConnectionAction.LDAPAndLDAPSDisabled=Les protocoles LDAP et LDAPS sont d\u00E9sactiv\u00E9s. Il n'est pas possible de cr\u00E9er une connexion. 
-CreateConnectionAction.UnableCreateConnection=Impossible de cr\u00E9er une connexion.
-CreateConnectionAction.UnableReadServerConfiguration=Impossible de lire la configuration du serveur.
-CreateConnectionActionHelper.ConnectionCalledCreated=Une connexion nomm\u00E9e "{0}" a \u00E9t\u00E9 cr\u00E9\u00E9e.
-CreateConnectionActionHelper.ConnectionCalledCreatedSwitch=Une connexion nomm\u00E9e "{0}" a \u00E9t\u00E9 cr\u00E9\u00E9e.\n\nSouhaitez-vous basculer vers la perspective LDAP ?
-CreateConnectionActionHelper.ConnectionCreated=Connexion cr\u00E9\u00E9e
 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.ErrorWhenOpening=Une erreur est survenue lors de l'ouverture de la configuration du server.\n\n
-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
 StartAction.PortOfProtocolInUse=Le port associ\u00E9 au protocole "{0}" est d\u00E9j\u00E0 utilis\u00E9.
 StartAction.PortsInUse=Les ports sont d\u00E9j\u00E0 utilis\u00E9s.
 StartAction.PortsOfProtocolsInUse=Les ports associ\u00E9s aux protocoles suivants sont d\u00E9j\u00E0 utilis\u00E9s \:
-StartAction.Run=&D\u00E9marrer
-StartAction.RunToolTip=D\u00E9marrer
+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

File plugins/ldapservers/src/main/java/org/apache/directory/studio/ldapservers/views/ServersView.java

 
 import org.apache.directory.studio.ldapservers.LdapServersManager;
 import org.apache.directory.studio.ldapservers.LdapServersManagerListener;
+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.PropertiesAction;
 import org.eclipse.jface.action.IToolBarManager;
 import org.eclipse.jface.action.MenuManager;
 import org.eclipse.jface.action.Separator;
+import org.eclipse.jface.commands.ActionHandler;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
 import org.eclipse.jface.viewers.StructuredSelection;
     //    private OpenConfigurationAction openConfiguration;
     private DeleteAction delete;
     private RenameAction rename;
-    private StartAction run;
+    private StartAction start;
     private StopAction stop;
     //    private CreateConnectionAction createConnection;
     private PropertiesAction properties;
         rename = new RenameAction( this );
         rename.setEnabled( false );
 
-        run = new StartAction( this );
-        run.setEnabled( false );
+        start = new StartAction( this );
+        start.setEnabled( false );
 
         stop = new StopAction( this );
         stop.setEnabled( false );
         IToolBarManager toolbar = getViewSite().getActionBars().getToolBarManager();
         toolbar.add( newServer );
         toolbar.add( new Separator() );
-        toolbar.add( run );
+        toolbar.add( start );
         toolbar.add( stop );
     }
 
                 manager.add( delete );
                 manager.add( rename );
                 manager.add( new Separator() );
-                manager.add( run );
+                manager.add( start );
                 manager.add( stop );
                 manager.add( new Separator() );
                 //                MenuManager ldapBrowserManager = new MenuManager( Messages.getString( "ServersView.ldapBrowser" ) ); //$NON-NLS-1$
                     if ( commandService != null )
                     {
                         commandService.getCommand( newServer.getActionDefinitionId() ).setHandler( null );
-                        //                        commandService.getCommand( openConfiguration.getActionDefinitionId() ).setHandler( null );
-                        //                        commandService.getCommand( delete.getActionDefinitionId() ).setHandler( null );
-                        //                        commandService.getCommand( rename.getActionDefinitionId() ).setHandler( null );
-                        //                        commandService.getCommand( run.getActionDefinitionId() ).setHandler( null );
-                        //                        commandService.getCommand( stop.getActionDefinitionId() ).setHandler( null );
-                        //                        commandService.getCommand( properties.getActionDefinitionId() ).setHandler( null );
+                        //                        commandService.getCommand( openConfiguration.getActionDefinitionId() ).setHandler( null ); // TODO
+                        commandService.getCommand( delete.getActionDefinitionId() ).setHandler( null );
+                        commandService.getCommand( rename.getActionDefinitionId() ).setHandler( null );
+                        commandService.getCommand( start.getActionDefinitionId() ).setHandler( null );
+                        commandService.getCommand( stop.getActionDefinitionId() ).setHandler( null );
+                        commandService.getCommand( properties.getActionDefinitionId() ).setHandler( null );
                     }
 
                     IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
             {
                 if ( partRef.getPart( false ) == instance )
                 {
-                    //                    IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
-                    //                        IContextService.class );
-                    //                    contextActivation = contextService.activateContext( ApacheDsPluginConstants.CONTEXTS_SERVERS_VIEW );
-                    //
-                    //                    ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
-                    //                        ICommandService.class );
-                    //                    if ( commandService != null )
-                    //                    {
-                    //                        commandService.getCommand( newServer.getActionDefinitionId() ).setHandler(
-                    //                            new ActionHandler( newServer ) );
-                    //                        commandService.getCommand( openConfiguration.getActionDefinitionId() ).setHandler(
-                    //                            new ActionHandler( openConfiguration ) );
-                    //                        commandService.getCommand( delete.getActionDefinitionId() ).setHandler(
-                    //                            new ActionHandler( delete ) );
-                    //                        commandService.getCommand( rename.getActionDefinitionId() ).setHandler(
-                    //                            new ActionHandler( rename ) );
-                    //                        commandService.getCommand( run.getActionDefinitionId() ).setHandler( new ActionHandler( run ) );
-                    //                        commandService.getCommand( stop.getActionDefinitionId() )
-                    //                            .setHandler( new ActionHandler( stop ) );
-                    //                        commandService.getCommand( properties.getActionDefinitionId() ).setHandler(
-                    //                            new ActionHandler( properties ) );
-                    //                    }
+                    IContextService contextService = ( IContextService ) PlatformUI.getWorkbench().getAdapter(
+                        IContextService.class );
+                    contextActivation = contextService
+                        .activateContext( LdapServersPluginConstants.CONTEXTS_SERVERS_VIEW );
+
+                    ICommandService commandService = ( ICommandService ) PlatformUI.getWorkbench().getAdapter(
+                        ICommandService.class );
+                    if ( commandService != null )
+                    {
+                        commandService.getCommand( newServer.getActionDefinitionId() ).setHandler(
+                            new ActionHandler( newServer ) );
+                        //                        commandService.getCommand( openConfiguration.getActionDefinitionId() ).setHandler(  // TODO
+                        //                            new ActionHandler( openConfiguration ) ); // TODO
+                        commandService.getCommand( delete.getActionDefinitionId() ).setHandler(
+                            new ActionHandler( delete ) );
+                        commandService.getCommand( rename.getActionDefinitionId() ).setHandler(
+                            new ActionHandler( rename ) );
+                        commandService.getCommand( start.getActionDefinitionId() ).setHandler(
+                            new ActionHandler( start ) );
+                        commandService.getCommand( stop.getActionDefinitionId() )
+                            .setHandler( new ActionHandler( stop ) );
+                        commandService.getCommand( properties.getActionDefinitionId() ).setHandler(
+                            new ActionHandler( properties ) );
+                    }
                 }
             }
 
             public void partVisible( IWorkbenchPartReference partRef )
             {
             }
-
         } );
     }
 
             switch ( server.getStatus() )
             {
                 case STARTED:
-                    run.setEnabled( false );
+                    start.setEnabled( false );
                     stop.setEnabled( true );
                     break;
                 case STARTING:
-                    run.setEnabled( false );
+                    start.setEnabled( false );
                     stop.setEnabled( false );
                     break;
                 case STOPPED:
-                    run.setEnabled( true );
+                    start.setEnabled( true );
                     stop.setEnabled( false );
                     break;
                 case STOPPING:
-                    run.setEnabled( false );
+                    start.setEnabled( false );
                     stop.setEnabled( false );
                     break;
                 case UNKNOWN:
-                    run.setEnabled( false );
+                    start.setEnabled( false );
                     stop.setEnabled( false );
                     break;
             }
             //            openConfiguration.setEnabled( false );
             delete.setEnabled( false );
             rename.setEnabled( false );
-            run.setEnabled( false );
+            start.setEnabled( false );
             stop.setEnabled( false );
             //            createConnection.setEnabled( false );
             properties.setEnabled( false );