directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1049161 - in /directory/studio/trunk/plugins/apacheds.configuration.v2: ./ resources/icons/ src/main/java/org/apache/directory/studio/apacheds/configuration/v2/wizards/
Date Tue, 14 Dec 2010 16:59:38 GMT
Author: pamarcelot
Date: Tue Dec 14 16:59:38 2010
New Revision: 1049161

URL: http://svn.apache.org/viewvc?rev=1049161&view=rev
Log:
Added a new "Apache DS 2.0 Configuration File" wizard (with no page) to the 'New' category.

Added:
    directory/studio/trunk/plugins/apacheds.configuration.v2/resources/icons/editor_new.gif
  (with props)
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/wizards/
    directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/wizards/NewApacheDSConfigurationFileWizard.java
Modified:
    directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.properties
    directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.xml

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.properties?rev=1049161&r1=1049160&r2=1049161&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.properties (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.properties Tue Dec 14
16:59:38 2010
@@ -24,4 +24,10 @@ Editor_ServerConfigurationEditor_id=org.
 Editor_ServerConfigurationEditor_name=Server Configuration
 
 OpenConfigurationAction_id=org.apache.directory.studio.apacheds.configuration.v2.actions.OpenConfigurationAction
-OpenConfigurationAction_label=Open Configuration
\ No newline at end of file
+OpenConfigurationAction_label=Open Configuration
+
+NewWizards_Category_id=org.apache.directory.studio.apacheds.newWizards
+NewWizards_Category_name=Apache DS
+
+NewWizards_NewApacheDSConfigurationFileWizard_id=org.apache.directory.studio.apacheds.configuration.v2.wizards.NewApacheDSConfigurationFileWizard
+NewWizards_NewApacheDSConfigurationFileWizard_name=Apache DS 2.0 Configuration File
\ No newline at end of file

Modified: directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.xml?rev=1049161&r1=1049160&r2=1049161&view=diff
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.xml (original)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/plugin.xml Tue Dec 14 16:59:38
2010
@@ -60,4 +60,19 @@
          </visibility>-->
       </objectContribution>
    </extension>
+   <extension
+         point="org.eclipse.ui.newWizards">
+      <category
+            id="%NewWizards_Category_id"
+            name="%NewWizards_Category_name" />
+      <wizard
+            canFinishEarly="true"
+            category="%NewWizards_Category_id"
+            class="org.apache.directory.studio.apacheds.configuration.v2.wizards.NewApacheDSConfigurationFileWizard"
+            hasPages="false"
+            icon="resources/icons/editor_new.gif"
+            id="%NewWizards_NewApacheDSConfigurationFileWizard_id"
+            name="%NewWizards_NewApacheDSConfigurationFileWizard_name"
+            project="false"/>
+   </extension>
 </plugin>

Added: directory/studio/trunk/plugins/apacheds.configuration.v2/resources/icons/editor_new.gif
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/resources/icons/editor_new.gif?rev=1049161&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/plugins/apacheds.configuration.v2/resources/icons/editor_new.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/wizards/NewApacheDSConfigurationFileWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/wizards/NewApacheDSConfigurationFileWizard.java?rev=1049161&view=auto
==============================================================================
--- directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/wizards/NewApacheDSConfigurationFileWizard.java
(added)
+++ directory/studio/trunk/plugins/apacheds.configuration.v2/src/main/java/org/apache/directory/studio/apacheds/configuration/v2/wizards/NewApacheDSConfigurationFileWizard.java
Tue Dec 14 16:59:38 2010
@@ -0,0 +1,77 @@
+/*
+ *  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.configuration.v2.wizards;
+
+
+import org.apache.directory.studio.apacheds.configuration.v2.editor.NewServerConfigurationInput;
+import org.apache.directory.studio.apacheds.configuration.v2.editor.ServerConfigurationEditor;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.PlatformUI;
+
+
+/**
+ * This class implements the New ApacheDS Configuration File Wizard.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ */
+public class NewApacheDSConfigurationFileWizard extends Wizard implements INewWizard
+{
+    /**
+     * {@inheritDoc}
+     */
+    public void addPages()
+    {
+        // This wizard has no page
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean performFinish()
+    {
+        try
+        {
+            IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+            page.openEditor( new NewServerConfigurationInput(), ServerConfigurationEditor.ID
);
+        }
+        catch ( PartInitException e )
+        {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+            return false;
+        }
+
+        return true;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public void init( IWorkbench workbench, IStructuredSelection selection )
+    {
+    }
+}



Mime
View raw message