directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r822918 - in /directory/studio/trunk: ldapbrowser-common/ ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/ ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/ ldapbrowser-...
Date Wed, 07 Oct 2009 21:16:06 GMT
Author: seelmann
Date: Wed Oct  7 21:15:58 2009
New Revision: 822918

URL: http://svn.apache.org/viewvc?rev=822918&view=rev
Log:
Fix for DIRSTUDIO-488 (new context entry creation is not shown just after connection):
o Now there are two distinguished menu items, one for "new entry" and one for "new context
entry"
o Moved all "new" menu items into a "New >" sub-menu

Added:
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewContextEntryWizard.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/NewContextEntryAction.java
Modified:
    directory/studio/trunk/ldapbrowser-common/plugin.properties
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java
    directory/studio/trunk/ldapbrowser-ui/plugin.properties
    directory/studio/trunk/ldapbrowser-ui/plugin.xml
    directory/studio/trunk/ldapbrowser-ui/plugin_de.properties
    directory/studio/trunk/ldapbrowser-ui/plugin_fr.properties
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/NewEntryAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages.properties
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages_de.properties
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages_fr.properties

Modified: directory/studio/trunk/ldapbrowser-common/plugin.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/plugin.properties?rev=822918&r1=822917&r2=822918&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/plugin.properties (original)
+++ directory/studio/trunk/ldapbrowser-common/plugin.properties Wed Oct  7 21:15:58 2009
@@ -150,4 +150,5 @@
 DnD_ValuesTransfer=org.apache.directory.studio.ldapbrowser.value
 
 Wizard_AttributeWizard_id=org.apache.directory.studio.ldapbrowser.common.wizards.AttributeWizard
-NewWizard_NewEntryWizard_id=org.apache.directory.studio.ldapbrowser.common.wizards.NewEntryWizard
\ No newline at end of file
+NewWizard_NewEntryWizard_id=org.apache.directory.studio.ldapbrowser.common.wizards.NewEntryWizard
+NewWizard_NewContextEntryWizard_id=org.apache.directory.studio.ldapbrowser.common.wizards.NewContextEntryWizard
\ No newline at end of file

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java?rev=822918&r1=822917&r2=822918&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java
Wed Oct  7 21:15:58 2009
@@ -204,8 +204,10 @@
         .getString( "DnD_ValuesTransfer" ); //$NON-NLS-1$
     
     public static final String WIZARD_ATTRIBUTE_WIZARD = BrowserCommonActivator.getDefault().getPluginProperties()
-    .getString( "Wizard_AttributeWizard_id" ); //$NON-NLS-1$
-   
+        .getString( "Wizard_AttributeWizard_id" ); //$NON-NLS-1$
+
     public static final String WIZARD_NEW_ENTRY_WIZARD = BrowserCommonActivator.getDefault().getPluginProperties()
-    .getString( "NewWizard_NewEntryWizard_id" ); //$NON-NLS-1$
+        .getString( "NewWizard_NewEntryWizard_id" ); //$NON-NLS-1$
+    public static final String WIZARD_NEW_CONTEXT_ENTRY_WIZARD = BrowserCommonActivator.getDefault()
+        .getPluginProperties().getString( "NewWizard_NewContextEntryWizard_id" ); //$NON-NLS-1$
 }

Added: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewContextEntryWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewContextEntryWizard.java?rev=822918&view=auto
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewContextEntryWizard.java
(added)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewContextEntryWizard.java
Wed Oct  7 21:15:58 2009
@@ -0,0 +1,65 @@
+/*
+ *  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.ldapbrowser.common.wizards;
+
+
+import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
+
+
+/**
+ * The NewContextEntryWizard is used to create a new context entry from scratch or by 
+ * using another entry as template.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewContextEntryWizard extends NewEntryWizard
+{
+
+    /**
+     * Creates a new instance of NewContextEntryWizard.
+     */
+    public NewContextEntryWizard()
+    {
+        super();
+    }
+
+
+    /**
+     * Gets the id.
+     * 
+     * @return the id
+     */
+    public static String getId()
+    {
+        return BrowserCommonConstants.WIZARD_NEW_CONTEXT_ENTRY_WIZARD;
+    }
+
+
+    /**
+     * @return always true
+     */
+    public boolean isNewContextEntry()
+    {
+        return true;
+    }
+
+}

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java?rev=822918&r1=822917&r2=822918&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java
Wed Oct  7 21:15:58 2009
@@ -33,13 +33,11 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IBookmark;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
-import org.apache.directory.studio.ldapbrowser.core.model.IRootDSE;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
 import org.apache.directory.studio.ldapbrowser.core.model.IValue;
 import org.apache.directory.studio.ldapbrowser.core.model.impl.DummyEntry;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.jface.wizard.Wizard;
@@ -87,9 +85,6 @@
     /** The prototype entry. */
     protected DummyEntry prototypeEntry;
 
-    /** The is new context entry flag. */
-    protected boolean isNewContextEntry;
-
 
     /**
      * Creates a new instance of NewEntryWizard.
@@ -120,8 +115,7 @@
         // determine the currently selected entry
         Object o = selection.getFirstElement();
 
-        isNewContextEntry = isNewContextEntry( selection );
-        if ( isNewContextEntry )
+        if ( isNewContextEntry() )
         {
             setWindowTitle( Messages.getString("NewEntryWizard.NewContextEntry") ); //$NON-NLS-1$
         }
@@ -400,30 +394,6 @@
      */
     public boolean isNewContextEntry()
     {
-        return isNewContextEntry;
-    }
-
-
-    /**
-     * Checks if the current selection starts the "New Context Entry" process.
-     * This is if the selection is the Root DSE.
-     * 
-     * @param selection the selection
-     * 
-     * @return true, if is new context entry
-     */
-    public static boolean isNewContextEntry( ISelection selection )
-    {
-        if ( selection != null && selection instanceof IStructuredSelection )
-        {
-            Object object = ( ( IStructuredSelection ) selection ).getFirstElement();
-
-            if ( object instanceof IRootDSE || object instanceof BrowserCategory )
-            {
-                return true;
-            }
-        }
-
         return false;
     }
 

Modified: directory/studio/trunk/ldapbrowser-ui/plugin.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/plugin.properties?rev=822918&r1=822917&r2=822918&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/plugin.properties (original)
+++ directory/studio/trunk/ldapbrowser-ui/plugin.properties Wed Oct  7 21:15:58 2009
@@ -66,6 +66,9 @@
 NewWizard_NewEntryWizard_id=org.apache.directory.studio.ldapbrowser.common.wizards.NewEntryWizard
 NewWizard_NewEntryWizard_name=LDAP Entry
 
+NewWizard_NewContextEntryWizard_id=org.apache.directory.studio.ldapbrowser.common.wizards.NewContextEntryWizard
+NewWizard_NewContextEntryWizard_name=LDAP Context Entry
+
 NewWizard_NewSearchWizard_id=org.apache.directory.studio.ldapbrowser.ui.wizards.NewSearchWizard
 NewWizard_NewSearchWizard_name=LDAP Search
 

Modified: directory/studio/trunk/ldapbrowser-ui/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/plugin.xml?rev=822918&r1=822917&r2=822918&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/plugin.xml (original)
+++ directory/studio/trunk/ldapbrowser-ui/plugin.xml Wed Oct  7 21:15:58 2009
@@ -127,6 +127,14 @@
             name="%NewWizard_NewEntryWizard_name"
             project="false"/>
       <wizard
+            category="%NewWizards_Category_id"
+            class="org.apache.directory.studio.ldapbrowser.common.wizards.NewContextEntryWizard"
+            hasPages="true"
+            icon="resources/icons/entry_add.gif"
+            id="%NewWizard_NewContextEntryWizard_id"
+            name="%NewWizard_NewContextEntryWizard_name"
+            project="false"/>
+      <wizard
             canFinishEarly="true"
             category="%NewWizards_Category_id"
             class="org.apache.directory.studio.ldapbrowser.ui.wizards.NewSearchWizard"

Modified: directory/studio/trunk/ldapbrowser-ui/plugin_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/plugin_de.properties?rev=822918&r1=822917&r2=822918&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/plugin_de.properties (original)
+++ directory/studio/trunk/ldapbrowser-ui/plugin_de.properties Wed Oct  7 21:15:58 2009
@@ -40,6 +40,8 @@
 
 NewWizard_NewEntryWizard_name=LDAP Entry
 
+NewWizard_NewContextEntryWizard_name=LDAP Kontext Eintrag
+
 NewWizard_NewSearchWizard_name=LDAP Suche
 
 NewWizard_NewBookmarkWizard_name=LDAP Lesezeichen

Modified: directory/studio/trunk/ldapbrowser-ui/plugin_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/plugin_fr.properties?rev=822918&r1=822917&r2=822918&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/plugin_fr.properties (original)
+++ directory/studio/trunk/ldapbrowser-ui/plugin_fr.properties Wed Oct  7 21:15:58 2009
@@ -40,6 +40,7 @@
 View_SearchLogsView_name=Logs de recherches
 
 NewWizard_NewEntryWizard_name=Entr\u00E9e LDAP
+NewWizard_NewContextEntryWizard_name=Context Entr\u00E9e LDAP
 NewWizard_NewSearchWizard_name=Recherche LDAP
 NewWizard_NewBookmarkWizard_name=Signet LDAP
 NewWizard_BatchOperationWizard_name=Groupe d'op\u00E9rations LDAP

Added: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/NewContextEntryAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/NewContextEntryAction.java?rev=822918&view=auto
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/NewContextEntryAction.java
(added)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/NewContextEntryAction.java
Wed Oct  7 21:15:58 2009
@@ -0,0 +1,87 @@
+/*
+ *  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.ldapbrowser.ui.actions;
+
+
+import org.apache.directory.studio.ldapbrowser.common.wizards.NewContextEntryWizard;
+import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
+import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.ui.INewWizard;
+import org.eclipse.ui.IWorkbenchWindow;
+
+
+/**
+ * This action launches the New Context Entry Wizard.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewContextEntryAction extends NewEntryAction
+{
+
+    /**
+     * Creates a new instance of NewContextEntryAction.
+     */
+    public NewContextEntryAction()
+    {
+    }
+
+
+    /**
+     * Creates a new instance of NewContextEntryAction.
+     *
+     * @param window
+     *      the associated Window
+     */
+    public NewContextEntryAction( IWorkbenchWindow window )
+    {
+        super( window );
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    protected INewWizard getWizard()
+    {
+        return new NewContextEntryWizard();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getText()
+    {
+        return Messages.getString( "NewEntryAction.NewContextEntry" ); //$NON-NLS-1$
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public ImageDescriptor getImageDescriptor()
+    {
+        return BrowserUIPlugin.getDefault().getImageDescriptor( BrowserUIConstants.IMG_ENTRY_ADD
);
+    }
+
+}

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/NewEntryAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/NewEntryAction.java?rev=822918&r1=822917&r2=822918&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/NewEntryAction.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/NewEntryAction.java
Wed Oct  7 21:15:58 2009
@@ -28,6 +28,7 @@
 import org.eclipse.jface.resource.ImageDescriptor;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.ui.INewWizard;
 import org.eclipse.ui.IWorkbenchWindow;
 
 
@@ -39,7 +40,7 @@
  */
 public class NewEntryAction extends BrowserAction
 {
-    private IWorkbenchWindow window;
+    protected IWorkbenchWindow window;
 
 
     /**
@@ -88,7 +89,7 @@
      */
     public void run()
     {
-        NewEntryWizard wizard = new NewEntryWizard();
+        INewWizard wizard = getWizard();
 
         wizard.init( window.getWorkbench(), ( IStructuredSelection ) window.getSelectionService().getSelection()
);
         WizardDialog dialog = new WizardDialog( getShell(), wizard );
@@ -101,10 +102,18 @@
     /**
      * {@inheritDoc}
      */
+    protected INewWizard getWizard()
+    {
+        return new NewEntryWizard();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public String getText()
     {
-        boolean isNewContextEntry = NewEntryWizard.isNewContextEntry( window.getSelectionService().getSelection()
);
-        return isNewContextEntry ? Messages.getString( "NewEntryAction.NewContextEntry" )
: Messages.getString( "NewEntryAction.NewEntry" ); //$NON-NLS-1$ //$NON-NLS-2$
+        return Messages.getString( "NewEntryAction.NewEntry" ); //$NON-NLS-1$
     }
 
 

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java?rev=822918&r1=822917&r2=822918&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/perspective/BrowserPerspective.java
Wed Oct  7 21:15:58 2009
@@ -23,6 +23,7 @@
 
 import org.apache.directory.studio.connection.ui.wizards.NewConnectionWizard;
 import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
+import org.apache.directory.studio.ldapbrowser.common.wizards.NewContextEntryWizard;
 import org.apache.directory.studio.ldapbrowser.common.wizards.NewEntryWizard;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
 import org.apache.directory.studio.ldapbrowser.ui.views.browser.BrowserView;
@@ -82,6 +83,7 @@
         // Add "new wizards".
         layout.addNewWizardShortcut( NewConnectionWizard.getId() );
         layout.addNewWizardShortcut( NewEntryWizard.getId() );
+        layout.addNewWizardShortcut( NewContextEntryWizard.getId() );
         layout.addNewWizardShortcut( NewSearchWizard.getId() );
         layout.addNewWizardShortcut( NewBookmarkWizard.getId() );
         layout.addNewWizardShortcut( BatchOperationWizard.getId() );

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java?rev=822918&r1=822917&r2=822918&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java
Wed Oct  7 21:15:58 2009
@@ -40,6 +40,7 @@
 import org.apache.directory.studio.ldapbrowser.ui.actions.MoveAction;
 import org.apache.directory.studio.ldapbrowser.ui.actions.NewBatchOperationAction;
 import org.apache.directory.studio.ldapbrowser.ui.actions.NewBookmarkAction;
+import org.apache.directory.studio.ldapbrowser.ui.actions.NewContextEntryAction;
 import org.apache.directory.studio.ldapbrowser.ui.actions.NewEntryAction;
 import org.apache.directory.studio.ldapbrowser.ui.actions.NewSearchAction;
 import org.apache.directory.studio.ldapbrowser.ui.actions.OpenEntryEditorAction;
@@ -90,6 +91,9 @@
     /** The Constant newEntryAction. */
     private static final String newEntryAction = "newEntryAction"; //$NON-NLS-1$
 
+    /** The Constant newContextEntryAction. */
+    private static final String newContextEntryAction = "newContextEntryAction"; //$NON-NLS-1$
+
     /** The Constant newSearchAction. */
     private static final String newSearchAction = "newSearchAction"; //$NON-NLS-1$
 
@@ -192,6 +196,8 @@
 
         browserActionMap.put( newEntryAction, new BrowserViewActionProxy( viewer, new NewEntryAction(
view.getSite()
             .getWorkbenchWindow() ) ) );
+        browserActionMap.put( newContextEntryAction, new BrowserViewActionProxy( viewer,
new NewContextEntryAction(
+            view.getSite().getWorkbenchWindow() ) ) );
         browserActionMap.put( newSearchAction, new BrowserViewActionProxy( viewer, new NewSearchAction()
) );
         browserActionMap.put( newBookmarkAction, new BrowserViewActionProxy( viewer, new
NewBookmarkAction() ) );
         browserActionMap.put( newBatchOperationAction, new BrowserViewActionProxy( viewer,
@@ -311,10 +317,15 @@
     public void menuAboutToShow( IMenuManager menuManager )
     {
         // new
-        menuManager.add( browserActionMap.get( newEntryAction ) );
-        menuManager.add( browserActionMap.get( newSearchAction ) );
-        menuManager.add( browserActionMap.get( newBookmarkAction ) );
-        menuManager.add( browserActionMap.get( newBatchOperationAction ) );
+        MenuManager newMenuManager = new MenuManager( Messages.getString( "BrowserViewActionGroup.New"
) ); //$NON-NLS-1$
+        newMenuManager.add( browserActionMap.get( newEntryAction ) );
+        newMenuManager.add( browserActionMap.get( newContextEntryAction ) );
+        newMenuManager.add( new Separator() );
+        newMenuManager.add( browserActionMap.get( newSearchAction ) );
+        newMenuManager.add( browserActionMap.get( newBookmarkAction ) );
+        newMenuManager.add( new Separator() );
+        newMenuManager.add( browserActionMap.get( newBatchOperationAction ) );
+        menuManager.add( newMenuManager );
         menuManager.add( new Separator() );
 
         // navigation

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages.properties?rev=822918&r1=822917&r2=822918&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages.properties
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages.properties
Wed Oct  7 21:15:58 2009
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+BrowserViewActionGroup.New=&New
 BrowserViewActionGroup.Advanced=Advanced
 BrowserViewActionGroup.Export=Export
 BrowserViewActionGroup.Import=Import

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages_de.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages_de.properties?rev=822918&r1=822917&r2=822918&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages_de.properties
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages_de.properties
Wed Oct  7 21:15:58 2009
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+BrowserViewActionGroup.New=&Neu
 BrowserViewActionGroup.Advanced=Erweitert
 BrowserViewActionGroup.Export=Exportieren
 BrowserViewActionGroup.Import=Importieren

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages_fr.properties
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages_fr.properties?rev=822918&r1=822917&r2=822918&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages_fr.properties
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/messages_fr.properties
Wed Oct  7 21:15:58 2009
@@ -15,6 +15,7 @@
 # specific language governing permissions and limitations
 # under the License.
 
+BrowserViewActionGroup.New=&Nouveau
 BrowserViewActionGroup.Advanced=Avanc\u00E9
 BrowserViewActionGroup.Export=Export
 BrowserViewActionGroup.Import=Import



Mime
View raw message