directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r689845 [1/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
Author: seelmann
Date: Thu Aug 28 07:56:37 2008
New Revision: 689845

URL: http://svn.apache.org/viewvc?rev=689845&view=rev
Log:
Added Javadoc and code cleaning


Modified:
    directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java
    directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/AbstractOpenEditorAction.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetCellModifier.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetConfiguration.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetQuickFilterWidget.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/OpenBestEditorAction.java
    directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/OpenEditorAction.java
    directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorConfiguration.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorOutlinePage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/OpenEntryEditorAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/AbstractOpenEditorAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenBestEditorAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenDefaultEditorAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenEditorAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenEntryEditorAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenSearchResultEditorPreferencePage.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultDeleteAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditor.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorActionGroup.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorCellModifier.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorConfiguration.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorContentProvider.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorCursor.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorFilter.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorLabelProvider.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorNavigationLocation.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorPasteAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorQuickFilterWidget.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorSorter.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorUniversalListener.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditorWidget.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/ShowDNAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/ShowLinksAction.java
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/ShowQuickFilterAction.java

Modified: directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java (original)
+++ directory/studio/trunk/connection-core/src/main/java/org/apache/directory/studio/connection/core/jobs/StudioConnectionJob.java Thu Aug 28 07:56:37 2008
@@ -117,7 +117,6 @@
                 }
                 else
                 {
-                    System.out.println( "NoBulk: " + runnable );
                     runnable.run( monitor );
                 }
 

Modified: directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java (original)
+++ directory/studio/trunk/connection-ui/src/main/java/org/apache/directory/studio/connection/ui/RunnableContextRunner.java Thu Aug 28 07:56:37 2008
@@ -115,7 +115,6 @@
                 }
                 else
                 {
-                    System.out.println( "NoBulk: " + runnable );
                     runnable.run( spm[0] );
                 }
 

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/AbstractOpenEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/AbstractOpenEditorAction.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/AbstractOpenEditorAction.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/AbstractOpenEditorAction.java Thu Aug 28 07:56:37 2008
@@ -33,7 +33,7 @@
 
 
 /**
- * The base class for all value editor actions of the entry editor widget.
+ * Base class for all value editor actions of the entry editor widget.
  * It manages activation and closing of value editors. 
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
@@ -160,7 +160,7 @@
         }
 
         // reset custom value editor and set selection to notify all
-        // openeditoractions to update their enabled state.
+        // actions to update their enabled state.
         valueEditorManager.setUserSelectedValueEditor( null );
         viewer.setSelection( viewer.getSelection() );
 

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetCellModifier.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetCellModifier.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetCellModifier.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetCellModifier.java Thu Aug 28 07:56:37 2008
@@ -54,7 +54,7 @@
 
 
     /**
-     * Disposes this object.
+     * Disposes this cell modifier.
      */
     public void dispose()
     {

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetConfiguration.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetConfiguration.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetConfiguration.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetConfiguration.java Thu Aug 28 07:56:37 2008
@@ -26,8 +26,8 @@
 
 
 /**
- * The BrowserConfiguration contains the content provider, 
- * label provider, sorter, filter the context menu manager and the
+ * The EntryEditorWidgetConfiguration contains the content provider, 
+ * label provider, sorter, filter, the context menu manager and the
  * preferences for the entry editor widget. 
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetQuickFilterWidget.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetQuickFilterWidget.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetQuickFilterWidget.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/EntryEditorWidgetQuickFilterWidget.java Thu Aug 28 07:56:37 2008
@@ -21,9 +21,9 @@
 package org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor;
 
 
+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;
@@ -180,7 +180,8 @@
 
         clearQuickFilterButton = new Button( innerComposite, SWT.PUSH );
         clearQuickFilterButton.setToolTipText( "Clear Quick Filter" );
-        clearQuickFilterButton.setImage( BrowserCommonActivator.getDefault().getImage( BrowserCommonConstants.IMG_CLEAR ) );
+        clearQuickFilterButton.setImage( BrowserCommonActivator.getDefault()
+            .getImage( BrowserCommonConstants.IMG_CLEAR ) );
         clearQuickFilterButton.setEnabled( false );
         clearQuickFilterButton.addSelectionListener( new SelectionAdapter()
         {
@@ -268,7 +269,7 @@
     /**
      * Activates or deactivates this quick filter widget.
      *
-     * @param visible true to crate this quick filter widget, false to destroy it
+     * @param visible true to create this quick filter widget, false to destroy it
      */
     public void setActive( boolean visible )
     {

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/OpenBestEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/OpenBestEditorAction.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/OpenBestEditorAction.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/OpenBestEditorAction.java Thu Aug 28 07:56:37 2008
@@ -66,7 +66,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.AbstractOpenEditorAction#dispose()
+     * {@inheritDoc}
      */
     public void dispose()
     {
@@ -76,7 +76,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getCommandId()
+     * {@inheritDoc}
      */
     public String getCommandId()
     {
@@ -85,7 +85,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getImageDescriptor()
+     * {@inheritDoc}
      */
     public ImageDescriptor getImageDescriptor()
     {
@@ -94,7 +94,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getText()
+     * {@inheritDoc}
      */
     public String getText()
     {
@@ -103,7 +103,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#isEnabled()
+     * {@inheritDoc}
      */
     public boolean isEnabled()
     {

Modified: directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/OpenEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/OpenEditorAction.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/OpenEditorAction.java (original)
+++ directory/studio/trunk/ldapbrowser-common/src/main/java/org/apache/directory/studio/ldapbrowser/common/widgets/entryeditor/OpenEditorAction.java Thu Aug 28 07:56:37 2008
@@ -71,7 +71,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.AbstractOpenEditorAction#run()
+     * {@inheritDoc}
      */
     public void run()
     {
@@ -83,17 +83,17 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.widgets.entryeditor.AbstractOpenEditorAction#dispose()
+     * {@inheritDoc}
      */
     public void dispose()
     {
-        this.valueEditor = null;
+        valueEditor = null;
         super.dispose();
     }
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getCommandId()
+     * {@inheritDoc}
      */
     public String getCommandId()
     {
@@ -102,7 +102,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getImageDescriptor()
+     * {@inheritDoc}
      */
     public ImageDescriptor getImageDescriptor()
     {
@@ -111,7 +111,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getText()
+     * {@inheritDoc}
      */
     public String getText()
     {
@@ -120,7 +120,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#isEnabled()
+     * {@inheritDoc}
      */
     public boolean isEnabled()
     {

Modified: directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java (original)
+++ directory/studio/trunk/ldapbrowser-core/src/main/java/org/apache/directory/studio/ldapbrowser/core/model/schema/Schema.java Thu Aug 28 07:56:37 2008
@@ -305,8 +305,8 @@
             }
             catch ( Exception e )
             {
-                System.out.println( e.getMessage() + ": " + attributeName + " - " + value );
-                e.printStackTrace();
+                System.out.println( "Error reading schema: " + attributeName + " = " + value );
+                System.out.println( e.getMessage() );
             }
         }
 

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorConfiguration.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorConfiguration.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorConfiguration.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorConfiguration.java Thu Aug 28 07:56:37 2008
@@ -26,8 +26,8 @@
 
 
 /**
- * The BrowserConfiguration contains the content provider, 
- * label provider, sorter, filter the context menu manager and the
+ * The EntryEditorConfiguration contains the content provider, 
+ * label provider, sorter, filter, the context menu manager and the
  * preferences for the entry editor. 
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorOutlinePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorOutlinePage.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorOutlinePage.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/EntryEditorOutlinePage.java Thu Aug 28 07:56:37 2008
@@ -85,8 +85,8 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.views.contentoutline.ContentOutlinePage#createControl(org.eclipse.swt.widgets.Composite)
+    /**
+     * {@inheritDoc}
      */
     public void createControl( Composite parent )
     {
@@ -110,9 +110,9 @@
                         IEntry entry = ( IEntry ) o;
                         IAttribute[] attributes = entry.getAttributes();
 
-                        List selectionList = new ArrayList();
+                        List<Object> selectionList = new ArrayList<Object>();
 
-                        Iterator it = ( ( IStructuredSelection ) event.getSelection() ).iterator();
+                        Iterator<?> it = ( ( IStructuredSelection ) event.getSelection() ).iterator();
                         while ( it.hasNext() )
                         {
                             Object element = it.next();
@@ -121,15 +121,12 @@
                             {
                                 // select the value
                                 LdifAttrValLine line = ( LdifAttrValLine ) element;
-                                for ( int a = 0; a < attributes.length; a++ )
+                                for ( IAttribute attribute : attributes )
                                 {
-                                    IAttribute attribute = attributes[a];
                                     if ( attribute.getDescription().equals( line.getUnfoldedAttributeDescription() ) )
                                     {
-                                        IValue[] values = attribute.getValues();
-                                        for ( int v = 0; v < values.length; v++ )
+                                        for ( IValue value : attribute.getValues() )
                                         {
-                                            IValue value = values[v];
                                             if ( value.getStringValue().equals( line.getValueAsString() ) )
                                             {
                                                 selectionList.add( value );
@@ -141,15 +138,13 @@
                             else if ( element instanceof List )
                             {
                                 // select attribute and all values
-                                List list = ( List ) element;
+                                List<?> list = ( List<?> ) element;
                                 if ( !list.isEmpty() && list.get( 0 ) instanceof LdifAttrValLine )
                                 {
                                     LdifAttrValLine line = ( LdifAttrValLine ) list.get( 0 );
-                                    for ( int a = 0; a < attributes.length; a++ )
+                                    for ( IAttribute attribute : attributes )
                                     {
-                                        IAttribute attribute = attributes[a];
-                                        if ( attribute.getDescription().equals(
-                                            line.getUnfoldedAttributeDescription() ) )
+                                        if ( attribute.getDescription().equals( line.getUnfoldedAttributeDescription() ) )
                                         {
                                             selectionList.add( attribute );
                                             selectionList.addAll( Arrays.asList( attribute.getValues() ) );
@@ -159,9 +154,8 @@
                             }
                             else if ( element instanceof LdifRecord )
                             {
-                                for ( int a = 0; a < attributes.length; a++ )
+                                for ( IAttribute attribute : attributes )
                                 {
-                                    IAttribute attribute = attributes[a];
                                     selectionList.add( attribute );
                                     selectionList.addAll( Arrays.asList( attribute.getValues() ) );
                                 }
@@ -259,8 +253,8 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.part.Page#dispose()
+    /**
+     * {@inheritDoc}
      */
     public void dispose()
     {
@@ -317,9 +311,9 @@
             }
 
             // List of AttrValLine --> Array of AttrValLine
-            else if ( element instanceof List && ( ( List ) element ).get( 0 ) instanceof LdifAttrValLine )
+            else if ( element instanceof List && ( ( List<?> ) element ).get( 0 ) instanceof LdifAttrValLine )
             {
-                List list = ( List ) element;
+                List<?> list = ( List<?> ) element;
                 return list.toArray();
             }
             else if ( element instanceof LdifModSpec )
@@ -345,21 +339,21 @@
          */
         private Object[] getUniqueAttrValLineArray( LdifAttrValLine[] lines )
         {
-            Map uniqueAttrMap = new LinkedHashMap();
+            Map<String, List<LdifAttrValLine>> uniqueAttrMap = new LinkedHashMap<String, List<LdifAttrValLine>>();
             for ( int i = 0; i < lines.length; i++ )
             {
                 if ( !uniqueAttrMap.containsKey( lines[i].getUnfoldedAttributeDescription() ) )
                 {
-                    uniqueAttrMap.put( lines[i].getUnfoldedAttributeDescription(), new ArrayList() );
+                    uniqueAttrMap.put( lines[i].getUnfoldedAttributeDescription(), new ArrayList<LdifAttrValLine>() );
                 }
-                ( ( List ) uniqueAttrMap.get( lines[i].getUnfoldedAttributeDescription() ) ).add( lines[i] );
+                ( uniqueAttrMap.get( lines[i].getUnfoldedAttributeDescription() ) ).add( lines[i] );
             }
             return uniqueAttrMap.values().toArray();
         }
 
 
-        /* (non-Javadoc)
-         * @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
+        /**
+         * {@inheritDoc}
          */
         public Object getParent( Object element )
         {
@@ -367,8 +361,8 @@
         }
 
 
-        /* (non-Javadoc)
-         * @see org.eclipse.jface.viewers.ITreeContentProvider#hasChildren(java.lang.Object)
+        /**
+         * {@inheritDoc}
          */
         public boolean hasChildren( Object element )
         {
@@ -376,8 +370,8 @@
         }
 
 
-        /* (non-Javadoc)
-         * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
+        /**
+         * {@inheritDoc}
          */
         public Object[] getElements( Object inputElement )
         {
@@ -385,16 +379,16 @@
         }
 
 
-        /* (non-Javadoc)
-         * @see org.eclipse.jface.viewers.IContentProvider#dispose()
+        /**
+         * {@inheritDoc}
          */
         public void dispose()
         {
         }
 
 
-        /* (non-Javadoc)
-         * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+        /**
+         * {@inheritDoc}
          */
         public void inputChanged( Viewer viewer, Object oldInput, Object newInput )
         {
@@ -409,8 +403,8 @@
      */
     private static class LdifLabelProvider extends LabelProvider
     {
-        /* (non-Javadoc)
-         * @see org.eclipse.jface.viewers.LabelProvider#getText(java.lang.Object)
+        /**
+         * {@inheritDoc}
          */
         public String getText( Object element )
         {
@@ -422,9 +416,9 @@
             }
 
             // List of AttrValLine
-            else if ( element instanceof List && ( ( List ) element ).get( 0 ) instanceof LdifAttrValLine )
+            else if ( element instanceof List && ( ( List<?> ) element ).get( 0 ) instanceof LdifAttrValLine )
             {
-                List list = ( List ) element;
+                List<?> list = ( List<?> ) element;
                 return ( ( LdifAttrValLine ) list.get( 0 ) ).getUnfoldedAttributeDescription() + " (" + list.size()
                     + ")";
             }
@@ -449,8 +443,8 @@
         }
 
 
-        /* (non-Javadoc)
-         * @see org.eclipse.jface.viewers.LabelProvider#getImage(java.lang.Object)
+        /**
+         * {@inheritDoc}
          */
         public Image getImage( Object element )
         {
@@ -477,7 +471,7 @@
             }
 
             // List of AttrValLine
-            else if ( element instanceof List && ( ( List ) element ).get( 0 ) instanceof LdifAttrValLine )
+            else if ( element instanceof List && ( ( List<?> ) element ).get( 0 ) instanceof LdifAttrValLine )
             {
                 return LdifEditorActivator.getDefault().getImage( LdifEditorConstants.IMG_LDIF_ATTRIBUTE );
             }

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/OpenEntryEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/OpenEntryEditorAction.java?rev=689845&r1=689844&r2=689845&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/OpenEntryEditorAction.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/entry/OpenEntryEditorAction.java Thu Aug 28 07:56:37 2008
@@ -42,6 +42,7 @@
 public class OpenEntryEditorAction extends AbstractOpenEditorAction
 {
 
+    /** The value editor. */
     private IValueEditor valueEditor;
 
 

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/AbstractOpenEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/AbstractOpenEditorAction.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/AbstractOpenEditorAction.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/AbstractOpenEditorAction.java Thu Aug 28 07:56:37 2008
@@ -33,23 +33,43 @@
 import org.eclipse.swt.widgets.TableItem;
 
 
+/**
+ * Base class for all value editor actions of the search result editor.
+ * It manages activation and closing of value editors. 
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public abstract class AbstractOpenEditorAction extends BrowserAction implements FocusListener, KeyListener
 {
 
+    /** The value editor manager. */
     protected ValueEditorManager valueEditorManager;
 
+    /** The viewer. */
     protected TableViewer viewer;
 
+    /** The cursor. */
     protected SearchResultEditorCursor cursor;
 
+    /** The cell editor. */
     protected CellEditor cellEditor;
 
+    /** The is active flag. */
     private boolean isActive;
 
     /** The actionGroup. */
     protected SearchResultEditorActionGroup actionGroup;
 
 
+    /**
+     * Creates a new instance of AbstractOpenEditorAction.
+     * 
+     * @param viewer the viewer
+     * @param cursor the cursor
+     * @param valueEditorManager the value editor manager
+     * @param actionGroup the action group
+     */
     protected AbstractOpenEditorAction( TableViewer viewer, SearchResultEditorCursor cursor,
         ValueEditorManager valueEditorManager, SearchResultEditorActionGroup actionGroup )
     {
@@ -61,112 +81,91 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public CellEditor getCellEditor()
     {
-        return this.cellEditor;
+        return cellEditor;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void run()
     {
-        this.activateEditor();
+        activateEditor();
     }
 
 
+    /**
+     * Activates the editor.
+     */
     private void activateEditor()
     {
-
         Object element = cursor.getRow().getData();
-        String property = ( String ) this.viewer.getColumnProperties()[cursor.getColumn()];
+        String property = ( String ) viewer.getColumnProperties()[cursor.getColumn()];
 
-        if ( !this.viewer.isCellEditorActive() && viewer.getCellModifier().canModify( element, property ) )
+        if ( !viewer.isCellEditorActive() && viewer.getCellModifier().canModify( element, property ) )
         {
-
-            // check if attribute exists
-            /*
-             * if(element instanceof ISearchResult) { ISearchResult result =
-             * (ISearchResult)element; IAttribute attribute =
-             * result.getAttribute(property); if(attribute == null) {
-             * EventRegistry.suspendEventFireingInCurrentThread(); try {
-             * attribute = result.getEntry().createAttribute(property,
-             * this); System.out.println("activateEditor(): created
-             * attribute " + attribute); } catch (ModelModificationException
-             * e) { } EventRegistry.resumeEventFireingInCurrentThread(); } }
-             */
-
             // disable action handlers
             actionGroup.deactivateGlobalActionHandlers();
 
             // set cell editor to viewer
-            for ( int i = 0; i < this.viewer.getCellEditors().length; i++ )
+            for ( int i = 0; i < viewer.getCellEditors().length; i++ )
             {
-                this.viewer.getCellEditors()[i] = this.cellEditor;
+                viewer.getCellEditors()[i] = cellEditor;
             }
 
             // add listener for end of editing
-            if ( this.cellEditor.getControl() != null )
+            if ( cellEditor.getControl() != null )
             {
-                this.cellEditor.getControl().addFocusListener( this );
-                this.cellEditor.getControl().addKeyListener( this );
+                cellEditor.getControl().addFocusListener( this );
+                cellEditor.getControl().addKeyListener( this );
             }
 
             // deactivate cursor
-            this.cursor.setVisible( false );
+            cursor.setVisible( false );
 
             // start editing
-            this.isActive = true;
-            this.viewer.editElement( element, cursor.getColumn() );
+            isActive = true;
+            viewer.editElement( element, cursor.getColumn() );
 
             viewer.setSelection( null, true );
             viewer.getTable().setSelection( new TableItem[0] );
 
-            if ( !this.viewer.isCellEditorActive() )
+            if ( !viewer.isCellEditorActive() )
             {
-                this.editorClosed();
+                editorClosed();
             }
         }
         else
         {
-            this.valueEditorManager.setUserSelectedValueEditor( null );
+            valueEditorManager.setUserSelectedValueEditor( null );
         }
     }
 
 
     private void editorClosed()
     {
-
-        // check empty attribute
-        /*
-         * Object element = cursor.getRow().getData(); String property =
-         * (String)this.viewer.getColumnProperties()[cursor.getColumn()];
-         * if(element instanceof ISearchResult) { ISearchResult result =
-         * (ISearchResult)element; IAttribute attribute =
-         * result.getAttribute(property); if(attribute != null &&
-         * attribute.getValueSize() == 0) {
-         * EventRegistry.suspendEventFireingInCurrentThread(); try {
-         * result.getEntry().deleteAttribute(attribute, this);
-         * System.out.println("activateEditor(): deleted attribute " +
-         * attribute); } catch (ModelModificationException e) { }
-         * EventRegistry.resumeEventFireingInCurrentThread(); } }
-         */
-
         // clear active flag
-        this.isActive = false;
+        isActive = false;
 
-        // remove cell editors from viewer to prevend auto-editing
-        for ( int i = 0; i < this.viewer.getCellEditors().length; i++ )
+        // remove cell editors from viewer to prevent auto-editing
+        for ( int i = 0; i < viewer.getCellEditors().length; i++ )
         {
-            this.viewer.getCellEditors()[i] = null;
+            viewer.getCellEditors()[i] = null;
         }
 
         // remove listener
-        if ( this.cellEditor.getControl() != null )
+        if ( cellEditor.getControl() != null )
         {
-            this.cellEditor.getControl().removeFocusListener( this );
-            this.cellEditor.getControl().removeKeyListener( this );
+            cellEditor.getControl().removeFocusListener( this );
+            cellEditor.getControl().removeKeyListener( this );
         }
 
-        this.valueEditorManager.setUserSelectedValueEditor( null );
+        valueEditorManager.setUserSelectedValueEditor( null );
 
         // activate cursor
         cursor.setVisible( true );
@@ -185,17 +184,26 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void focusGained( FocusEvent e )
     {
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void focusLost( FocusEvent e )
     {
-        this.editorClosed();
+        editorClosed();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void keyPressed( KeyEvent e )
     {
         if ( e.character == SWT.ESC && e.stateMask == SWT.NONE )
@@ -205,11 +213,17 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void keyReleased( KeyEvent e )
     {
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean isActive()
     {
         return isActive;

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenBestEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenBestEditorAction.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/OpenBestEditorAction.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenBestEditorAction.java Thu Aug 28 07:56:37 2008
@@ -27,12 +27,27 @@
 import org.eclipse.jface.viewers.TableViewer;
 
 
+/**
+ * The OpenBestEditorAction is used to edit a value with the best value editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class OpenBestEditorAction extends AbstractOpenEditorAction
 {
 
+    /** The best value editor. */
     private IValueEditor bestValueEditor;
 
 
+    /**
+     * Creates a new instance of OpenBestEditorAction.
+     * 
+     * @param viewer the viewer
+     * @param cursor the cursor
+     * @param valueEditorManager the value editor manager
+     * @param actionGroup the action group
+     */
     public OpenBestEditorAction( TableViewer viewer, SearchResultEditorCursor cursor,
         ValueEditorManager valueEditorManager, SearchResultEditorActionGroup actionGroup )
     {
@@ -52,7 +67,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#dispose()
+     * {@inheritDoc}
      */
     public void dispose()
     {
@@ -62,7 +77,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getCommandId()
+     * {@inheritDoc}
      */
     public String getCommandId()
     {
@@ -71,7 +86,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getImageDescriptor()
+     * {@inheritDoc}
      */
     public ImageDescriptor getImageDescriptor()
     {
@@ -80,7 +95,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getText()
+     * {@inheritDoc}
      */
     public String getText()
     {
@@ -89,7 +104,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#isEnabled()
+     * {@inheritDoc}
      */
     public boolean isEnabled()
     {

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenDefaultEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenDefaultEditorAction.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/OpenDefaultEditorAction.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenDefaultEditorAction.java Thu Aug 28 07:56:37 2008
@@ -28,12 +28,28 @@
 import org.eclipse.jface.viewers.TableViewer;
 
 
+/**
+ * The OpenBestEditorAction is used to edit a value with the best value editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class OpenDefaultEditorAction extends AbstractOpenEditorAction
 {
 
+    /** The best value editor proxy. */
     private SearchResultEditorActionProxy bestValueEditorProxy;
 
 
+    /**
+     * Creates a new instance of OpenDefaultEditorAction.
+     * 
+     * @param viewer the viewer
+     * @param cursor the cursor
+     * @param valueEditorManager the value editor manager
+     * @param bestValueEditorProxy the best value editor proxy
+     * @param actionGroup the action group
+     */
     public OpenDefaultEditorAction( TableViewer viewer, SearchResultEditorCursor cursor,
         ValueEditorManager valueEditorManager, SearchResultEditorActionProxy bestValueEditorProxy,
         SearchResultEditorActionGroup actionGroup )
@@ -43,22 +59,27 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void run()
     {
-        this.bestValueEditorProxy.run();
+        bestValueEditorProxy.run();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void dispose()
     {
-        this.bestValueEditorProxy = null;
-
+        bestValueEditorProxy = null;
         super.dispose();
     }
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getCommandId()
+     * {@inheritDoc}
      */
     public String getCommandId()
     {
@@ -67,7 +88,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getImageDescriptor()
+     * {@inheritDoc}
      */
     public ImageDescriptor getImageDescriptor()
     {
@@ -83,7 +104,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getText()
+     * {@inheritDoc}
      */
     public String getText()
     {
@@ -92,7 +113,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#isEnabled()
+     * {@inheritDoc}
      */
     public boolean isEnabled()
     {

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenEditorAction.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/OpenEditorAction.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenEditorAction.java Thu Aug 28 07:56:37 2008
@@ -30,12 +30,28 @@
 import org.eclipse.jface.viewers.TableViewer;
 
 
+/**
+ * The OpenEditorAction is used to edit a value with a specific value editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class OpenEditorAction extends AbstractOpenEditorAction
 {
 
+    /** The value editor. */
     private IValueEditor valueEditor;
 
 
+    /**
+     * Creates a new instance of OpenEditorAction.
+     * 
+     * @param viewer the viewer
+     * @param cursor the cursor
+     * @param valueEditorManager the value editor manager
+     * @param valueEditor the value editor
+     * @param actionGroup the action group
+     */
     public OpenEditorAction( TableViewer viewer, SearchResultEditorCursor cursor,
         ValueEditorManager valueEditorManager, IValueEditor valueEditor, SearchResultEditorActionGroup actionGroup )
     {
@@ -45,31 +61,39 @@
     }
 
 
+    /**
+     * Gets the value editor.
+     * 
+     * @return the value editor
+     */
     public IValueEditor getValueEditor()
     {
-        return this.valueEditor;
+        return valueEditor;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void run()
     {
-        this.valueEditorManager.setUserSelectedValueEditor( this.valueEditor );
+        valueEditorManager.setUserSelectedValueEditor( valueEditor );
         super.run();
     }
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#dispose()
+     * {@inheritDoc}
      */
     public void dispose()
     {
-        this.valueEditor = null;
+        valueEditor = null;
         super.dispose();
     }
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getCommandId()
+     * {@inheritDoc}
      */
     public String getCommandId()
     {
@@ -78,7 +102,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getImageDescriptor()
+     * {@inheritDoc}
      */
     public ImageDescriptor getImageDescriptor()
     {
@@ -87,7 +111,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#getText()
+     * {@inheritDoc}
      */
     public String getText()
     {
@@ -96,7 +120,7 @@
 
 
     /**
-     * @see org.apache.directory.studio.ldapbrowser.common.actions.BrowserAction#isEnabled()
+     * {@inheritDoc}
      */
     public boolean isEnabled()
     {
@@ -112,8 +136,7 @@
             {
                 AttributeHierarchy ah = getSelectedAttributeHierarchies()[0];
                 alternativeVps = valueEditorManager.getAlternativeValueEditors( ah );
-                return Arrays.asList( alternativeVps ).contains( this.valueEditor )
-                    && valueEditor.getRawValue( ah ) != null;
+                return Arrays.asList( alternativeVps ).contains( valueEditor ) && valueEditor.getRawValue( ah ) != null;
             }
         }
         else

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenEntryEditorAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenEntryEditorAction.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/OpenEntryEditorAction.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenEntryEditorAction.java Thu Aug 28 07:56:37 2008
@@ -40,6 +40,7 @@
 public class OpenEntryEditorAction extends AbstractOpenEditorAction
 {
 
+    /** The value editor. */
     private IValueEditor valueEditor;
 
 

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenSearchResultEditorPreferencePage.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenSearchResultEditorPreferencePage.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/OpenSearchResultEditorPreferencePage.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/OpenSearchResultEditorPreferencePage.java Thu Aug 28 07:56:37 2008
@@ -28,9 +28,18 @@
 import org.eclipse.ui.dialogs.PreferencesUtil;
 
 
+/**
+ * This action opens the preference page of the search result editor.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class OpenSearchResultEditorPreferencePage extends Action
 {
 
+    /**
+     * Creates a new instance of OpenSearchResultEditorPreferencePage.
+     */
     public OpenSearchResultEditorPreferencePage()
     {
         super.setText( "Preferences..." );
@@ -39,6 +48,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void run()
     {
         Shell shell = Display.getCurrent().getActiveShell();
@@ -48,9 +60,4 @@
             { srePageId, attPageId }, null ).open();
     }
 
-
-    public void dispose()
-    {
-    }
-
 }

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultDeleteAction.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultDeleteAction.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/SearchResultDeleteAction.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultDeleteAction.java Thu Aug 28 07:56:37 2008
@@ -25,18 +25,25 @@
 import org.apache.directory.studio.ldapbrowser.core.model.IEntry;
 
 
+/**
+ * Special delete action to avoid the deletion of the whole entry.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class SearchResultDeleteAction extends DeleteAction
 {
 
-    public SearchResultDeleteAction()
-    {
-        super();
-    }
+    private static IEntry[] EMPTY = new IEntry[0];
 
 
-    protected IEntry[] getEntries() throws Exception
+    /**
+     * Takes care that not the whole selected entry is deleted, but only
+     * the selected attribute.
+     */
+    protected IEntry[] getEntries()
     {
-        return new IEntry[0];
+        return EMPTY;
     }
 
 }

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditor.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditor.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/SearchResultEditor.java (original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/editors/searchresult/SearchResultEditor.java Thu Aug 28 07:56:37 2008
@@ -24,7 +24,6 @@
 import org.apache.directory.studio.ldapbrowser.core.model.ISearch;
 import org.apache.directory.studio.ldapbrowser.ui.BrowserUIPlugin;
 import org.apache.directory.studio.ldapbrowser.ui.views.browser.BrowserView;
-
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.jface.util.IPropertyChangeListener;
 import org.eclipse.jface.util.PropertyChangeEvent;
@@ -47,38 +46,57 @@
 import org.eclipse.ui.part.ShowInContext;
 
 
+/**
+ * The SearchResultEditor is an {@link IEditorPart} is used to display and edit 
+ * the attributes of the results of a search.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class SearchResultEditor extends EditorPart implements INavigationLocationProvider, IReusableEditor,
     IPropertyChangeListener
 {
 
+    /** The configuration. */
     private SearchResultEditorConfiguration configuration;
 
+    /** The action group. */
     private SearchResultEditorActionGroup actionGroup;
 
+    /** The main widget. */
     private SearchResultEditorWidget mainWidget;
 
+    /** The universal listener. */
     private SearchResultEditorUniversalListener universalListener;
 
 
+    /**
+     * Gets the ID of the SearchResultEditor.
+     * 
+     * @return the id of the SearchResultEditor
+     */
     public static String getId()
     {
         return SearchResultEditor.class.getName();
     }
 
-    
+
+    /**
+     * {@inheritDoc}
+     */
     public void setInput( IEditorInput input )
     {
         super.setInput( input );
-        
-        if ( input instanceof SearchResultEditorInput && this.universalListener != null )
+
+        if ( input instanceof SearchResultEditorInput && universalListener != null )
         {
             SearchResultEditorInput srei = ( SearchResultEditorInput ) input;
             ISearch search = srei.getSearch();
-            this.universalListener.setInput( search );
+            universalListener.setInput( search );
 
             if ( search != null )
             {
-                // enable one instance hack before fireing the input change event 
+                // enable one instance hack before firing the input change event 
                 // otherwise the navigation history is cleared.
                 SearchResultEditorInput.enableOneInstanceHack( true );
                 firePropertyChange( IEditorPart.PROP_INPUT );
@@ -94,31 +112,39 @@
     }
 
 
+    /**
+     * Refreshes this search result editor.
+     */
     public void refresh()
     {
-        if ( this.universalListener != null )
+        if ( universalListener != null )
         {
-            this.universalListener.refreshInput();
+            universalListener.refreshInput();
         }
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void init( IEditorSite site, IEditorInput input ) throws PartInitException
     {
         super.setSite( site );
 
         // mark dummy location, necessary because the first marked
         // location doesn't appear in history
-        this.setInput( new SearchResultEditorInput( null ) );
+        setInput( new SearchResultEditorInput( null ) );
         getSite().getPage().getNavigationHistory().markLocation( this );
 
-        this.setInput( input );
+        setInput( input );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void createPartControl( Composite parent )
     {
-
         Composite composite = new Composite( parent, SWT.NONE );
         composite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
         GridLayout layout = new GridLayout();
@@ -132,46 +158,52 @@
             BrowserUIPlugin.PLUGIN_ID + "." + "tools_search_result_editor" );
 
         // create configuration
-        this.configuration = new SearchResultEditorConfiguration( this );
+        configuration = new SearchResultEditorConfiguration( this );
 
         // create main widget
-        this.mainWidget = new SearchResultEditorWidget( this.configuration );
-        this.mainWidget.createWidget( composite );
+        mainWidget = new SearchResultEditorWidget( configuration );
+        mainWidget.createWidget( composite );
 
         // create actions and context menu (and register global actions)
-        this.actionGroup = new SearchResultEditorActionGroup( this );
-        this.actionGroup.fillToolBar( this.mainWidget.getToolBarManager() );
-        this.actionGroup.fillMenu( this.mainWidget.getMenuManager() );
-        this.actionGroup.enableGlobalActionHandlers( getEditorSite().getActionBars() );
-        this.actionGroup.fillContextMenu( this.configuration.getContextMenuManager( this.mainWidget.getViewer() ) );
+        actionGroup = new SearchResultEditorActionGroup( this );
+        actionGroup.fillToolBar( mainWidget.getToolBarManager() );
+        actionGroup.fillMenu( mainWidget.getMenuManager() );
+        actionGroup.enableGlobalActionHandlers( getEditorSite().getActionBars() );
+        actionGroup.fillContextMenu( configuration.getContextMenuManager( mainWidget.getViewer() ) );
 
         // create the listener
-        this.universalListener = new SearchResultEditorUniversalListener( this );
-        getSite().setSelectionProvider( this.configuration.getCursor( this.mainWidget.getViewer() ) );
+        universalListener = new SearchResultEditorUniversalListener( this );
+        getSite().setSelectionProvider( configuration.getCursor( mainWidget.getViewer() ) );
         this.setInput( getEditorInput() );
 
         BrowserUIPlugin.getDefault().getPreferenceStore().addPropertyChangeListener( this );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setFocus()
     {
-        this.mainWidget.setFocus();
+        mainWidget.setFocus();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void dispose()
     {
-        if ( this.configuration != null )
+        if ( configuration != null )
         {
-            this.actionGroup.dispose();
-            this.actionGroup = null;
-            this.universalListener.dispose();
-            this.universalListener = null;
-            this.mainWidget.dispose();
-            this.mainWidget = null;
-            this.configuration.dispose();
-            this.configuration = null;
+            actionGroup.dispose();
+            actionGroup = null;
+            universalListener.dispose();
+            universalListener = null;
+            mainWidget.dispose();
+            mainWidget = null;
+            configuration.dispose();
+            configuration = null;
             getSite().setSelectionProvider( null );
             BrowserUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener( this );
         }
@@ -180,40 +212,61 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void doSave( IProgressMonitor monitor )
     {
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void doSaveAs()
     {
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean isDirty()
     {
         return false;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean isSaveAsAllowed()
     {
         return false;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public INavigationLocation createEmptyNavigationLocation()
     {
         return null;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public INavigationLocation createNavigationLocation()
     {
         return new SearchResultEditorNavigationLocation( this );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public Object getAdapter( Class required )
     {
 
@@ -245,36 +298,56 @@
     }
 
 
+    /**
+     * Gets the action group.
+     * 
+     * @return the action group
+     */
     public SearchResultEditorActionGroup getActionGroup()
     {
         return actionGroup;
     }
 
 
+    /**
+     * Gets the configuration.
+     * 
+     * @return the configuration
+     */
     public SearchResultEditorConfiguration getConfiguration()
     {
         return configuration;
     }
 
 
+    /**
+     * Gets the main widget.
+     * 
+     * @return the main widget
+     */
     public SearchResultEditorWidget getMainWidget()
     {
         return mainWidget;
     }
 
 
+    /**
+     * Gets the universal listener.
+     * 
+     * @return the universal listener
+     */
     public SearchResultEditorUniversalListener getUniversalListener()
     {
         return universalListener;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void propertyChange( PropertyChangeEvent event )
     {
-        // if(this.mainWidget.getViewer() != null) {
-        // this.mainWidget.getViewer().refresh();
-        // }
-        this.refresh();
+        refresh();
     }
 
 }



Mime
View raw message