directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r559110 - in /directory/studio/trunk/studio-apacheds-schemaeditor: ./ src/main/java/org/apache/directory/studio/apacheds/schemaeditor/ src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/ src/main/java/org/apache/dire...
Date Tue, 24 Jul 2007 17:08:16 GMT
Author: pamarcelot
Date: Tue Jul 24 10:08:15 2007
New Revision: 559110

URL: http://svn.apache.org/viewvc?view=rev&rev=559110
Log:
Added the CommitChangesAction in the ProjectsView.

Added:
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/actions/CommitChangesAction.java
Modified:
    directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginConstants.java
    directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/ProjectsViewController.java

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml?view=diff&rev=559110&r1=559109&r2=559110
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml (original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/plugin.xml Tue Jul 24 10:08:15 2007
@@ -144,13 +144,6 @@
           id="org.apache.directory.studio.apacheds.schemaeditor.wizards.ExportProjectsWizard"
           name="Schema Projects">
     </wizard>
-	<wizard
-          category="org.apache.directory.studio.apacheds.schemaeditor.exportWizardCategory"
-          class="org.apache.directory.studio.apacheds.schemaeditor.view.wizards.CommitChangesWizard"
-          icon="resources/icons/commit_changes.gif"
-          id="org.apache.directory.studio.apacheds.schemaeditor.wizards.CommitChangesWizard"
-          name="Commit Changes">
-    </wizard>
  </extension>
  <extension
        point="org.eclipse.ui.importWizards">

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginConstants.java?view=diff&rev=559110&r1=559109&r2=559110
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginConstants.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/PluginConstants.java
Tue Jul 24 10:08:15 2007
@@ -38,6 +38,7 @@
     public static final String IMG_ATTRIBUTE_TYPE_OVERLAY_OPERATION = "resources/icons/attribute_type_overlay_operation.gif";
     public static final String IMG_ATTRIBUTE_TYPE_OVERLAY_USER_APPLICATION = "resources/icons/attribute_type_overlay_userApplication.gif";
     public static final String IMG_CONNECT = "resources/icons/connect.gif";
+    public static final String IMG_COMMIT_CHANGES = "resources/icons/commit_changes.gif";
     public static final String IMG_COMMIT_CHANGES_WIZARD = "resources/icons/commit_changes_wizard.png";
     public static final String IMG_COLLAPSE_ALL = "resources/icons/collapse_all.gif";
     public static final String IMG_DELETE = "resources/icons/delete.gif";
@@ -92,6 +93,7 @@
     public static final String IMG_TOOLBAR_MENU = "resources/icons/toolbar_menu.gif";
 
     // Commands
+    public static final String CMD_COMMIT_CHANGES = Activator.PLUGIN_ID + ".commands.commitChanges";
     public static final String CMD_CONNECT = Activator.PLUGIN_ID + ".commands.connect";
     public static final String CMD_CLOSE_PROJECT = Activator.PLUGIN_ID + ".commands.closeProject";
     public static final String CMD_COLLAPSE_ALL = Activator.PLUGIN_ID + ".commands.collapseAll";

Modified: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/ProjectsViewController.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/ProjectsViewController.java?view=diff&rev=559110&r1=559109&r2=559110
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/ProjectsViewController.java
(original)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/ProjectsViewController.java
Tue Jul 24 10:08:15 2007
@@ -22,6 +22,7 @@
 
 import org.apache.directory.studio.apacheds.schemaeditor.Activator;
 import org.apache.directory.studio.apacheds.schemaeditor.controller.actions.CloseProjectAction;
+import org.apache.directory.studio.apacheds.schemaeditor.controller.actions.CommitChangesAction;
 import org.apache.directory.studio.apacheds.schemaeditor.controller.actions.DeleteProjectAction;
 import org.apache.directory.studio.apacheds.schemaeditor.controller.actions.ExportProjectsAction;
 import org.apache.directory.studio.apacheds.schemaeditor.controller.actions.ImportProjectsAction;
@@ -76,6 +77,7 @@
     private DeleteProjectAction deleteProject;
     private ImportProjectsAction importProjects;
     private ExportProjectsAction exportProjects;
+    private CommitChangesAction commitChanges;
 
 
     /**
@@ -111,6 +113,7 @@
         deleteProject = new DeleteProjectAction( view.getViewer() );
         importProjects = new ImportProjectsAction();
         exportProjects = new ExportProjectsAction( view.getViewer() );
+        commitChanges = new CommitChangesAction();
     }
 
 
@@ -121,6 +124,7 @@
     {
         IToolBarManager toolbar = view.getViewSite().getActionBars().getToolBarManager();
         toolbar.add( newProject );
+        toolbar.add( commitChanges );
     }
 
 

Added: directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/actions/CommitChangesAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/actions/CommitChangesAction.java?view=auto&rev=559110
==============================================================================
--- directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/actions/CommitChangesAction.java
(added)
+++ directory/studio/trunk/studio-apacheds-schemaeditor/src/main/java/org/apache/directory/studio/apacheds/schemaeditor/controller/actions/CommitChangesAction.java
Tue Jul 24 10:08:15 2007
@@ -0,0 +1,108 @@
+/*
+ *  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.apacheds.schemaeditor.controller.actions;
+
+
+import org.apache.directory.studio.apacheds.schemaeditor.Activator;
+import org.apache.directory.studio.apacheds.schemaeditor.PluginConstants;
+import org.apache.directory.studio.apacheds.schemaeditor.view.wizards.CommitChangesWizard;
+import org.eclipse.jface.action.Action;
+import org.eclipse.jface.action.IAction;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWindowActionDelegate;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+
+
+/**
+ * This action launches the NewProjectWizard.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class CommitChangesAction extends Action implements IWorkbenchWindowActionDelegate
+{
+    /**
+     * Creates a new instance of NewProjectAction.
+     */
+    public CommitChangesAction()
+    {
+        super( "Commit Changes" );
+        setToolTipText( getText() );
+        setId( PluginConstants.CMD_COMMIT_CHANGES );
+        setImageDescriptor( AbstractUIPlugin.imageDescriptorFromPlugin( Activator.PLUGIN_ID,
+            PluginConstants.IMG_COMMIT_CHANGES ) );
+        setEnabled( true );
+    }
+
+
+    /* (non-Javadoc)
+     * @see org.eclipse.jface.action.Action#run()
+     */
+    public void run()
+    {
+        // Instantiates and initializes the wizard
+        CommitChangesWizard wizard = new CommitChangesWizard();
+        wizard.init( PlatformUI.getWorkbench(), StructuredSelection.EMPTY );
+        // Instantiates the wizard container with the wizard and opens it
+        WizardDialog dialog = new WizardDialog( PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
wizard );
+        dialog.create();
+        dialog.open();
+    }
+
+
+    /* (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
+    }
+}



Mime
View raw message