directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r692348 - in /directory/studio/trunk: connection-core/src/main/java/org/apache/directory/studio/connection/core/ ldapbrowser-common/resources/icons/ ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/ ldapbrowse...
Date Fri, 05 Sep 2008 06:30:04 GMT
Author: seelmann
Date: Thu Sep  4 23:30:03 2008
New Revision: 692348

URL: http://svn.apache.org/viewvc?rev=692348&view=rev
Log:
DIRSTUDIO-311: added go to DN action and dialog

Added:
    directory/studio/trunk/ldapbrowser-common/resources/icons/dneditor.gif   (with props)
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/DnDialog.java
      - copied, changed from r692228, directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnDialog.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/GotoDnAction.java
Removed:
    directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnDialog.java
Modified:
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/BrowserCommonConstants.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateInDitAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/views/browser/BrowserViewActionGroup.java
    directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnValueEditor.java

Modified: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java?rev=692348&r1=692347&r2=692348&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
(original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/Utils.java
Thu Sep  4 23:30:03 2008
@@ -26,8 +26,8 @@
 import javax.naming.InvalidNameException;
 import javax.naming.directory.SearchControls;
 
-import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.util.LdapURL;
 import org.apache.directory.shared.ldap.util.StringTools;
 import org.apache.directory.studio.connection.core.Connection.AliasDereferencingMethod;
 import org.apache.directory.studio.connection.core.ConnectionParameter.EncryptionMethod;
@@ -256,4 +256,29 @@
         return cmdLine.toString();
     }
 
+
+    /**
+     * Gets the LdapDN from the given String or null if the 
+     * String can't be parsed.
+     * 
+     * @param dn the DN as String
+     * 
+     * @return the DN as LdapDN
+     */
+    public static LdapDN getLdapDn( String dn )
+    {
+        if ( dn == null )
+        {
+            return null;
+        }
+        try
+        {
+            return new LdapDN( dn );
+        }
+        catch ( InvalidNameException e )
+        {
+            return null;
+        }
+    }
+
 }

Added: directory/studio/trunk/ldapbrowser-common/resources/icons/dneditor.gif
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/resources/icons/dneditor.gif?rev=692348&view=auto
==============================================================================
Binary file - no diff available.

Propchange: directory/studio/trunk/ldapbrowser-common/resources/icons/dneditor.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

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=692348&r1=692347&r2=692348&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
Thu Sep  4 23:30:03 2008
@@ -122,6 +122,7 @@
     public static final String IMG_TEXTEDITOR = "resources/icons/texteditor.gif";
     public static final String IMG_INPLACE_TEXTEDITOR = "resources/icons/inplace_texteditor.gif";
     public static final String IMG_MULTIVALUEDEDITOR = "resources/icons/multivaluededitor.gif";
+    public static final String IMG_DNEDITOR = "resources/icons/dneditor.gif";
     public static final String IMG_PULLDOWN = "resources/icons/pulldown.gif";
     public static final String IMG_SORT = "resources/icons/sort.gif";
     public static final String IMG_DIT = "resources/icons/dit.gif";

Copied: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/DnDialog.java
(from r692228, directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnDialog.java)
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/DnDialog.java?p2=directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/DnDialog.java&p1=directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnDialog.java&r1=692228&r2=692348&rev=692348&view=diff
==============================================================================
--- directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnDialog.java
(original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/dialogs/DnDialog.java
Thu Sep  4 23:30:03 2008
@@ -18,17 +18,17 @@
  *
  */
 
-package org.apache.directory.studio.valueeditors.dn;
+package org.apache.directory.studio.ldapbrowser.common.dialogs;
 
 
 import org.apache.directory.shared.ldap.name.LdapDN;
 import org.apache.directory.studio.connection.ui.widgets.BaseWidgetUtils;
+import org.apache.directory.studio.ldapbrowser.common.BrowserCommonActivator;
+import org.apache.directory.studio.ldapbrowser.common.BrowserCommonConstants;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyEvent;
 import org.apache.directory.studio.ldapbrowser.common.widgets.WidgetModifyListener;
 import org.apache.directory.studio.ldapbrowser.common.widgets.search.EntryWidget;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
-import org.apache.directory.studio.valueeditors.ValueEditorsActivator;
-import org.apache.directory.studio.valueeditors.ValueEditorsConstants;
 import org.eclipse.jface.dialogs.Dialog;
 import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.swt.SWT;
@@ -48,6 +48,12 @@
 public class DnDialog extends Dialog
 {
 
+    /** The title. */
+    private String title;
+    
+    /** The description. */
+    private String description;
+
     /** The entry widget. */
     private EntryWidget entryWidget;
 
@@ -62,13 +68,17 @@
      * Creates a new instance of DnDialog.
      * 
      * @param parentShell the parent shell
-     * @param connection the connection
-     * @param dn the dn
+     * @param title the title of the dialog
+     * @param description the description of the dialog
+     * @param connection the connection used to browse the directory
+     * @param dn the initial DN, may be null
      */
-    public DnDialog( Shell parentShell, IBrowserConnection connection, LdapDN dn )
+    public DnDialog( Shell parentShell, String title, String description, IBrowserConnection
connection, LdapDN dn )
     {
         super( parentShell );
         super.setShellStyle( super.getShellStyle() | SWT.RESIZE );
+        this.title = title;
+        this.description = description;
         this.connection = connection;
         this.dn = dn;
     }
@@ -80,8 +90,8 @@
     protected void configureShell( Shell shell )
     {
         super.configureShell( shell );
-        shell.setText( "DN Editor" );
-        shell.setImage( ValueEditorsActivator.getDefault().getImage( ValueEditorsConstants.IMG_DNEDITOR
) );
+        shell.setText( title );
+        shell.setImage( BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_DNEDITOR
) );
     }
 
 
@@ -112,12 +122,16 @@
      */
     protected Control createDialogArea( Composite parent )
     {
-
         Composite composite = ( Composite ) super.createDialogArea( parent );
         GridData gd = new GridData( GridData.FILL_BOTH );
         gd.widthHint = convertHorizontalDLUsToPixels( IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH
) * 3 / 2;
         composite.setLayoutData( gd );
 
+        if(description != null)
+        {
+            BaseWidgetUtils.createLabel( composite, description, 1 );
+        }
+        
         Composite innerComposite = BaseWidgetUtils.createColumnContainer( composite, 2, 1
);
         entryWidget = new EntryWidget( connection, dn );
         entryWidget.addWidgetModifyListener( new WidgetModifyListener()

Added: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/GotoDnAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/GotoDnAction.java?rev=692348&view=auto
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/GotoDnAction.java
(added)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/GotoDnAction.java
Thu Sep  4 23:30:03 2008
@@ -0,0 +1,134 @@
+/*
+ *  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.shared.ldap.name.LdapDN;
+import org.apache.directory.studio.connection.core.Utils;
+import org.apache.directory.studio.ldapbrowser.common.dialogs.DnDialog;
+import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
+import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
+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.swt.dnd.Clipboard;
+import org.eclipse.swt.dnd.TextTransfer;
+import org.eclipse.swt.widgets.Display;
+
+
+/**
+ * This action locates a DN that the user entered into a dialog.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class GotoDnAction extends LocateInDitAction
+{
+    /**
+     * Creates a new instance of LocateDnInDitAction.
+     */
+    public GotoDnAction()
+    {
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getText()
+    {
+        return "Go to DN...";
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public ImageDescriptor getImageDescriptor()
+    {
+        return BrowserUIPlugin.getDefault().getImageDescriptor( BrowserUIConstants.IMG_LOCATE_DN_IN_DIT
);
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getCommandId()
+    {
+        return null;
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
+    public boolean isEnabled()
+    {
+        return getInput() instanceof IBrowserConnection;
+    }
+
+
+    /**
+     * This implementation returns a connection and DN if th user put
+     * a valid DN into the dialog
+     */
+    protected ConnectionAndDn getConnectionAndDn()
+    {
+        if ( getInput() instanceof IBrowserConnection )
+        {
+            IBrowserConnection conn = ( IBrowserConnection ) getInput();
+
+            LdapDN dn = Utils.getLdapDn( getStringFromClipboard() );
+
+            DnDialog dialog = new DnDialog( getShell(), "Go to DN", "Please enter the DN
you want to go to.", conn, dn );
+            if ( dialog.open() == TextDialog.OK && dialog.getDn() != null )
+            {
+                dn = dialog.getDn();
+                return new ConnectionAndDn( conn, dn );
+            }
+        }
+
+        return null;
+    }
+
+
+    private static String getStringFromClipboard()
+    {
+        Clipboard clipboard = null;
+        try
+        {
+            clipboard = new Clipboard( Display.getCurrent() );
+            Object contents = clipboard.getContents( TextTransfer.getInstance() );
+            if ( contents != null && contents instanceof String )
+            {
+                return ( String ) contents;
+            }
+        }
+        finally
+        {
+            if ( clipboard != null )
+            {
+                clipboard.dispose();
+            }
+        }
+        return null;
+    }
+}

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateInDitAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateInDitAction.java?rev=692348&r1=692347&r2=692348&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateInDitAction.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/actions/LocateInDitAction.java
Thu Sep  4 23:30:03 2008
@@ -100,7 +100,7 @@
     /**
      * {@inheritDoc}
      */
-    public final boolean isEnabled()
+    public boolean isEnabled()
     {
         return getConnectionAndDn() != null;
     }

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=692348&r1=692347&r2=692348&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
Thu Sep  4 23:30:03 2008
@@ -32,6 +32,7 @@
 import org.apache.directory.studio.ldapbrowser.ui.actions.CopyEntryAsCsvAction;
 import org.apache.directory.studio.ldapbrowser.ui.actions.CopyEntryAsLdifAction;
 import org.apache.directory.studio.ldapbrowser.ui.actions.CopyUrlAction;
+import org.apache.directory.studio.ldapbrowser.ui.actions.GotoDnAction;
 import org.apache.directory.studio.ldapbrowser.ui.actions.ImportExportAction;
 import org.apache.directory.studio.ldapbrowser.ui.actions.LocateEntryInDitAction;
 import org.apache.directory.studio.ldapbrowser.ui.actions.MoveAction;
@@ -80,6 +81,9 @@
     /** The Constant locateEntryInDitAction. */
     private static final String locateEntryInDitAction = "locateEntryInDitAction";
 
+    /** The Constant gotoDnAction. */
+    private static final String gotoDnAction = "gotoDnAction";
+
     /** The Constant newEntryAction. */
     private static final String newEntryAction = "newEntryAction";
 
@@ -183,6 +187,7 @@
 
         browserActionMap
             .put( locateEntryInDitAction, new BrowserViewActionProxy( viewer, new LocateEntryInDitAction()
) );
+        browserActionMap.put( gotoDnAction, new BrowserViewActionProxy( viewer, new GotoDnAction()
) );
 
         browserActionMap.put( pasteAction, new BrowserViewActionProxy( viewer, new PasteAction()
) );
         browserActionMap.put( copyAction, new BrowserViewActionProxy( viewer, new CopyAction(
@@ -254,9 +259,9 @@
     public void fillToolBar( IToolBarManager toolBarManager )
     {
 
-        toolBarManager.add( ( IAction ) browserActionMap.get( upAction ) );
+        toolBarManager.add( browserActionMap.get( upAction ) );
         toolBarManager.add( new Separator() );
-        toolBarManager.add( ( IAction ) browserActionMap.get( refreshAction ) );
+        toolBarManager.add( browserActionMap.get( refreshAction ) );
         toolBarManager.add( new Separator() );
         toolBarManager.add( collapseAllAction );
         toolBarManager.add( linkWithEditorAction );
@@ -289,68 +294,69 @@
     public void menuAboutToShow( IMenuManager menuManager )
     {
         // new
-        menuManager.add( ( IAction ) browserActionMap.get( newEntryAction ) );
-        menuManager.add( ( IAction ) browserActionMap.get( newSearchAction ) );
-        menuManager.add( ( IAction ) browserActionMap.get( newBookmarkAction ) );
-        menuManager.add( ( IAction ) browserActionMap.get( newBatchOperationAction ) );
+        menuManager.add( browserActionMap.get( newEntryAction ) );
+        menuManager.add( browserActionMap.get( newSearchAction ) );
+        menuManager.add( browserActionMap.get( newBookmarkAction ) );
+        menuManager.add( browserActionMap.get( newBatchOperationAction ) );
         menuManager.add( new Separator() );
 
         // navigation
         BrowserViewActionProxy leid = ( BrowserViewActionProxy ) browserActionMap.get( locateEntryInDitAction
);
         leid.setImageDescriptor( leid.getAction().getImageDescriptor() );
         menuManager.add( leid );
-        menuManager.add( ( IAction ) browserActionMap.get( upAction ) );
+        menuManager.add( browserActionMap.get( gotoDnAction ) );
+        menuManager.add( browserActionMap.get( upAction ) );
         menuManager.add( new Separator() );
 
         // copy/paste/...
-        menuManager.add( ( IAction ) browserActionMap.get( copyAction ) );
-        menuManager.add( ( IAction ) browserActionMap.get( pasteAction ) );
-        menuManager.add( ( IAction ) browserActionMap.get( deleteAction ) );
-        menuManager.add( ( IAction ) browserActionMap.get( moveAction ) );
-        menuManager.add( ( IAction ) browserActionMap.get( renameAction ) );
+        menuManager.add( browserActionMap.get( copyAction ) );
+        menuManager.add( browserActionMap.get( pasteAction ) );
+        menuManager.add( browserActionMap.get( deleteAction ) );
+        menuManager.add( browserActionMap.get( moveAction ) );
+        menuManager.add( browserActionMap.get( renameAction ) );
         MenuManager advancedMenuManager = new MenuManager( "Advanced" );
-        advancedMenuManager.add( ( IAction ) browserActionMap.get( copyDnAction ) );
-        advancedMenuManager.add( ( IAction ) browserActionMap.get( copyUrlAction ) );
+        advancedMenuManager.add( browserActionMap.get( copyDnAction ) );
+        advancedMenuManager.add( browserActionMap.get( copyUrlAction ) );
         advancedMenuManager.add( new Separator() );
-        advancedMenuManager.add( ( IAction ) browserActionMap.get( copyEntryAsLdifDnOnlyAction
) );
-        advancedMenuManager.add( ( IAction ) browserActionMap.get( copyEntryAsLdifReturningAttributesOnlyAction
) );
-        advancedMenuManager.add( ( IAction ) browserActionMap.get( copyEntryAsLdifAction
) );
-        advancedMenuManager.add( ( IAction ) browserActionMap.get( copyEntryAsLdifOperationalAction
) );
+        advancedMenuManager.add( browserActionMap.get( copyEntryAsLdifDnOnlyAction ) );
+        advancedMenuManager.add( browserActionMap.get( copyEntryAsLdifReturningAttributesOnlyAction
) );
+        advancedMenuManager.add( browserActionMap.get( copyEntryAsLdifAction ) );
+        advancedMenuManager.add( browserActionMap.get( copyEntryAsLdifOperationalAction )
);
         advancedMenuManager.add( new Separator() );
-        advancedMenuManager.add( ( IAction ) browserActionMap.get( copyEntryAsCsvDnOnlyAction
) );
-        advancedMenuManager.add( ( IAction ) browserActionMap.get( copyEntryAsCsvReturningAttributesOnlyAction
) );
-        advancedMenuManager.add( ( IAction ) browserActionMap.get( copyEntryAsCsvAction )
);
-        advancedMenuManager.add( ( IAction ) browserActionMap.get( copyEntryAsCsvOperationalAction
) );
+        advancedMenuManager.add( browserActionMap.get( copyEntryAsCsvDnOnlyAction ) );
+        advancedMenuManager.add( browserActionMap.get( copyEntryAsCsvReturningAttributesOnlyAction
) );
+        advancedMenuManager.add( browserActionMap.get( copyEntryAsCsvAction ) );
+        advancedMenuManager.add( browserActionMap.get( copyEntryAsCsvOperationalAction )
);
         advancedMenuManager.add( new Separator() );
         menuManager.add( advancedMenuManager );
         menuManager.add( new Separator() );
 
         // filter, batch
-        menuManager.add( ( IAction ) browserActionMap.get( filterChildrenAction ) );
-        if ( ( ( IAction ) browserActionMap.get( unfilterChildrenAction ) ).isEnabled() )
+        menuManager.add( browserActionMap.get( filterChildrenAction ) );
+        if ( ( browserActionMap.get( unfilterChildrenAction ) ).isEnabled() )
         {
-            menuManager.add( ( IAction ) browserActionMap.get( unfilterChildrenAction ) );
+            menuManager.add( browserActionMap.get( unfilterChildrenAction ) );
         }
         menuManager.add( new Separator() );
 
         // import/export
         MenuManager importMenuManager = new MenuManager( "Import" );
-        importMenuManager.add( ( IAction ) browserActionMap.get( importLdifAction ) );
-        importMenuManager.add( ( IAction ) browserActionMap.get( importDsmlAction ) );
+        importMenuManager.add( browserActionMap.get( importLdifAction ) );
+        importMenuManager.add( browserActionMap.get( importDsmlAction ) );
         importMenuManager.add( new Separator() );
         menuManager.add( importMenuManager );
 
         MenuManager exportMenuManager = new MenuManager( "Export" );
-        exportMenuManager.add( ( IAction ) browserActionMap.get( exportLdifAction ) );
-        exportMenuManager.add( ( IAction ) browserActionMap.get( exportDsmlAction ) );
+        exportMenuManager.add( browserActionMap.get( exportLdifAction ) );
+        exportMenuManager.add( browserActionMap.get( exportDsmlAction ) );
         exportMenuManager.add( new Separator() );
-        exportMenuManager.add( ( IAction ) browserActionMap.get( exportCsvAction ) );
-        exportMenuManager.add( ( IAction ) browserActionMap.get( exportExcelAction ) );
+        exportMenuManager.add( browserActionMap.get( exportCsvAction ) );
+        exportMenuManager.add( browserActionMap.get( exportExcelAction ) );
         menuManager.add( exportMenuManager );
         menuManager.add( new Separator() );
 
         // refresh
-        menuManager.add( ( IAction ) browserActionMap.get( refreshAction ) );
+        menuManager.add( browserActionMap.get( refreshAction ) );
         menuManager.add( new Separator() );
 
         // additions
@@ -358,7 +364,7 @@
         menuManager.add( new Separator() );
 
         // properties
-        menuManager.add( ( IAction ) browserActionMap.get( propertyDialogAction ) );
+        menuManager.add( browserActionMap.get( propertyDialogAction ) );
 
     }
 
@@ -370,21 +376,16 @@
     {
         if ( actionBars != null )
         {
-            actionBars.setGlobalActionHandler( ActionFactory.COPY.getId(), ( IAction ) browserActionMap
-                .get( copyAction ) );
-            actionBars.setGlobalActionHandler( ActionFactory.PASTE.getId(), ( IAction ) browserActionMap
-                .get( pasteAction ) );
-            actionBars.setGlobalActionHandler( ActionFactory.DELETE.getId(), ( IAction )
browserActionMap
-                .get( deleteAction ) );
-            actionBars.setGlobalActionHandler( ActionFactory.MOVE.getId(), ( IAction ) browserActionMap
-                .get( moveAction ) );
-            actionBars.setGlobalActionHandler( ActionFactory.RENAME.getId(), ( IAction )
browserActionMap
-                .get( renameAction ) );
+            actionBars.setGlobalActionHandler( ActionFactory.COPY.getId(), browserActionMap.get(
copyAction ) );
+            actionBars.setGlobalActionHandler( ActionFactory.PASTE.getId(), browserActionMap.get(
pasteAction ) );
+            actionBars.setGlobalActionHandler( ActionFactory.DELETE.getId(), browserActionMap.get(
deleteAction ) );
+            actionBars.setGlobalActionHandler( ActionFactory.MOVE.getId(), browserActionMap.get(
moveAction ) );
+            actionBars.setGlobalActionHandler( ActionFactory.RENAME.getId(), browserActionMap.get(
renameAction ) );
         }
 
         super.activateGlobalActionHandlers();
 
-        IAction leid = ( IAction ) browserActionMap.get( locateEntryInDitAction );
+        IAction leid = browserActionMap.get( locateEntryInDitAction );
         ActionUtils.activateActionHandler( leid );
     }
 
@@ -405,7 +406,7 @@
 
         super.deactivateGlobalActionHandlers();
 
-        IAction leid = ( IAction ) browserActionMap.get( locateEntryInDitAction );
+        IAction leid = browserActionMap.get( locateEntryInDitAction );
         ActionUtils.deactivateActionHandler( leid );
     }
 

Modified: directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnValueEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnValueEditor.java?rev=692348&r1=692347&r2=692348&view=diff
==============================================================================
--- directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnValueEditor.java
(original)
+++ directory/studio/trunk/valueeditors/src/main/java/org/apache/directory/studio/valueeditors/dn/DnValueEditor.java
Thu Sep  4 23:30:03 2008
@@ -24,6 +24,7 @@
 import javax.naming.InvalidNameException;
 
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.studio.ldapbrowser.common.dialogs.DnDialog;
 import org.apache.directory.studio.ldapbrowser.common.dialogs.TextDialog;
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeHierarchy;
 import org.apache.directory.studio.ldapbrowser.core.model.IBrowserConnection;
@@ -62,7 +63,7 @@
             {
                 dn = null;
             }
-            DnDialog dialog = new DnDialog( shell, wrapper.connection, dn );
+            DnDialog dialog = new DnDialog( shell, "DN Editor", null, wrapper.connection,
dn );
             if ( dialog.open() == TextDialog.OK && dialog.getDn() != null )
             {
                 setValue( dialog.getDn().toString() );
@@ -125,7 +126,6 @@
         return null;
     }
 
-
     /**
      * The DnValueEditorRawValueWrapper is used to pass contextual
      * information to the opened DnDialog.



Mime
View raw message