directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r689845 [2/3] - in /directory/studio/trunk: connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/ connection-ui/src/main/java/org/apache/directory/studio/connection/ui/ ldapbrowser-common/src/main/java/org/apache/d...
Date Thu, 28 Aug 2008 14:56:40 GMT
Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorActionGroup.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorActionGroup.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorActionGroup.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorActionGroup.java Thu Aug 28 07:56:37 2008
@@ -65,17 +65,28 @@
 import org.eclipse.ui.actions.ContributionItemFactory;
 
 
+/**
+ * The SearchResultEditorActionGroup manages all actions of the search result editor.
+ * 
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class SearchResultEditorActionGroup implements ActionHandlerManager, IMenuListener
 {
 
+    /** The show DN action. */
     private ShowDNAction showDNAction;
 
+    /** The show links action. */
     private ShowLinksAction showLinksAction;
 
+    /** The show raw values action. */
     private ShowRawValuesAction showRawValuesAction;
 
+    /** The open search result editor preference page. */
     private OpenSearchResultEditorPreferencePage openSearchResultEditorPreferencePage;
 
+    /** The show quick filter action. */
     private ShowQuickFilterAction showQuickFilterAction;
 
     /** The open default editor action. */
@@ -89,7 +100,8 @@
 
     /** The open entry value editor action. */
     private SearchResultEditorActionProxy openEntryValueEditorActionProxy;
-    
+
+    /** The open value editor preferences action. */
     private ValueEditorPreferencesAction openValueEditorPreferencesAction;
 
     private static final String copyTableAction = "copyTableAction";
@@ -148,28 +160,35 @@
 
     private final static String propertyDialogAction = "propertyDialogAction";
 
-    private Map searchResultEditorActionMap;
+    /** The search result editor action map. */
+    private Map<String, SearchResultEditorActionProxy> searchResultEditorActionMap;
 
+    /** The action bars. */
     private IActionBars actionBars;
 
+    /** The search result editor. */
     private SearchResultEditor searchResultEditor;
 
 
+    /**
+     * Creates a new instance of SearchResultEditorActionGroup.
+     * 
+     * @param searchResultEditor the search result editor
+     */
     public SearchResultEditorActionGroup( SearchResultEditor searchResultEditor )
     {
         this.searchResultEditor = searchResultEditor;
-        this.searchResultEditorActionMap = new HashMap();
+        searchResultEditorActionMap = new HashMap<String, SearchResultEditorActionProxy>();
 
         TableViewer viewer = searchResultEditor.getMainWidget().getViewer();
         SearchResultEditorCursor cursor = searchResultEditor.getConfiguration().getCursor( viewer );
         ValueEditorManager valueEditorManager = searchResultEditor.getConfiguration().getValueEditorManager( viewer );
 
-        this.showDNAction = new ShowDNAction();
-        this.showLinksAction = new ShowLinksAction();
-        this.showRawValuesAction = new ShowRawValuesAction();
-        this.openSearchResultEditorPreferencePage = new OpenSearchResultEditorPreferencePage();
-        this.showQuickFilterAction = new ShowQuickFilterAction( searchResultEditor.getMainWidget()
-            .getQuickFilterWidget() );
+        showDNAction = new ShowDNAction();
+        showLinksAction = new ShowLinksAction();
+        showRawValuesAction = new ShowRawValuesAction();
+        openSearchResultEditorPreferencePage = new OpenSearchResultEditorPreferencePage();
+        showQuickFilterAction = new ShowQuickFilterAction( searchResultEditor.getMainWidget().getQuickFilterWidget() );
 
         openBestValueEditorActionProxy = new SearchResultEditorActionProxy( cursor, new OpenBestEditorAction( viewer,
             cursor, valueEditorManager, this ) );
@@ -185,87 +204,88 @@
         }
         openEntryValueEditorActionProxy = new SearchResultEditorActionProxy( cursor, new OpenEntryEditorAction( viewer,
             cursor, valueEditorManager, valueEditorManager.getEntryValueEditor(), this ) );
-        this.openValueEditorPreferencesAction = new ValueEditorPreferencesAction();
+        openValueEditorPreferencesAction = new ValueEditorPreferencesAction();
 
-        this.searchResultEditorActionMap.put( copyTableAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( copyTableAction, new SearchResultEditorActionProxy( cursor,
             new CopyEntryAsCsvAction( CopyEntryAsCsvAction.MODE_TABLE ) ) );
-        this.searchResultEditorActionMap.put( refreshSearchAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( refreshSearchAction, new SearchResultEditorActionProxy( cursor,
             new RefreshAction() ) );
 
-        this.searchResultEditorActionMap.put( newValueAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( newValueAction, new SearchResultEditorActionProxy( cursor,
             new NewValueAction() ) );
-        this.searchResultEditorActionMap.put( newSearchAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( newSearchAction, new SearchResultEditorActionProxy( cursor,
             new NewSearchAction() ) );
-        this.searchResultEditorActionMap.put( newBatchOperationAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( newBatchOperationAction, new SearchResultEditorActionProxy( cursor,
             new NewBatchOperationAction() ) );
 
-        this.searchResultEditorActionMap.put( locateDnInDitAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( locateDnInDitAction, new SearchResultEditorActionProxy( cursor,
             new LocateDnInDitAction() ) );
-        this.searchResultEditorActionMap.put( openSearchResultAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( openSearchResultAction, new SearchResultEditorActionProxy( cursor,
             new OpenSearchResultAction() ) );
 
-        this.searchResultEditorActionMap.put( showOcdAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( showOcdAction, new SearchResultEditorActionProxy( cursor,
             new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_OBJECTCLASS ) ) );
-        this.searchResultEditorActionMap.put( showAtdAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( showAtdAction, new SearchResultEditorActionProxy( cursor,
             new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_ATTRIBUTETYPE ) ) );
-        this.searchResultEditorActionMap.put( showEqualityMrdAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( showEqualityMrdAction, new SearchResultEditorActionProxy( cursor,
             new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_EQUALITYMATCHINGRULE ) ) );
-        this.searchResultEditorActionMap.put( showSubstringMrdAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( showSubstringMrdAction, new SearchResultEditorActionProxy( cursor,
             new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_SUBSTRINGMATCHINGRULE ) ) );
-        this.searchResultEditorActionMap.put( showOrderingMrdAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( showOrderingMrdAction, new SearchResultEditorActionProxy( cursor,
             new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_ORDERINGMATCHINGRULE ) ) );
-        this.searchResultEditorActionMap.put( showLsdAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( showLsdAction, new SearchResultEditorActionProxy( cursor,
             new OpenSchemaBrowserAction( OpenSchemaBrowserAction.MODE_SYNTAX ) ) );
 
-        this.searchResultEditorActionMap.put( pasteAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( pasteAction, new SearchResultEditorActionProxy( cursor,
             new SearchResultEditorPasteAction() ) );
-        this.searchResultEditorActionMap.put( copyAction, new SearchResultEditorActionProxy( cursor, new CopyAction(
+        searchResultEditorActionMap.put( copyAction, new SearchResultEditorActionProxy( cursor, new CopyAction(
             ( BrowserActionProxy ) this.searchResultEditorActionMap.get( pasteAction ) ) ) );
-        this.searchResultEditorActionMap.put( deleteAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( deleteAction, new SearchResultEditorActionProxy( cursor,
             new SearchResultDeleteAction() ) );
 
-        this.searchResultEditorActionMap.put( copyDnAction, new SearchResultEditorActionProxy( cursor,
-            new CopyDnAction() ) );
-        this.searchResultEditorActionMap.put( copyUrlAction, new SearchResultEditorActionProxy( cursor,
-            new CopyUrlAction() ) );
-        this.searchResultEditorActionMap.put( copyAttriuteDescriptionAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( copyDnAction, new SearchResultEditorActionProxy( cursor, new CopyDnAction() ) );
+        searchResultEditorActionMap
+            .put( copyUrlAction, new SearchResultEditorActionProxy( cursor, new CopyUrlAction() ) );
+        searchResultEditorActionMap.put( copyAttriuteDescriptionAction, new SearchResultEditorActionProxy( cursor,
             new CopyAttributeDescriptionAction() ) );
-        this.searchResultEditorActionMap.put( copyValueUtf8Action, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( copyValueUtf8Action, new SearchResultEditorActionProxy( cursor,
             new CopyValueAction( CopyValueAction.MODE_UTF8 ) ) );
-        this.searchResultEditorActionMap.put( copyValueBase64Action, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( copyValueBase64Action, new SearchResultEditorActionProxy( cursor,
             new CopyValueAction( CopyValueAction.MODE_BASE64 ) ) );
-        this.searchResultEditorActionMap.put( copyValueHexAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( copyValueHexAction, new SearchResultEditorActionProxy( cursor,
             new CopyValueAction( CopyValueAction.MODE_HEX ) ) );
-        this.searchResultEditorActionMap.put( copyValueAsLdifAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( copyValueAsLdifAction, new SearchResultEditorActionProxy( cursor,
             new CopyValueAction( CopyValueAction.MODE_LDIF ) ) );
 
-        this.searchResultEditorActionMap.put( copySearchFilterAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( copySearchFilterAction, new SearchResultEditorActionProxy( cursor,
             new CopySearchFilterAction( CopySearchFilterAction.MODE_EQUALS ) ) );
-        this.searchResultEditorActionMap.put( copyNotSearchFilterAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( copyNotSearchFilterAction, new SearchResultEditorActionProxy( cursor,
             new CopySearchFilterAction( CopySearchFilterAction.MODE_NOT ) ) );
-        this.searchResultEditorActionMap.put( copyAndSearchFilterAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( copyAndSearchFilterAction, new SearchResultEditorActionProxy( cursor,
             new CopySearchFilterAction( CopySearchFilterAction.MODE_AND ) ) );
-        this.searchResultEditorActionMap.put( copyOrSearchFilterAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( copyOrSearchFilterAction, new SearchResultEditorActionProxy( cursor,
             new CopySearchFilterAction( CopySearchFilterAction.MODE_OR ) ) );
 
-        this.searchResultEditorActionMap.put( propertyDialogAction, new SearchResultEditorActionProxy( cursor,
+        searchResultEditorActionMap.put( propertyDialogAction, new SearchResultEditorActionProxy( cursor,
             new PropertiesAction() ) );
     }
 
 
+    /**
+     * Disposes this action group.
+     */
     public void dispose()
     {
-
-        if ( this.searchResultEditor != null )
+        if ( searchResultEditor != null )
         {
-            this.showRawValuesAction = null;
-            this.showDNAction.dispose();
-            this.showDNAction = null;
-            this.showLinksAction.dispose();
-            this.showLinksAction = null;
-            this.openSearchResultEditorPreferencePage = null;
-            this.showQuickFilterAction.dispose();
-            this.showQuickFilterAction = null;
+            showRawValuesAction = null;
+            showDNAction.dispose();
+            showDNAction = null;
+            showLinksAction.dispose();
+            showLinksAction = null;
+            openSearchResultEditorPreferencePage = null;
+            showQuickFilterAction.dispose();
+            showQuickFilterAction = null;
 
             openDefaultValueEditorActionProxy.dispose();
             openDefaultValueEditorActionProxy = null;
@@ -280,47 +300,56 @@
             openEntryValueEditorActionProxy = null;
             openValueEditorPreferencesAction = null;
 
-            for ( Iterator it = this.searchResultEditorActionMap.keySet().iterator(); it.hasNext(); )
+            for ( Iterator<String> it = this.searchResultEditorActionMap.keySet().iterator(); it.hasNext(); )
             {
-                String key = ( String ) it.next();
-                SearchResultEditorActionProxy action = ( SearchResultEditorActionProxy ) this.searchResultEditorActionMap
-                    .get( key );
+                String key = it.next();
+                SearchResultEditorActionProxy action = searchResultEditorActionMap.get( key );
                 action.dispose();
                 action = null;
                 it.remove();
             }
-            this.searchResultEditorActionMap.clear();
-            this.searchResultEditorActionMap = null;
+            searchResultEditorActionMap.clear();
+            searchResultEditorActionMap = null;
 
-            this.actionBars = null;
-            this.searchResultEditor = null;
+            actionBars = null;
+            searchResultEditor = null;
         }
     }
 
 
+    /**
+     * Fills the tool bar.
+     * 
+     * @param toolBarManager the tool bar manager
+     */
     public void fillToolBar( IToolBarManager toolBarManager )
     {
         toolBarManager.add( new Separator() );
-        toolBarManager.add( ( IAction ) this.searchResultEditorActionMap.get( newValueAction ) );
+        toolBarManager.add( searchResultEditorActionMap.get( newValueAction ) );
         toolBarManager.add( new Separator() );
-        toolBarManager.add( ( IAction ) this.searchResultEditorActionMap.get( deleteAction ) );
+        toolBarManager.add( searchResultEditorActionMap.get( deleteAction ) );
         toolBarManager.add( new Separator() );
-        toolBarManager.add( ( IAction ) this.searchResultEditorActionMap.get( refreshSearchAction ) );
+        toolBarManager.add( searchResultEditorActionMap.get( refreshSearchAction ) );
         toolBarManager.add( new Separator() );
-        toolBarManager.add( ( IAction ) this.searchResultEditorActionMap.get( copyTableAction ) );
+        toolBarManager.add( searchResultEditorActionMap.get( copyTableAction ) );
         toolBarManager.add( new Separator() );
-        toolBarManager.add( this.showQuickFilterAction );
+        toolBarManager.add( showQuickFilterAction );
         toolBarManager.update( true );
     }
 
 
+    /**
+     * Fills the menu.
+     * 
+     * @param menuManager the menu manager
+     */
     public void fillMenu( IMenuManager menuManager )
     {
-        menuManager.add( this.showDNAction );
-        menuManager.add( this.showLinksAction );
-        menuManager.add( this.showRawValuesAction );
+        menuManager.add( showDNAction );
+        menuManager.add( showLinksAction );
+        menuManager.add( showRawValuesAction );
         menuManager.add( new Separator() );
-        menuManager.add( this.openSearchResultEditorPreferencePage );
+        menuManager.add( openSearchResultEditorPreferencePage );
         menuManager.addMenuListener( new IMenuListener()
         {
             public void menuAboutToShow( IMenuManager manager )
@@ -333,13 +362,22 @@
     }
 
 
+    /**
+     * Enable global action handlers.
+     * 
+     * @param actionBars the action bars
+     */
     public void enableGlobalActionHandlers( IActionBars actionBars )
     {
         this.actionBars = actionBars;
-//        this.activateGlobalActionHandlers();
     }
 
 
+    /**
+     * Fills the context menu.
+     * 
+     * @param menuManager the menu manager
+     */
     public void fillContextMenu( IMenuManager menuManager )
     {
         menuManager.setRemoveAllWhenShown( true );
@@ -347,24 +385,27 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void menuAboutToShow( IMenuManager menuManager )
     {
         // new
-        menuManager.add( ( IAction ) this.searchResultEditorActionMap.get( newValueAction ) );
-        menuManager.add( ( IAction ) this.searchResultEditorActionMap.get( newSearchAction ) );
-        menuManager.add( ( IAction ) this.searchResultEditorActionMap.get( newBatchOperationAction ) );
+        menuManager.add( searchResultEditorActionMap.get( newValueAction ) );
+        menuManager.add( searchResultEditorActionMap.get( newSearchAction ) );
+        menuManager.add( searchResultEditorActionMap.get( newBatchOperationAction ) );
         menuManager.add( new Separator() );
 
         // navigation
-        menuManager.add( ( IAction ) this.searchResultEditorActionMap.get( locateDnInDitAction ) );
-        menuManager.add( ( IAction ) this.searchResultEditorActionMap.get( openSearchResultAction ) );
+        menuManager.add( searchResultEditorActionMap.get( locateDnInDitAction ) );
+        menuManager.add( searchResultEditorActionMap.get( openSearchResultAction ) );
         MenuManager schemaMenuManager = new MenuManager( "Open Schema Browser" );
-        schemaMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( showOcdAction ) );
-        schemaMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( showAtdAction ) );
-        schemaMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( showEqualityMrdAction ) );
-        schemaMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( showSubstringMrdAction ) );
-        schemaMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( showOrderingMrdAction ) );
-        schemaMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( showLsdAction ) );
+        schemaMenuManager.add( searchResultEditorActionMap.get( showOcdAction ) );
+        schemaMenuManager.add( searchResultEditorActionMap.get( showAtdAction ) );
+        schemaMenuManager.add( searchResultEditorActionMap.get( showEqualityMrdAction ) );
+        schemaMenuManager.add( searchResultEditorActionMap.get( showSubstringMrdAction ) );
+        schemaMenuManager.add( searchResultEditorActionMap.get( showOrderingMrdAction ) );
+        schemaMenuManager.add( searchResultEditorActionMap.get( showLsdAction ) );
         menuManager.add( schemaMenuManager );
         MenuManager showInSubMenu = new MenuManager( "Show In" );
         showInSubMenu.add( ContributionItemFactory.VIEWS_SHOW_IN.create( PlatformUI.getWorkbench()
@@ -373,25 +414,25 @@
         menuManager.add( new Separator() );
 
         // copy, paste, delete
-        menuManager.add( ( IAction ) this.searchResultEditorActionMap.get( copyAction ) );
-        menuManager.add( ( IAction ) this.searchResultEditorActionMap.get( pasteAction ) );
-        menuManager.add( ( IAction ) this.searchResultEditorActionMap.get( deleteAction ) );
+        menuManager.add( searchResultEditorActionMap.get( copyAction ) );
+        menuManager.add( searchResultEditorActionMap.get( pasteAction ) );
+        menuManager.add( searchResultEditorActionMap.get( deleteAction ) );
         MenuManager advancedMenuManager = new MenuManager( "Advanced" );
-        advancedMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( copyDnAction ) );
-        advancedMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( copyUrlAction ) );
+        advancedMenuManager.add( searchResultEditorActionMap.get( copyDnAction ) );
+        advancedMenuManager.add( searchResultEditorActionMap.get( copyUrlAction ) );
         advancedMenuManager.add( new Separator() );
-        advancedMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( copyAttriuteDescriptionAction ) );
+        advancedMenuManager.add( searchResultEditorActionMap.get( copyAttriuteDescriptionAction ) );
         advancedMenuManager.add( new Separator() );
-        advancedMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( copyValueUtf8Action ) );
-        advancedMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( copyValueBase64Action ) );
-        advancedMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( copyValueHexAction ) );
+        advancedMenuManager.add( searchResultEditorActionMap.get( copyValueUtf8Action ) );
+        advancedMenuManager.add( searchResultEditorActionMap.get( copyValueBase64Action ) );
+        advancedMenuManager.add( searchResultEditorActionMap.get( copyValueHexAction ) );
         advancedMenuManager.add( new Separator() );
-        advancedMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( copyValueAsLdifAction ) );
+        advancedMenuManager.add( searchResultEditorActionMap.get( copyValueAsLdifAction ) );
         advancedMenuManager.add( new Separator() );
-        advancedMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( copySearchFilterAction ) );
-        advancedMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( copyNotSearchFilterAction ) );
-        advancedMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( copyAndSearchFilterAction ) );
-        advancedMenuManager.add( ( IAction ) this.searchResultEditorActionMap.get( copyOrSearchFilterAction ) );
+        advancedMenuManager.add( searchResultEditorActionMap.get( copySearchFilterAction ) );
+        advancedMenuManager.add( searchResultEditorActionMap.get( copyNotSearchFilterAction ) );
+        advancedMenuManager.add( searchResultEditorActionMap.get( copyAndSearchFilterAction ) );
+        advancedMenuManager.add( searchResultEditorActionMap.get( copyOrSearchFilterAction ) );
         menuManager.add( advancedMenuManager );
         menuManager.add( new Separator() );
 
@@ -413,55 +454,61 @@
             }
         }
         editorMenuManager.add( new Separator() );
-        editorMenuManager.add( this.openValueEditorPreferencesAction );
+        editorMenuManager.add( openValueEditorPreferencesAction );
         menuManager.add( editorMenuManager );
         menuManager.add( openEntryValueEditorActionProxy );
         menuManager.add( new Separator() );
 
         // refresh
-        menuManager.add( ( IAction ) this.searchResultEditorActionMap.get( refreshSearchAction ) );
+        menuManager.add( searchResultEditorActionMap.get( refreshSearchAction ) );
         menuManager.add( new Separator() );
 
         // additions
         menuManager.add( new Separator( IWorkbenchActionConstants.MB_ADDITIONS ) );
 
         // / properties
-        menuManager.add( ( IAction ) this.searchResultEditorActionMap.get( propertyDialogAction ) );
+        menuManager.add( searchResultEditorActionMap.get( propertyDialogAction ) );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void activateGlobalActionHandlers()
     {
-        if ( this.actionBars != null )
+        if ( actionBars != null )
         {
-            actionBars.setGlobalActionHandler( ActionFactory.COPY.getId(), ( IAction ) this.searchResultEditorActionMap
-                .get( copyAction ) );
-            actionBars.setGlobalActionHandler( ActionFactory.PASTE.getId(),
-                ( IAction ) this.searchResultEditorActionMap.get( pasteAction ) );
-            actionBars.setGlobalActionHandler( ActionFactory.DELETE.getId(),
-                ( IAction ) this.searchResultEditorActionMap.get( deleteAction ) );
-            actionBars.setGlobalActionHandler( ActionFactory.REFRESH.getId(),
-                ( IAction ) this.searchResultEditorActionMap.get( refreshSearchAction ) );
-            actionBars.setGlobalActionHandler( ActionFactory.PROPERTIES.getId(),
-                ( IAction ) this.searchResultEditorActionMap.get( propertyDialogAction ) );
-            actionBars.setGlobalActionHandler( ActionFactory.FIND.getId(), this.showQuickFilterAction );
+            actionBars
+                .setGlobalActionHandler( ActionFactory.COPY.getId(), searchResultEditorActionMap.get( copyAction ) );
+            actionBars.setGlobalActionHandler( ActionFactory.PASTE.getId(), searchResultEditorActionMap
+                .get( pasteAction ) );
+            actionBars.setGlobalActionHandler( ActionFactory.DELETE.getId(), searchResultEditorActionMap
+                .get( deleteAction ) );
+            actionBars.setGlobalActionHandler( ActionFactory.REFRESH.getId(), searchResultEditorActionMap
+                .get( refreshSearchAction ) );
+            actionBars.setGlobalActionHandler( ActionFactory.PROPERTIES.getId(), searchResultEditorActionMap
+                .get( propertyDialogAction ) );
+            actionBars.setGlobalActionHandler( ActionFactory.FIND.getId(), showQuickFilterAction );
             actionBars.updateActionBars();
         }
 
-        IAction nva = ( IAction ) this.searchResultEditorActionMap.get( newValueAction );
+        IAction nva = searchResultEditorActionMap.get( newValueAction );
         ActionUtils.activateActionHandler( nva );
-        IAction lid = ( IAction ) this.searchResultEditorActionMap.get( locateDnInDitAction );
+        IAction lid = searchResultEditorActionMap.get( locateDnInDitAction );
         ActionUtils.activateActionHandler( lid );
-        IAction osr = ( IAction ) this.searchResultEditorActionMap.get( openSearchResultAction );
+        IAction osr = searchResultEditorActionMap.get( openSearchResultAction );
         ActionUtils.activateActionHandler( osr );
         ActionUtils.activateActionHandler( openDefaultValueEditorActionProxy );
         ActionUtils.activateActionHandler( openEntryValueEditorActionProxy );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void deactivateGlobalActionHandlers()
     {
-        if ( this.actionBars != null )
+        if ( actionBars != null )
         {
             actionBars.setGlobalActionHandler( ActionFactory.COPY.getId(), null );
             actionBars.setGlobalActionHandler( ActionFactory.PASTE.getId(), null );
@@ -472,33 +519,47 @@
             actionBars.updateActionBars();
         }
 
-        IAction nva = ( IAction ) this.searchResultEditorActionMap.get( newValueAction );
+        IAction nva = searchResultEditorActionMap.get( newValueAction );
         ActionUtils.deactivateActionHandler( nva );
-        IAction lid = ( IAction ) this.searchResultEditorActionMap.get( locateDnInDitAction );
+        IAction lid = searchResultEditorActionMap.get( locateDnInDitAction );
         ActionUtils.deactivateActionHandler( lid );
-        IAction osr = ( IAction ) this.searchResultEditorActionMap.get( openSearchResultAction );
+        IAction osr = searchResultEditorActionMap.get( openSearchResultAction );
         ActionUtils.deactivateActionHandler( osr );
         ActionUtils.deactivateActionHandler( openDefaultValueEditorActionProxy );
         ActionUtils.deactivateActionHandler( openEntryValueEditorActionProxy );
     }
 
 
+    /**
+     * Gets the open best editor action.
+     * 
+     * @return the open best editor action
+     */
     public OpenBestEditorAction getOpenBestEditorAction()
     {
         return ( OpenBestEditorAction ) openBestValueEditorActionProxy.getAction();
     }
 
 
+    /**
+     * Sets the input.
+     * 
+     * @param search the new input
+     */
     public void setInput( ISearch search )
     {
-        for ( Iterator it = this.searchResultEditorActionMap.values().iterator(); it.hasNext(); )
+        for ( SearchResultEditorActionProxy action : searchResultEditorActionMap.values() )
         {
-            SearchResultEditorActionProxy action = ( SearchResultEditorActionProxy ) it.next();
             action.inputChanged( search );
         }
     }
 
 
+    /**
+     * Checks if is editor active.
+     * 
+     * @return true, if is editor active
+     */
     public boolean isEditorActive()
     {
         if ( ( ( AbstractOpenEditorAction ) openDefaultValueEditorActionProxy.getAction() ).isActive() )

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorCellModifier.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorCellModifier.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorCellModifier.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorCellModifier.java Thu Aug 28 07:56:37 2008
@@ -21,8 +21,6 @@
 package org.apache.directory.studio.ldapbrowser.ui.editors.searchresult;
 
 
-import java.util.Iterator;
-
 import org.apache.directory.studio.ldapbrowser.core.model.AttributeHierarchy;
 import org.apache.directory.studio.ldapbrowser.core.model.IAttribute;
 import org.apache.directory.studio.ldapbrowser.core.model.ISearchResult;
@@ -31,35 +29,48 @@
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIConstants;
 import org.apache.directory.studio.valueeditors.ValueEditorManager;
 import org.eclipse.jface.viewers.ICellModifier;
-import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.swt.widgets.Item;
 
 
+/**
+ * The SearchResultEditorCellModifier implements the {@link ICellModifier} interface
+ * for the search result editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class SearchResultEditorCellModifier implements ICellModifier
 {
 
-    private TableViewer viewer;
-
+    /** The value editor manager. */
     private ValueEditorManager valueEditorManager;
 
 
-    public SearchResultEditorCellModifier( TableViewer viewer, ValueEditorManager valueEditorManager )
+    /**
+     * Creates a new instance of SearchResultEditorCellModifier.
+     * 
+     * @param valueEditorManager the value editor manager
+     */
+    public SearchResultEditorCellModifier( ValueEditorManager valueEditorManager )
     {
-        this.viewer = viewer;
         this.valueEditorManager = valueEditorManager;
     }
 
 
+    /**
+     * Disposes this cell modifier.
+     */
     public void dispose()
     {
-        this.viewer = null;
-        this.valueEditorManager = null;
+        valueEditorManager = null;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean canModify( Object element, String property )
     {
-
         if ( element != null && element instanceof ISearchResult && property != null )
         {
             ISearchResult result = ( ISearchResult ) element;
@@ -78,11 +89,10 @@
                     { new Attribute( result.getEntry(), property ) } );
             }
 
-            // check schema modifyable
+            // check schema modifiable
             boolean isOneModifyable = false;
-            for ( Iterator it = ah.iterator(); it.hasNext(); )
+            for ( IAttribute attribute : ah )
             {
-                IAttribute attribute = ( IAttribute ) it.next();
                 if ( SchemaUtils.isModifyable( attribute.getAttributeTypeDescription() ) )
                 {
                     isOneModifyable = true;
@@ -96,9 +106,8 @@
 
             // check if property is valid for the entry
             boolean isOneValid = false;
-            for ( Iterator it = ah.iterator(); it.hasNext(); )
+            for ( IAttribute attribute : ah )
             {
-                IAttribute attribute = ( IAttribute ) it.next();
                 if ( attribute.isObjectClassAttribute() || attribute.isMustAttribute() || attribute.isMayAttribute() )
                 {
                     isOneValid = true;
@@ -111,7 +120,7 @@
             }
 
             // call value editor
-            return this.valueEditorManager.getCurrentValueEditor( ah ).getRawValue( ah ) != null;
+            return valueEditorManager.getCurrentValueEditor( ah ).getRawValue( ah ) != null;
         }
         else
         {
@@ -120,15 +129,17 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Object getValue( Object element, String property )
     {
-
         if ( element != null && element instanceof ISearchResult && property != null )
         {
             ISearchResult result = ( ISearchResult ) element;
             AttributeHierarchy ah = result.getAttributeWithSubtypes( property );
 
-            if ( !this.canModify( element, property ) )
+            if ( !canModify( element, property ) )
             {
                 return null;
             }
@@ -139,7 +150,7 @@
                     { new Attribute( result.getEntry(), property ) } );
             }
 
-            return this.valueEditorManager.getCurrentValueEditor( ah ).getRawValue( ah );
+            return valueEditorManager.getCurrentValueEditor( ah ).getRawValue( ah );
         }
         else
         {
@@ -148,6 +159,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void modify( Object element, String property, Object newRawValue )
     {
         if ( element != null && element instanceof Item )
@@ -163,15 +177,15 @@
             // switch operation:
             if ( ah == null && newRawValue != null )
             {
-                this.valueEditorManager.createValue( result.getEntry(), property, newRawValue );
+                valueEditorManager.createValue( result.getEntry(), property, newRawValue );
             }
             else if ( ah != null && newRawValue == null )
             {
-                this.valueEditorManager.deleteAttribute( ah );
+                valueEditorManager.deleteAttribute( ah );
             }
             else if ( ah != null && ah.size() == 1 && ah.getAttribute().getValueSize() == 1 && newRawValue != null )
             {
-                this.valueEditorManager.modifyValue( ah.getAttribute().getValues()[0], newRawValue );
+                valueEditorManager.modifyValue( ah.getAttribute().getValues()[0], newRawValue );
             }
         }
     }

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorConfiguration.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorConfiguration.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorConfiguration.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorConfiguration.java Thu Aug 28 07:56:37 2008
@@ -29,11 +29,21 @@
 import org.eclipse.ui.IWorkbenchPart;
 
 
+/**
+ * The SearchResultEditorConfiguration contains the content provider, 
+ * label provider, cursor, sorter, filter, the context menu manager and the
+ * preferences for the search result editor. 
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class SearchResultEditorConfiguration
 {
 
+    /** The disposed flag. */
     private boolean disposed = false;
 
+    /** The cursor. */
     protected SearchResultEditorCursor cursor;
 
     protected SearchResultEditorSorter sorter;
@@ -51,117 +61,189 @@
     protected MenuManager contextMenuManager;
 
 
+    /**
+     * Creates a new instance of SearchResultEditorConfiguration.
+     * 
+     * @param part the workbench part
+     */
     public SearchResultEditorConfiguration( IWorkbenchPart part )
     {
         super();
     }
 
 
+    /**
+     * Disposes this configuration.
+     */
     public void dispose()
     {
-        if ( !this.disposed )
+        if ( !disposed )
         {
-
-            if ( this.contentProvider != null )
-                this.contentProvider.dispose();
-            this.contentProvider = null;
-
-            if ( this.labelProvider != null )
-                this.labelProvider.dispose();
-            this.labelProvider = null;
-
-            if ( this.cellModifier != null )
-                this.cellModifier.dispose();
-            this.cellModifier = null;
-
-            if ( this.valueEditorManager != null )
-                this.valueEditorManager.dispose();
-            this.valueEditorManager = null;
-
-            if ( this.contextMenuManager != null )
-                this.contextMenuManager.dispose();
-            this.contextMenuManager = null;
-
-            if ( this.cursor != null )
-                this.cursor.dispose();
-            this.cursor = null;
-
-            this.disposed = true;
+            if ( contentProvider != null )
+            {
+                contentProvider.dispose();
+                contentProvider = null;
+            }
+            if ( labelProvider != null )
+            {
+                labelProvider.dispose();
+                labelProvider = null;
+            }
+            if ( cellModifier != null )
+            {
+                cellModifier.dispose();
+                cellModifier = null;
+            }
+            if ( valueEditorManager != null )
+            {
+                valueEditorManager.dispose();
+                valueEditorManager = null;
+            }
+            if ( contextMenuManager != null )
+            {
+                contextMenuManager.dispose();
+                contextMenuManager = null;
+            }
+            if ( cursor != null )
+            {
+                cursor.dispose();
+                cursor = null;
+            }
+            disposed = true;
         }
     }
 
 
+    /**
+     * Gets the sorter.
+     * 
+     * @return the sorter
+     */
     public SearchResultEditorSorter getSorter()
     {
-        if ( this.sorter == null )
-            this.sorter = new SearchResultEditorSorter();
-
+        if ( sorter == null )
+        {
+            sorter = new SearchResultEditorSorter();
+        }
         return sorter;
     }
 
 
+    /**
+     * Gets the filter.
+     * 
+     * @return the filter
+     */
     public SearchResultEditorFilter getFilter()
     {
-        if ( this.filter == null )
-            this.filter = new SearchResultEditorFilter();
-
+        if ( filter == null )
+        {
+            filter = new SearchResultEditorFilter();
+        }
         return filter;
     }
 
 
+    /**
+     * Gets the context menu manager.
+     * 
+     * @param viewer the viewer
+     * 
+     * @return the context menu manager
+     */
     public IMenuManager getContextMenuManager( TableViewer viewer )
     {
-        if ( this.contextMenuManager == null )
+        if ( contextMenuManager == null )
         {
-            this.contextMenuManager = new MenuManager();
-            Menu menu = this.contextMenuManager.createContextMenu( viewer.getControl() );
+            contextMenuManager = new MenuManager();
+            Menu menu = contextMenuManager.createContextMenu( viewer.getControl() );
             getCursor( viewer ).setMenu( menu );
         }
-        return this.contextMenuManager;
+        return contextMenuManager;
     }
 
 
+    /**
+     * Gets the content provider.
+     * 
+     * @param mainWidget the main widget
+     * 
+     * @return the content provider
+     */
     public SearchResultEditorContentProvider getContentProvider( SearchResultEditorWidget mainWidget )
     {
-        if ( this.contentProvider == null )
-            this.contentProvider = new SearchResultEditorContentProvider( mainWidget, this );
-
+        if ( contentProvider == null )
+        {
+            contentProvider = new SearchResultEditorContentProvider( mainWidget, this );
+        }
         return contentProvider;
     }
 
 
+    /**
+     * Gets the label provider.
+     * 
+     * @param viewer the viewer
+     * 
+     * @return the label provider
+     */
     public SearchResultEditorLabelProvider getLabelProvider( TableViewer viewer )
     {
-        if ( this.labelProvider == null )
-            this.labelProvider = new SearchResultEditorLabelProvider( viewer, this.getValueEditorManager( viewer ) );
-
+        if ( labelProvider == null )
+        {
+            labelProvider = new SearchResultEditorLabelProvider( getValueEditorManager( viewer ) );
+        }
         return labelProvider;
     }
 
 
+    /**
+     * Gets the cell modifier.
+     * 
+     * @param viewer the viewer
+     * 
+     * @return the cell modifier
+     */
     public SearchResultEditorCellModifier getCellModifier( TableViewer viewer )
     {
-        if ( this.cellModifier == null )
-            this.cellModifier = new SearchResultEditorCellModifier( viewer, this.getValueEditorManager( viewer ) );
-
+        if ( cellModifier == null )
+        {
+            cellModifier = new SearchResultEditorCellModifier( getValueEditorManager( viewer ) );
+        }
         return cellModifier;
     }
 
 
+    /**
+     * Gets the cursor.
+     * 
+     * @param viewer the viewer
+     * 
+     * @return the cursor
+     */
     public SearchResultEditorCursor getCursor( TableViewer viewer )
     {
-        if ( this.cursor == null )
-            this.cursor = new SearchResultEditorCursor( viewer );
-
+        if ( cursor == null )
+        {
+            cursor = new SearchResultEditorCursor( viewer );
+        }
         return cursor;
     }
 
 
+    /**
+     * Gets the value editor manager.
+     * 
+     * @param viewer the viewer
+     * 
+     * @return the value editor manager
+     */
     public ValueEditorManager getValueEditorManager( TableViewer viewer )
     {
-        if ( this.valueEditorManager == null )
-            this.valueEditorManager = new ValueEditorManager( viewer.getTable() );
-
+        if ( valueEditorManager == null )
+        {
+            valueEditorManager = new ValueEditorManager( viewer.getTable() );
+        }
         return valueEditorManager;
     }
 

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorContentProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorContentProvider.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorContentProvider.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorContentProvider.java Thu Aug 28 07:56:37 2008
@@ -30,20 +30,38 @@
 import org.eclipse.jface.viewers.Viewer;
 
 
+/**
+ * The SearchResultEditorContentProvider implements the content provider for
+ * the search resutl editor. It accepts an {@link ISearch} as input.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class SearchResultEditorContentProvider implements ILazyContentProvider
 {
 
+    /** The main widget. */
     private SearchResultEditorWidget mainWidget;
 
+    /** The configuration. */
     private SearchResultEditorConfiguration configuration;
 
+    /** The input. */
     private Object input;
 
+    /** The elements. */
     private Object[] elements;
 
+    /** The filtered and sorted elements. */
     private Object[] filteredAndSortedElements;
 
 
+    /**
+     * Creates a new instance of SearchResultEditorContentProvider.
+     * 
+     * @param mainWidget the main widget
+     * @param configuration the configuration
+     */
     public SearchResultEditorContentProvider( SearchResultEditorWidget mainWidget,
         SearchResultEditorConfiguration configuration )
     {
@@ -55,50 +73,55 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void dispose()
     {
-        this.mainWidget = null;
-        this.configuration = null;
-        this.elements = null;
-        this.filteredAndSortedElements = null;
+        mainWidget = null;
+        configuration = null;
+        elements = null;
+        filteredAndSortedElements = null;
     }
 
 
+    /**
+     * Refreshes the viewer.
+     */
     public void refresh()
     {
-        this.filterAndSort();
-        this.mainWidget.getViewer().refresh();
+        filterAndSort();
+        mainWidget.getViewer().refresh();
     }
 
 
+    /**
+     * Filters and sorts the viewer.
+     */
     private void filterAndSort()
     {
-
-        this.filteredAndSortedElements = elements;
+        filteredAndSortedElements = elements;
 
         // filter and sort, use Job if too much elements
-        if ( this.configuration.getFilter().isFiltered() || this.configuration.getSorter().isSorted() )
+        if ( configuration.getFilter().isFiltered() || configuration.getSorter().isSorted() )
         {
-            if ( elements.length > 1000 && this.mainWidget.getViewer() != null
-                && !this.mainWidget.getViewer().getTable().isDisposed() )
+            if ( elements.length > 1000 && mainWidget.getViewer() != null
+                && !mainWidget.getViewer().getTable().isDisposed() )
             {
-                FilterAndSortRunnable runnable = new FilterAndSortRunnable( this.configuration, this.mainWidget, this.elements );
-                //RunnableContextJobAdapter.execute( job, new TimeTriggeredProgressMonitorDialog( Display.getCurrent()
-                //    .getActiveShell(), 5000 ) );
+                FilterAndSortRunnable runnable = new FilterAndSortRunnable( configuration, mainWidget, elements );
                 RunnableContextRunner.execute( runnable, null, true );
-                this.filteredAndSortedElements = runnable.getFilteredAndSortedElements();
+                filteredAndSortedElements = runnable.getFilteredAndSortedElements();
             }
-            else if ( elements.length > 0 && this.mainWidget.getViewer() != null
-                && !this.mainWidget.getViewer().getTable().isDisposed() )
+            else if ( elements.length > 0 && mainWidget.getViewer() != null
+                && !mainWidget.getViewer().getTable().isDisposed() )
             {
-                this.filteredAndSortedElements = this.configuration.getFilter().filter( this.mainWidget.getViewer(),
-                    "", elements );
-                this.configuration.getSorter().sort( this.mainWidget.getViewer(), this.filteredAndSortedElements );
+                filteredAndSortedElements = configuration.getFilter().filter( mainWidget.getViewer(), "", elements );
+                configuration.getSorter().sort( mainWidget.getViewer(), filteredAndSortedElements );
             }
         }
 
         // update virtual table
-        this.mainWidget.getViewer().setItemCount( this.filteredAndSortedElements.length );
+        mainWidget.getViewer().setItemCount( filteredAndSortedElements.length );
 
         // update state
         String url = "";
@@ -133,39 +156,48 @@
             boolean showDn = BrowserUIPlugin.getDefault().getPreferenceStore().getBoolean(
                 BrowserUIConstants.PREFERENCE_SEARCHRESULTEDITOR_SHOW_DN )
                 || search.getReturningAttributes().length == 0;
-            this.configuration.getFilter().inputChanged( search, showDn );
-            this.configuration.getSorter().inputChanged( search, showDn );
+            configuration.getFilter().inputChanged( search, showDn );
+            configuration.getSorter().inputChanged( search, showDn );
         }
         else
         {
-            url = "No search selected";;
+            url = "No search selected";
             enabled = false;
         }
 
-        if ( this.mainWidget.getInfoText() != null && !this.mainWidget.getInfoText().isDisposed() )
+        if ( mainWidget.getInfoText() != null && !mainWidget.getInfoText().isDisposed() )
         {
-            this.mainWidget.getInfoText().setText( url );
+            mainWidget.getInfoText().setText( url );
         }
-        if ( this.mainWidget.getQuickFilterWidget() != null )
+        if ( mainWidget.getQuickFilterWidget() != null )
         {
-            this.mainWidget.getQuickFilterWidget().setEnabled( enabled );
+            mainWidget.getQuickFilterWidget().setEnabled( enabled );
         }
-        if ( this.mainWidget.getViewer() != null && !this.mainWidget.getViewer().getTable().isDisposed() )
+        if ( mainWidget.getViewer() != null && !mainWidget.getViewer().getTable().isDisposed() )
         {
-            this.mainWidget.getViewer().getTable().setEnabled( enabled );
+            mainWidget.getViewer().getTable().setEnabled( enabled );
         }
 
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void inputChanged( Viewer viewer, Object oldInput, Object newInput )
     {
         this.input = newInput;
         this.elements = getElements( newInput );
-        // this.filterAndSort();
     }
 
 
+    /**
+     * Gets the elements.
+     * 
+     * @param inputElement the input element
+     * 
+     * @return the elements
+     */
     public Object[] getElements( Object inputElement )
     {
         if ( inputElement != null && inputElement instanceof ISearch )
@@ -177,24 +209,29 @@
         {
             return new Object[]
                 {};
-            // return new Object[]{inputElement};
         }
     }
 
 
+    /**
+     * Gets the viewer.
+     * 
+     * @return the viewer
+     */
     public TableViewer getViewer()
     {
-        return this.mainWidget.getViewer();
+        return mainWidget.getViewer();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void updateElement( int index )
     {
-        // if(sortedAndSortedElements instanceof ISearchResult[]) {
         if ( filteredAndSortedElements != null && filteredAndSortedElements.length > 0
             && index < filteredAndSortedElements.length )
         {
-            // System.out.println(index);
             mainWidget.getViewer().replace( filteredAndSortedElements[index], index );
         }
     }

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorCursor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorCursor.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorCursor.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorCursor.java Thu Aug 28 07:56:37 2008
@@ -48,16 +48,32 @@
 import org.eclipse.swt.widgets.Display;
 
 
+/**
+ * The cursor implementation for the search result editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class SearchResultEditorCursor extends TableCursor implements ISelectionProvider, EntryUpdateListener
 {
 
+    /** The viewer. */
     private TableViewer viewer;
 
+    /** The selection changes listener list. */
+    private List<ISelectionChangedListener> selectionChangesListenerList;
 
+
+    /**
+     * Creates a new instance of SearchResultEditorCursor.
+     * 
+     * @param viewer the viewer
+     */
     public SearchResultEditorCursor( TableViewer viewer )
     {
         super( viewer.getTable(), SWT.NONE );
         this.viewer = viewer;
+        this.selectionChangesListenerList = new ArrayList<ISelectionChangedListener>();
 
         setBackground( Display.getDefault().getSystemColor( SWT.COLOR_LIST_SELECTION ) );
         setForeground( Display.getDefault().getSystemColor( SWT.COLOR_LIST_SELECTION_TEXT ) );
@@ -69,9 +85,12 @@
     }
 
 
+    /**
+     * Initializes the selection checker.
+     */
     private void initSelectionChecker()
     {
-        this.addSelectionListener( new SelectionListener()
+        addSelectionListener( new SelectionListener()
         {
             public void widgetSelected( SelectionEvent e )
             {
@@ -97,19 +116,16 @@
     }
 
 
-    public boolean setFocus()
-    {
-        return super.setFocus();
-    }
-
-
+    /**
+     * Initializes the selection provider.
+     */
     private void initSelectionProvider()
     {
-        this.addSelectionListener( new SelectionAdapter()
+        addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
             {
-                for ( Iterator it = selectionChangesListenerList.iterator(); it.hasNext(); )
+                for ( Iterator<?> it = selectionChangesListenerList.iterator(); it.hasNext(); )
                 {
                     ( ( ISelectionChangedListener ) it.next() ).selectionChanged( new SelectionChangedEvent(
                         SearchResultEditorCursor.this, getSelection() ) );
@@ -119,42 +135,65 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
+    public boolean setFocus()
+    {
+        return super.setFocus();
+    }
+
+
+    /**
+     * {@inheritDoc}
+     */
     public void dispose()
     {
         EventRegistry.removeEntryUpdateListener( this );
-        this.viewer = null;
+        viewer = null;
         super.dispose();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void entryUpdated( EntryModificationEvent event )
     {
-        this.viewer.refresh();
-        this.redraw();
+        viewer.refresh();
+        redraw();
     }
 
 
+    /**
+     * Gets the selected property.
+     * 
+     * @return the selected property
+     */
     public String getSelectedProperty()
     {
-        if ( !this.isDisposed() && this.getRow() != null && this.viewer != null
-            && this.viewer.getColumnProperties() != null
-            && this.viewer.getColumnProperties().length >= this.getColumn() + 1 )
+        if ( !isDisposed() && getRow() != null && viewer != null && viewer.getColumnProperties() != null
+            && viewer.getColumnProperties().length >= getColumn() + 1 )
         {
-            String property = ( String ) this.viewer.getColumnProperties()[this.getColumn()];
+            String property = ( String ) viewer.getColumnProperties()[getColumn()];
             return property;
         }
         return null;
     }
 
 
-    public AttributeHierarchy getSelectedAttributeHierarchie()
+    /**
+     * Gets the selected attribute hierarchy.
+     * 
+     * @return the selected attribute hierarchy
+     */
+    public AttributeHierarchy getSelectedAttributeHierarchy()
     {
-        if ( !this.isDisposed() && this.getRow() != null && this.viewer != null
-            && this.viewer.getColumnProperties() != null
-            && this.viewer.getColumnProperties().length >= this.getColumn() + 1 )
+        if ( !isDisposed() && getRow() != null && viewer != null && viewer.getColumnProperties() != null
+            && viewer.getColumnProperties().length >= getColumn() + 1 )
         {
-            Object o = this.getRow().getData();
-            String property = ( String ) this.viewer.getColumnProperties()[this.getColumn()];
+            Object o = getRow().getData();
+            String property = ( String ) viewer.getColumnProperties()[getColumn()];
             if ( o instanceof ISearchResult && !BrowserUIConstants.DN.equals( property ) )
             {
                 ISearchResult sr = ( ISearchResult ) o;
@@ -173,11 +212,16 @@
     }
 
 
+    /**
+     * Gets the selected search result.
+     * 
+     * @return the selected search result
+     */
     public ISearchResult getSelectedSearchResult()
     {
-        if ( !this.isDisposed() && this.getRow() != null )
+        if ( !isDisposed() && getRow() != null )
         {
-            Object o = this.getRow().getData();
+            Object o = getRow().getData();
             if ( o instanceof ISearchResult )
             {
                 return ( ISearchResult ) o;
@@ -186,51 +230,61 @@
         return null;
     }
 
-    private List selectionChangesListenerList = new ArrayList();
-
 
+    /**
+     * {@inheritDoc}
+     */
     public void addSelectionChangedListener( ISelectionChangedListener listener )
     {
-        if ( !this.selectionChangesListenerList.contains( listener ) )
+        if ( !selectionChangesListenerList.contains( listener ) )
         {
-            this.selectionChangesListenerList.add( listener );
+            selectionChangesListenerList.add( listener );
         }
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public ISelection getSelection()
     {
-        ISearchResult searchResult = this.getSelectedSearchResult();
-        AttributeHierarchy ah = this.getSelectedAttributeHierarchie();
-        String property = this.getSelectedProperty();
-        // String attributeName = this.getSelectedAttributeName();
-
-        // System.out.println(attributes.length);
+        ISearchResult searchResult = getSelectedSearchResult();
+        AttributeHierarchy ah = getSelectedAttributeHierarchy();
+        String property = getSelectedProperty();
 
-        List list = new ArrayList();
+        List<Object> list = new ArrayList<Object>();
         if ( searchResult != null )
+        {
             list.add( searchResult );
+        }
         if ( ah != null )
+        {
             list.add( ah );
+        }
         if ( property != null )
         {
             list.add( property );
         }
-        // if(attributeName != null) list.add(attributeName);
 
         return new StructuredSelection( list );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void removeSelectionChangedListener( ISelectionChangedListener listener )
     {
-        if ( this.selectionChangesListenerList.contains( listener ) )
+        if ( selectionChangesListenerList.contains( listener ) )
         {
-            this.selectionChangesListenerList.remove( listener );
+            selectionChangesListenerList.remove( listener );
         }
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setSelection( ISelection selection )
     {
     }

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorFilter.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorFilter.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorFilter.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorFilter.java Thu Aug 28 07:56:37 2008
@@ -28,57 +28,88 @@
 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.eclipse.jface.viewers.Viewer;
 import org.eclipse.jface.viewers.ViewerFilter;
 
 
+/**
+ * The SearchResultEditorFilter implements the filter for the search result editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class SearchResultEditorFilter extends ViewerFilter
 {
 
+    /** The content provider. */
     protected SearchResultEditorContentProvider contentProvider;
 
+    /** The quick filter value. */
     protected String quickFilterValue;
 
+    /** The show DN flag. */
     private boolean showDn;
 
 
+    /**
+     * Creates a new instance of SearchResultEditorFilter.
+     */
     public SearchResultEditorFilter()
     {
         this.quickFilterValue = "";
     }
 
 
+    /**
+     * Connects this filter with the given content provider.
+     * 
+     * @param viewer the viewer
+     */
     public void connect( SearchResultEditorContentProvider contentProvider )
     {
         this.contentProvider = contentProvider;
     }
 
 
+    /**
+     * Called when the input of the viewer changes.
+     * 
+     * @param newSearch the new search
+     * @param showDn the show DN flag
+     */
     public void inputChanged( ISearch newSearch, boolean showDn )
     {
         this.showDn = showDn;
     }
 
 
+    /**
+     * Checks if is filtered.
+     * 
+     * @return true, if is filtered
+     */
     public boolean isFiltered()
     {
-        return this.quickFilterValue != null && !"".equals( quickFilterValue );
+        return quickFilterValue != null && !"".equals( quickFilterValue );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Object[] filter( Viewer viewer, Object parent, Object[] elements )
     {
-
         if ( isFiltered() )
         {
             int size = elements.length;
-            ArrayList out = new ArrayList( size );
+            ArrayList<Object> out = new ArrayList<Object>( size );
             for ( int i = 0; i < size; ++i )
             {
                 Object element = elements[i];
                 if ( select( viewer, parent, element ) )
+                {
                     out.add( element );
+                }
             }
 
             return out.toArray();
@@ -87,13 +118,14 @@
         {
             return elements;
         }
-
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean select( Viewer viewer, Object parentElement, Object element )
     {
-
         if ( element instanceof ISearchResult )
         {
             ISearchResult searchResult = ( ISearchResult ) element;
@@ -120,17 +152,8 @@
                 }
             }
 
-            // IAttribute[] attributes = searchResult.getAttributes();
-            // for (int i = 0; i < attributes.length; i++) {
-            // IValue[] values = attributes[i].getValues();
-            // for (int k = 0; k < values.length; k++) {
-            // if (this.goesThroughQuickFilter(values[k])) {
-            // return true;
-            // }
-            // }
-            // }
-            if ( this.showDn
-                && searchResult.getDn().getUpName().toUpperCase().indexOf( this.quickFilterValue.toUpperCase() ) > -1 )
+            if ( showDn
+                && searchResult.getDn().getUpName().toUpperCase().indexOf( quickFilterValue.toUpperCase() ) > -1 )
             {
                 return true;
             }
@@ -144,14 +167,16 @@
     }
 
 
+    /**
+     * Checks if the value goes through quick filter.
+     * 
+     * @param value the value
+     * 
+     * @return true, if successful
+     */
     private boolean goesThroughQuickFilter( IValue value )
     {
-
-        // fitler value
-        // if(this.quickFilterValue != null &&
-        // !"".equals(this.quickFilterValue)) {
-        if ( value.isString()
-            && value.getStringValue().toUpperCase().indexOf( this.quickFilterValue.toUpperCase() ) == -1 )
+        if ( value.isString() && value.getStringValue().toUpperCase().indexOf( quickFilterValue.toUpperCase() ) == -1 )
         {
             return false;
         }
@@ -159,31 +184,45 @@
         {
             return false;
         }
-        // }
 
         return true;
     }
 
 
+    /**
+     * Disposes this filter.
+     */
     public void dispose()
     {
-        this.contentProvider = null;
+        contentProvider = null;
     }
 
 
+    /**
+     * Gets the quick filter value.
+     * 
+     * @return the quick filter value
+     */
     public String getQuickFilterValue()
     {
         return quickFilterValue;
     }
 
 
+    /**
+     * Sets the quick filter value.
+     * 
+     * @param quickFilterValue the new quick filter value
+     */
     public void setQuickFilterValue( String quickFilterValue )
     {
         if ( !this.quickFilterValue.equals( quickFilterValue ) )
         {
             this.quickFilterValue = quickFilterValue;
-            if ( this.contentProvider != null )
-                this.contentProvider.refresh();
+            if ( contentProvider != null )
+            {
+                contentProvider.refresh();
+            }
         }
     }
 

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorLabelProvider.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorLabelProvider.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorLabelProvider.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorLabelProvider.java Thu Aug 28 07:56:37 2008
@@ -35,30 +35,50 @@
 import org.eclipse.jface.viewers.ITableFontProvider;
 import org.eclipse.jface.viewers.ITableLabelProvider;
 import org.eclipse.jface.viewers.LabelProvider;
-import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.swt.graphics.Color;
 import org.eclipse.swt.graphics.Font;
 import org.eclipse.swt.graphics.FontData;
 import org.eclipse.swt.graphics.Image;
 
 
+/**
+ * The label provider for the search result editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class SearchResultEditorLabelProvider extends LabelProvider implements ITableLabelProvider, ITableFontProvider,
     ITableColorProvider
 {
 
+    /** The value editor manager. */
     private ValueEditorManager valueEditorManager;
 
+    /** The search. */
     private ISearch search;
 
+    /** The show DN flag. */
     private boolean showDn;
 
 
-    public SearchResultEditorLabelProvider( TableViewer viewer, ValueEditorManager valueEditorManager )
+    /**
+     * Creates a new instance of SearchResultEditorLabelProvider.
+     * 
+     * @param viewer the viewer
+     * @param valueEditorManager the value editor manager
+     */
+    public SearchResultEditorLabelProvider( ValueEditorManager valueEditorManager )
     {
         this.valueEditorManager = valueEditorManager;
     }
 
 
+    /**
+     * Called when the input of the viewer has been changed.
+     * 
+     * @param newSearch the new search
+     * @param showDn the show DN flag
+     */
     public void inputChanged( ISearch newSearch, boolean showDn )
     {
         this.search = newSearch;
@@ -66,9 +86,11 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public final String getColumnText( Object obj, int index )
     {
-
         if ( obj != null && obj instanceof ISearchResult )
         {
             String property;
@@ -76,17 +98,17 @@
             {
                 ISearchResult result = ( ISearchResult ) obj;
 
-                if ( this.showDn && index == 0 )
+                if ( showDn && index == 0 )
                 {
                     property = BrowserUIConstants.DN;
                 }
-                else if ( this.showDn && index > 0 )
+                else if ( showDn && index > 0 )
                 {
-                    property = this.search.getReturningAttributes()[index - 1];
+                    property = search.getReturningAttributes()[index - 1];
                 }
                 else
                 {
-                    property = this.search.getReturningAttributes()[index];
+                    property = search.getReturningAttributes()[index];
                 }
 
                 if ( property == BrowserUIConstants.DN )
@@ -118,16 +140,25 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public final Image getColumnImage( Object obj, int index )
     {
         return null;
     }
 
 
+    /**
+     * Gets the display value.
+     * 
+     * @param ah the ah
+     * 
+     * @return the display value
+     */
     private String getDisplayValue( AttributeHierarchy ah )
     {
-
-        IValueEditor vp = this.valueEditorManager.getCurrentValueEditor( ah );
+        IValueEditor vp = valueEditorManager.getCurrentValueEditor( ah );
         if ( vp == null )
         {
             return "";
@@ -142,19 +173,21 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Font getFont( Object element, int index )
     {
-
         if ( element instanceof ISearchResult )
         {
             ISearchResult result = ( ISearchResult ) element;
             String property = null;
 
-            if ( this.showDn && index == 0 )
+            if ( showDn && index == 0 )
             {
                 property = BrowserUIConstants.DN;
             }
-            else if ( this.showDn && index > 0 && index - 1 < result.getSearch().getReturningAttributes().length )
+            else if ( showDn && index > 0 && index - 1 < result.getSearch().getReturningAttributes().length )
             {
                 property = result.getSearch().getReturningAttributes()[index - 1];
             }
@@ -177,26 +210,29 @@
                         IAttribute attribute = ah.getAttributes()[i];
                         if ( attribute.isObjectClassAttribute() )
                         {
-                            FontData[] fontData = PreferenceConverter.getFontDataArray( BrowserCommonActivator.getDefault()
-                                .getPreferenceStore(), BrowserCommonConstants.PREFERENCE_OBJECTCLASS_FONT );
+                            FontData[] fontData = PreferenceConverter.getFontDataArray( BrowserCommonActivator
+                                .getDefault().getPreferenceStore(), BrowserCommonConstants.PREFERENCE_OBJECTCLASS_FONT );
                             return BrowserCommonActivator.getDefault().getFont( fontData );
                         }
                         else if ( attribute.isMustAttribute() )
                         {
-                            FontData[] fontData = PreferenceConverter.getFontDataArray( BrowserCommonActivator.getDefault()
-                                .getPreferenceStore(), BrowserCommonConstants.PREFERENCE_MUSTATTRIBUTE_FONT );
+                            FontData[] fontData = PreferenceConverter.getFontDataArray( BrowserCommonActivator
+                                .getDefault().getPreferenceStore(),
+                                BrowserCommonConstants.PREFERENCE_MUSTATTRIBUTE_FONT );
                             return BrowserCommonActivator.getDefault().getFont( fontData );
                         }
                         else if ( attribute.isOperationalAttribute() )
                         {
-                            FontData[] fontData = PreferenceConverter.getFontDataArray( BrowserCommonActivator.getDefault()
-                                .getPreferenceStore(), BrowserCommonConstants.PREFERENCE_OPERATIONALATTRIBUTE_FONT );
+                            FontData[] fontData = PreferenceConverter.getFontDataArray( BrowserCommonActivator
+                                .getDefault().getPreferenceStore(),
+                                BrowserCommonConstants.PREFERENCE_OPERATIONALATTRIBUTE_FONT );
                             return BrowserCommonActivator.getDefault().getFont( fontData );
                         }
                         else
                         {
-                            FontData[] fontData = PreferenceConverter.getFontDataArray( BrowserCommonActivator.getDefault()
-                                .getPreferenceStore(), BrowserCommonConstants.PREFERENCE_MAYATTRIBUTE_FONT );
+                            FontData[] fontData = PreferenceConverter
+                                .getFontDataArray( BrowserCommonActivator.getDefault().getPreferenceStore(),
+                                    BrowserCommonConstants.PREFERENCE_MAYATTRIBUTE_FONT );
                             return BrowserCommonActivator.getDefault().getFont( fontData );
                         }
                     }
@@ -208,12 +244,18 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Color getForeground( Object element, int index )
     {
         return null;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Color getBackground( Object element, int index )
     {
         return null;

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java Thu Aug 28 07:56:37 2008
@@ -153,7 +153,6 @@
      */
     private ISearch getSearch()
     {
-
         Object editorInput = getInput();
         if ( editorInput != null && editorInput instanceof SearchResultEditorInput )
         {

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorPasteAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorPasteAction.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorPasteAction.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorPasteAction.java Thu Aug 28 07:56:37 2008
@@ -47,7 +47,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.PasteAction#getText()
+     * {@inheritDoc}
      */
     public String getText()
     {
@@ -62,11 +62,11 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.PasteAction#isEnabled()
+     * {@inheritDoc}
      */
     public boolean isEnabled()
     {
-        if ( this.getValuesToPaste() != null )
+        if ( getValuesToPaste() != null )
         {
             return true;
         }
@@ -76,7 +76,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.PasteAction#run()
+     * {@inheritDoc}
      */
     public void run()
     {
@@ -86,22 +86,23 @@
             IAttribute attribute = getSelectedAttributeHierarchies()[0].getAttribute();
             IEntry entry = attribute.getEntry();
 
-            IValue[] newValues = new IValue[values.length]; 
+            IValue[] newValues = new IValue[values.length];
             for ( int v = 0; v < values.length; v++ )
             {
                 newValues[v] = new Value( attribute, values[v].getRawValue() );
             }
-            
+
             new CreateValuesJob( entry, newValues ).execute();
         }
     }
 
 
     /**
-     * Conditions: - an search result and a multiattribute are selected -
-     * there are IValues in clipboard
+     * Conditions:
+     * <li> an search result and a mv-attribute are selected
+     * <li> there are IValues in clipboard.
      * 
-     * @return
+     * @return the values to paste
      */
     private IValue[] getValuesToPaste()
     {

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorQuickFilterWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorQuickFilterWidget.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorQuickFilterWidget.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorQuickFilterWidget.java Thu Aug 28 07:56:37 2008
@@ -21,9 +21,9 @@
 package org.apache.directory.studio.ldapbrowser.ui.editors.searchresult;
 
 
+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.connection.ui.widgets.BaseWidgetUtils;
 import org.eclipse.jface.preference.PreferenceConverter;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
@@ -41,49 +41,75 @@
 import org.eclipse.swt.widgets.Text;
 
 
+/**
+ * The SearchResultEditorQuickFilterWidget implements an instant search 
+ * for the search result edtior. It contains one fields for all displayed values.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class SearchResultEditorQuickFilterWidget
 {
 
+    /** The filter. */
     private SearchResultEditorFilter filter;
 
+    /** The parent. */
     private Composite parent;
 
+    /** The composite. */
     private Composite composite;
 
+    /** The inner composite. */
     private Composite innerComposite;
 
+    /** The quick filter value text. */
     private Text quickFilterValueText;
 
+    /** The clear quick filter button. */
     private Button clearQuickFilterButton;
 
 
+    /**
+     * Creates a new instance of SearchResultEditorQuickFilterWidget.
+     * 
+     * @param filter the filter
+     */
     public SearchResultEditorQuickFilterWidget( SearchResultEditorFilter filter )
     {
         this.filter = filter;
     }
 
 
+    /**
+     * Creates the outer composite.
+     * 
+     * @param parent the parent
+     */
     public void createComposite( Composite parent )
     {
         this.parent = parent;
 
-        this.composite = BaseWidgetUtils.createColumnContainer( parent, 1, 1 );
+        composite = BaseWidgetUtils.createColumnContainer( parent, 1, 1 );
         GridLayout gl = new GridLayout();
         gl.marginHeight = 2;
         gl.marginWidth = 2;
         composite.setLayout( gl );
 
-        this.innerComposite = null;
+        innerComposite = null;
     }
 
 
+    /**
+     * Creates the inner composite with its input fields.
+     */
     private void create()
     {
         innerComposite = BaseWidgetUtils.createColumnContainer( this.composite, 2, 1 );
 
-        this.quickFilterValueText = new Text( innerComposite, SWT.BORDER );
-        this.quickFilterValueText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
-        this.quickFilterValueText.addModifyListener( new ModifyListener()
+        quickFilterValueText = new Text( innerComposite, SWT.BORDER );
+        quickFilterValueText.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
+        quickFilterValueText.addModifyListener( new ModifyListener()
         {
             public void modifyText( ModifyEvent e )
             {
@@ -111,11 +137,12 @@
             }
         } );
 
-        this.clearQuickFilterButton = new Button( innerComposite, SWT.PUSH );
-        this.clearQuickFilterButton.setToolTipText( "Clear Quick Filter" );
-        this.clearQuickFilterButton.setImage( BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_CLEAR ) );
-        this.clearQuickFilterButton.setEnabled( false );
-        this.clearQuickFilterButton.addSelectionListener( new SelectionAdapter()
+        clearQuickFilterButton = new Button( innerComposite, SWT.PUSH );
+        clearQuickFilterButton.setToolTipText( "Clear Quick Filter" );
+        clearQuickFilterButton.setImage( BrowserCommonActivator.getDefault()
+            .getImage( BrowserCommonConstants.IMG_CLEAR ) );
+        clearQuickFilterButton.setEnabled( false );
+        clearQuickFilterButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent e )
             {
@@ -128,14 +155,18 @@
 
         composite.layout( true, true );
         parent.layout( true, true );
-
     }
 
 
+    /**
+     * Destroys the inner widget.
+     */
     private void destroy()
     {
         if ( !"".equals( quickFilterValueText.getText() ) )
+        {
             quickFilterValueText.setText( "" );
+        }
         innerComposite.dispose();
         innerComposite = null;
 
@@ -144,48 +175,61 @@
     }
 
 
+    /**
+     * Disposes this widget.
+     */
     public void dispose()
     {
-        if ( this.innerComposite != null && !this.innerComposite.isDisposed() )
+        if ( innerComposite != null && !innerComposite.isDisposed() )
+        {
+            quickFilterValueText.dispose();
+            quickFilterValueText = null;
+            clearQuickFilterButton = null;
+            innerComposite = null;
+        }
+        if ( filter != null )
         {
-            this.quickFilterValueText.dispose();
-            this.quickFilterValueText = null;
-            this.clearQuickFilterButton = null;
-            this.innerComposite = null;
-        }
-        if ( this.filter != null )
-        {
-            this.composite.dispose();
-            this.composite = null;
-            this.parent = null;
-            this.filter = null;
+            composite.dispose();
+            composite = null;
+            parent = null;
+            filter = null;
         }
     }
 
 
+    /**
+     * Enables or disables this quick filter widget.
+     * 
+     * @param enabled true to enable this quick filter widget, false to disable it
+     */
     public void setEnabled( boolean enabled )
     {
-        if ( this.composite != null && !this.composite.isDisposed() )
+        if ( composite != null && !composite.isDisposed() )
         {
-            this.composite.setEnabled( enabled );
+            composite.setEnabled( enabled );
         }
-        if ( this.innerComposite != null && !this.innerComposite.isDisposed() )
+        if ( innerComposite != null && !innerComposite.isDisposed() )
         {
-            this.innerComposite.setEnabled( enabled );
-            this.quickFilterValueText.setEnabled( enabled );
-            this.clearQuickFilterButton.setEnabled( enabled );
+            innerComposite.setEnabled( enabled );
+            quickFilterValueText.setEnabled( enabled );
+            clearQuickFilterButton.setEnabled( enabled );
         }
     }
 
 
+    /**
+     * Activates or deactivates this quick filter widget.
+     *
+     * @param visible true to create this quick filter widget, false to destroy it
+     */
     public void setActive( boolean visible )
     {
-        if ( visible && this.innerComposite == null && composite != null )
+        if ( visible && innerComposite == null && composite != null )
         {
             create();
             this.quickFilterValueText.setFocus();
         }
-        else if ( !visible && this.innerComposite != null && composite != null )
+        else if ( !visible && innerComposite != null && composite != null )
         {
             destroy();
         }



Mime
View raw message