directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r518364 - /directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/
Date Wed, 14 Mar 2007 22:45:52 GMT
Author: seelmann
Date: Wed Mar 14 15:45:51 2007
New Revision: 518364

URL: http://svn.apache.org/viewvc?view=rev&rev=518364
Log:
Small refactorings, code cleaning, Javadocs.

Modified:
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseFromWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseToPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseWizard.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvFromWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvToWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvWizard.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlFromWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlToWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlWizard.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelFromWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelToWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelWizard.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifFromWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifToWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifWizard.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportDsmlMainWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportDsmlWizard.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportLdifMainWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportLdifWizard.java

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseFromWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseFromWizardPage.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseFromWizardPage.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseFromWizardPage.java Wed Mar 14 15:45:51 2007
@@ -29,61 +29,80 @@
 import org.eclipse.swt.widgets.Composite;
 
 
+/**
+ * This class is a base implementation of the page to select the data to export.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public abstract class ExportBaseFromWizardPage extends WizardPage implements WidgetModifyListener
 {
 
+    /** The wizard. */
     protected ExportBaseWizard wizard;
 
+    /** The search page wrapper. */
     protected SearchPageWrapper spw;
 
 
+    /**
+     * Creates a new instance of ExportBaseFromWizardPage.
+     * 
+     * @param spw the search page wrapper
+     * @param pageName the page name
+     * @param wizard the wizard
+     */
     public ExportBaseFromWizardPage( String pageName, ExportBaseWizard wizard, SearchPageWrapper spw )
     {
         super( pageName );
-        super.setTitle( "Data to Export" );
-        super.setDescription( "Please define search parameters for the export." );
-        super.setPageComplete( true );
+        setTitle( "Data to Export" );
+        setDescription( "Please define search parameters for the export." );
+        setPageComplete( true );
 
         this.wizard = wizard;
         this.spw = spw;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void createControl( Composite parent )
     {
-
         Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );
 
-        this.spw.createContents( composite );
-        this.spw.loadFromSearch( wizard.getSearch() );
-        this.spw.addWidgetModifyListener( this );
+        spw.createContents( composite );
+        spw.loadFromSearch( wizard.getSearch() );
+        spw.addWidgetModifyListener( this );
 
         setControl( composite );
-        // this.spw.setFocus();
-    }
-
-
-    public void setVisible( boolean visible )
-    {
-        super.setVisible( visible );
     }
 
 
+    /**
+     * Validates this page
+     */
     protected void validate()
     {
         setPageComplete( spw.isValid() );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void widgetModified( WidgetModifyEvent event )
     {
         validate();
     }
 
 
+    /**
+     * Saves the dialog settings.
+     */
     public void saveDialogSettings()
     {
-        this.spw.saveToSearch( wizard.getSearch() );
+        spw.saveToSearch( wizard.getSearch() );
     }
 
 }

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseToPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseToPage.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseToPage.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseToPage.java Wed Mar 14 15:45:51 2007
@@ -34,36 +34,48 @@
 import org.eclipse.swt.widgets.Composite;
 
 
+/**
+ * This class is a base implementation of the page to select the target export file.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public abstract class ExportBaseToPage extends WizardPage
 {
 
+    /** The wizard. */
     protected ExportBaseWizard wizard;
 
+    /** The file browser widget. */
     protected FileBrowserWidget fileBrowserWidget;
 
+    /** The overwrite file button. */
     protected Button overwriteFileButton;
 
 
+    /**
+     * Creates a new instance of ExportBaseToPage.
+     * 
+     * @param pageName the page name
+     * @param wizard the wizard
+     */
     public ExportBaseToPage( String pageName, ExportBaseWizard wizard )
     {
         super( pageName );
-        super.setPageComplete( false );
-        super.setTitle( getFileType() + " File" );
-        super.setDescription( "Please enter the target " + getFileType() + " file." );
+        setPageComplete( false );
+        setTitle( getFileType() + " File" );
+        setDescription( "Please enter the target " + getFileType() + " file." );
 
         this.wizard = wizard;
     }
 
 
-    public void setVisible( boolean visible )
-    {
-        super.setVisible( visible );
-    }
-
-
+    /**
+     * Validates this page. This method is responsible for displaying errors, 
+     * as well as enabling/disabling the "Finish" button
+     */
     protected void validate()
     {
-
         boolean ok = true;
         File file = new File( fileBrowserWidget.getFilename() );
         File fileDirectory = file.getParentFile();
@@ -77,7 +89,7 @@
             setErrorMessage( "Selected " + getFileType() + " is no file." );
             ok = false;
         }
-        else if ( file.exists() && !this.overwriteFileButton.getSelection() )
+        else if ( file.exists() && !overwriteFileButton.getSelection() )
         {
             setErrorMessage( "Selected " + getFileType() + " file already exists. Select option 'Overwrite existing "
                 + getFileType() + " file' if you want to overwrite the " + getFileType() + " file." );
@@ -108,9 +120,11 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void createControl( Composite composite )
     {
-
         // Export file
         BaseWidgetUtils.createLabel( composite, getFileType() + " File:", 1 );
         fileBrowserWidget = new FileBrowserWidget( "Select " + getFileType() + " File", getExtensions(),
@@ -141,15 +155,28 @@
     }
 
 
+    /**
+     * Gets the valid file extensions.
+     * 
+     * @return the valid file extensions
+     */
     protected abstract String[] getExtensions();
 
 
+    /**
+     * Gets the file type.
+     * 
+     * @return the file type
+     */
     protected abstract String getFileType();
 
 
+    /**
+     * Saves the dialog settings.
+     */
     public void saveDialogSettings()
     {
-        this.fileBrowserWidget.saveDialogSettings();
+        fileBrowserWidget.saveDialogSettings();
     }
 
 }

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseWizard.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseWizard.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseWizard.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportBaseWizard.java Wed Mar 14 15:45:51 2007
@@ -23,7 +23,6 @@
 
 import org.apache.directory.ldapstudio.browser.core.model.ISearch;
 import org.apache.directory.ldapstudio.browser.ui.actions.SelectionUtils;
-
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.ui.IExportWizard;
@@ -31,49 +30,85 @@
 import org.eclipse.ui.PlatformUI;
 
 
+/**
+ * This class is a base implementation of the export wizard.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public abstract class ExportBaseWizard extends Wizard implements IExportWizard
 {
 
+    /** The export filename. */
     protected String exportFilename = "";
 
+    /** The search. */
     protected ISearch search;
 
 
+    /**
+     * Creates a new instance of ExportBaseWizard.
+     * 
+     * @param title the title
+     */
     public ExportBaseWizard( String title )
     {
         super();
-        super.setWindowTitle( title );
+        setWindowTitle( title );
         init( null, ( IStructuredSelection ) PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService()
             .getSelection() );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void init( IWorkbench workbench, IStructuredSelection selection )
     {
-        this.search = SelectionUtils.getExampleSearch( selection );
-        this.search.setName( null );
-        this.exportFilename = "";
+        search = SelectionUtils.getExampleSearch( selection );
+        search.setName( null );
+        exportFilename = "";
     }
 
 
+    /**
+     * Sets the export filename.
+     * 
+     * @param exportFilename the export filename
+     */
     public void setExportFilename( String exportFilename )
     {
         this.exportFilename = exportFilename;
     }
 
 
+    /**
+     * Gets the export filename.
+     * 
+     * @return the export filename
+     */
     public String getExportFilename()
     {
         return exportFilename;
     }
 
 
+    /**
+     * Gets the search.
+     * 
+     * @return the search
+     */
     public ISearch getSearch()
     {
         return search;
     }
 
 
+    /**
+     * Sets the search.
+     * 
+     * @param search the search
+     */
     public void setSearch( ISearch search )
     {
         this.search = search;

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvFromWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvFromWizardPage.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvFromWizardPage.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvFromWizardPage.java Wed Mar 14 15:45:51 2007
@@ -26,18 +26,42 @@
 import org.apache.directory.ldapstudio.browser.ui.widgets.search.SearchPageWrapper;
 
 
+/**
+ * This class implements the page used to select the data to export to CSV.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ExportCsvFromWizardPage extends ExportBaseFromWizardPage
 {
 
+    /**
+     * Creates a new instance of ExportExcelFromWizardPage using a 
+     * {@link SearchPageWrapper} with
+     * <ul> 
+     * <li>hidden name
+     * <li>visible and checked return DN checkbox
+     * <li>invisible all attributes checkbox
+     * <li>invisible operational attributes checkbox
+     * </ul> 
+     * 
+     * @param pageName the page name
+     * @param wizard the wizard
+     */
     public ExportCsvFromWizardPage( String pageName, ExportBaseWizard wizard )
     {
-        super( pageName, wizard, new SearchPageWrapper( SearchPageWrapper.NAME_INVISIBLE | SearchPageWrapper.RETURN_DN_VISIBLE
-            | SearchPageWrapper.RETURN_DN_CHECKED ) );
+        super( pageName, wizard, new SearchPageWrapper( SearchPageWrapper.NAME_INVISIBLE
+            | SearchPageWrapper.RETURN_DN_VISIBLE | SearchPageWrapper.RETURN_DN_CHECKED ) );
         super.setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor(
             BrowserUIConstants.IMG_EXPORT_CSV_WIZARD ) );
     }
 
 
+    /**
+     * Checks if the DNs should be exported.
+     * 
+     * @return true, if the DNs should be exported
+     */
     public boolean isExportDn()
     {
         return spw.isReturnDn();

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvToWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvToWizardPage.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvToWizardPage.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvToWizardPage.java Wed Mar 14 15:45:51 2007
@@ -32,25 +32,38 @@
 import org.eclipse.ui.dialogs.PreferencesUtil;
 
 
+/**
+ * This class implements the page to select the target CSV file.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ExportCsvToWizardPage extends ExportBaseToPage
 {
 
+    /** The extensions used by CSV files */
     private static final String[] EXTENSIONS = new String[]
         { "*.csv", "*.txt", "*.*" };
 
 
+    /**
+     * Creates a new instance of ExportCsvToWizardPage.
+     * 
+     * @param pageName the page name
+     * @param wizard the wizard
+     */
     public ExportCsvToWizardPage( String pageName, ExportBaseWizard wizard )
     {
         super( pageName, wizard );
-        super.setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor(
-            BrowserUIConstants.IMG_EXPORT_CSV_WIZARD ) );
+        setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor( BrowserUIConstants.IMG_EXPORT_CSV_WIZARD ) );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void createControl( Composite parent )
     {
-        // wizard.getContainer().getShell().setSize(convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH),
-        // convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH));
         final Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );
         super.createControl( composite );
 
@@ -67,22 +80,21 @@
                     TextFormatsPreferencePage.CSV_TAB ).open();
             }
         } );
-
-    }
-
-
-    protected static char getChar( String s )
-    {
-        return s != null && s.length() > 0 ? s.charAt( 0 ) : '\u0000';
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     protected String[] getExtensions()
     {
         return EXTENSIONS;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     protected String getFileType()
     {
         return "CSV";

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvWizard.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvWizard.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvWizard.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportCsvWizard.java Wed Mar 14 15:45:51 2007
@@ -27,26 +27,45 @@
 import org.eclipse.ui.PlatformUI;
 
 
+/**
+ * This class implements the Wizard for Exporting to CSV
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ExportCsvWizard extends ExportBaseWizard
 {
 
+    /** The from page, used to select the exported data. */
     private ExportCsvFromWizardPage fromPage;
 
+    /** The to page, used to select the target file. */
     private ExportCsvToWizardPage toPage;
 
 
+    /**
+     * Creates a new instance of ExportCsvWizard.
+     */
     public ExportCsvWizard()
     {
         super( "CSV Export" );
     }
 
 
+    /**
+     * Gets the ID of the Export CSV Wizard
+     * 
+     * @return The ID of the Export CSV Wizard
+     */
     public static String getId()
     {
         return ExportCsvWizard.class.getName();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void addPages()
     {
         fromPage = new ExportCsvFromWizardPage( ExportCsvFromWizardPage.class.getName(), this );
@@ -62,7 +81,7 @@
     public void createPageControls( Composite pageContainer )
     {
         super.createPageControls( pageContainer );
-        
+
         // set help context ID
         PlatformUI.getWorkbench().getHelpSystem().setHelp( fromPage.getControl(),
             BrowserUIPlugin.PLUGIN_ID + "." + "tools_csvexport_wizard" );
@@ -71,15 +90,17 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean performFinish()
     {
-
-        this.fromPage.saveDialogSettings();
-        this.toPage.saveDialogSettings();
+        fromPage.saveDialogSettings();
+        toPage.saveDialogSettings();
         boolean exportDn = this.fromPage.isExportDn();
 
-        ExportCsvJob ecj = new ExportCsvJob( this.exportFilename, this.search.getConnection(), this.search
-            .getSearchParameter(), exportDn );
+        ExportCsvJob ecj = new ExportCsvJob( exportFilename, search.getConnection(), search.getSearchParameter(),
+            exportDn );
         ecj.execute();
 
         return true;

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlFromWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlFromWizardPage.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlFromWizardPage.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlFromWizardPage.java Wed Mar 14 15:45:51 2007
@@ -27,7 +27,7 @@
 
 
 /**
- * This class implements the From Page of the DSML Export Wizard.
+ * This class implements the page used to select the data to export to DSML.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
@@ -36,7 +36,13 @@
 {
 
     /**
-     * Creates a new instance of ExportDsmlFromWizardPage.
+     * Creates a new instance of ExportDsmlFromWizardPage using a 
+     * {@link SearchPageWrapper} with
+     * <ul> 
+     * <li>hidden name
+     * <li>visible all attributes checkbox
+     * <li>visible operational attributes checkbox
+     * </ul> 
      *
      * @param pageName
      *          the name of the page

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlToWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlToWizardPage.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlToWizardPage.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlToWizardPage.java Wed Mar 14 15:45:51 2007
@@ -28,7 +28,7 @@
 
 
 /**
- * This class implements the To Page of the DSML Export Wizard
+ * This class implements the page to select the target DSML file.
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
@@ -56,8 +56,8 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.ldapstudio.browser.ui.wizards.ExportBaseToPage#createControl(org.eclipse.swt.widgets.Composite)
+    /**
+     * {@inheritDoc}
      */
     public void createControl( Composite parent )
     {
@@ -66,8 +66,8 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.ldapstudio.browser.ui.wizards.ExportBaseToPage#getExtensions()
+    /**
+     * {@inheritDoc}
      */
     protected String[] getExtensions()
     {
@@ -75,8 +75,8 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.apache.directory.ldapstudio.browser.ui.wizards.ExportBaseToPage#getFileType()
+    /**
+     * {@inheritDoc}
      */
     protected String getFileType()
     {

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlWizard.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlWizard.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlWizard.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportDsmlWizard.java Wed Mar 14 15:45:51 2007
@@ -20,6 +20,7 @@
 
 package org.apache.directory.ldapstudio.browser.ui.wizards;
 
+
 import org.apache.directory.ldapstudio.browser.core.jobs.ExportDsmlJob;
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIPlugin;
 import org.eclipse.swt.widgets.Composite;
@@ -34,10 +35,14 @@
  */
 public class ExportDsmlWizard extends ExportBaseWizard
 {
+    
+    /** The title. */
     public static final String WIZARD_TITLE = "DSML Export";
 
+    /** The from page, used to select the exported data. */
     private ExportDsmlFromWizardPage fromPage;
 
+    /** The to page, used to select the target file. */
     private ExportDsmlToWizardPage toPage;
 
 
@@ -60,8 +65,8 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.wizard.Wizard#addPages()
+    /**
+     * {@inheritDoc}
      */
     public void addPages()
     {
@@ -78,7 +83,7 @@
     public void createPageControls( Composite pageContainer )
     {
         super.createPageControls( pageContainer );
-        
+
         // set help context ID
         PlatformUI.getWorkbench().getHelpSystem().setHelp( fromPage.getControl(),
             BrowserUIPlugin.PLUGIN_ID + "." + "tools_dsmlexport_wizard" );
@@ -87,18 +92,17 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+    /**
+     * {@inheritDoc}
      */
     public boolean performFinish()
     {
-        this.fromPage.saveDialogSettings();
-        this.toPage.saveDialogSettings();
+        fromPage.saveDialogSettings();
+        toPage.saveDialogSettings();
 
-        ExportDsmlJob edj = new ExportDsmlJob( this.exportFilename, this.search.getConnection(), this.search
-            .getSearchParameter() );
+        ExportDsmlJob edj = new ExportDsmlJob( exportFilename, search.getConnection(), search.getSearchParameter() );
         edj.execute();
-        
+
         return true;
     }
 }

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelFromWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelFromWizardPage.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelFromWizardPage.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelFromWizardPage.java Wed Mar 14 15:45:51 2007
@@ -26,9 +26,28 @@
 import org.apache.directory.ldapstudio.browser.ui.widgets.search.SearchPageWrapper;
 
 
+/**
+ * This class implements the page used to select the data to export to Excel.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ExportExcelFromWizardPage extends ExportBaseFromWizardPage
 {
 
+    /**
+     * Creates a new instance of ExportExcelFromWizardPage using a 
+     * {@link SearchPageWrapper} with
+     * <ul> 
+     * <li>hidden name
+     * <li>visible and checked return DN checkbox
+     * <li>visible all attributes checkbox
+     * <li>visible operational attributes checkbox
+     * </ul> 
+     * 
+     * @param pageName the page name
+     * @param wizard the wizard
+     */
     public ExportExcelFromWizardPage( String pageName, ExportBaseWizard wizard )
     {
         super( pageName, wizard, new SearchPageWrapper(
@@ -45,6 +64,11 @@
     }
 
 
+    /**
+     * Checks if the DNs should be exported.
+     * 
+     * @return true, if the DNs should be exported
+     */
     public boolean isExportDn()
     {
         return spw.isReturnDn();

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelToWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelToWizardPage.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelToWizardPage.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelToWizardPage.java Wed Mar 14 15:45:51 2007
@@ -32,24 +32,38 @@
 import org.eclipse.ui.dialogs.PreferencesUtil;
 
 
+/**
+ * This class implements the page to select the target Excel file.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ExportExcelToWizardPage extends ExportBaseToPage
 {
 
+    /** The extensions used by Excel files */
     private static final String[] EXTENSIONS = new String[]
         { "*.xls", "*.*" };
 
 
+    /**
+     * Creates a new instance of ExportExcelToWizardPage.
+     * 
+     * @param pageName the page name
+     * @param wizard the wizard
+     */
     public ExportExcelToWizardPage( String pageName, ExportBaseWizard wizard )
     {
         super( pageName, wizard );
-        super.setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor(
-            BrowserUIConstants.IMG_EXPORT_XLS_WIZARD ) );
+        setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor( BrowserUIConstants.IMG_EXPORT_XLS_WIZARD ) );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void createControl( Composite parent )
     {
-
         final Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );
         super.createControl( composite );
 
@@ -71,22 +85,21 @@
         BaseWidgetUtils.createSpacer( composite, 1 );
         BaseWidgetUtils.createWrappedLabel( composite,
             "Warning: Excel export is memory intensive! Maximum number of exportable entries is limited to 65000!", 2 );
-
-    }
-
-
-    protected static char getChar( String s )
-    {
-        return s != null && s.length() > 0 ? s.charAt( 0 ) : '\u0000';
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     protected String[] getExtensions()
     {
         return EXTENSIONS;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     protected String getFileType()
     {
         return "Excel";

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelWizard.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelWizard.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelWizard.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportExcelWizard.java Wed Mar 14 15:45:51 2007
@@ -27,26 +27,45 @@
 import org.eclipse.ui.PlatformUI;
 
 
+/**
+ * This class implements the Wizard for Exporting to Excel
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ExportExcelWizard extends ExportBaseWizard
 {
 
+    /** The from page, used to select the exported data. */
     private ExportExcelFromWizardPage fromPage;
 
+    /** The to page, used to select the target file. */
     private ExportExcelToWizardPage toPage;
 
 
+    /**
+     * Creates a new instance of ExportExcelWizard.
+     */
     public ExportExcelWizard()
     {
         super( "Excel Export" );
     }
 
 
+    /**
+     * Gets the ID of the Export Excel Wizard
+     * 
+     * @return The ID of the Export Excel Wizard
+     */
     public static String getId()
     {
         return ExportExcelWizard.class.getName();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void addPages()
     {
         fromPage = new ExportExcelFromWizardPage( ExportExcelFromWizardPage.class.getName(), this );
@@ -62,7 +81,7 @@
     public void createPageControls( Composite pageContainer )
     {
         super.createPageControls( pageContainer );
-        
+
         // set help context ID
         PlatformUI.getWorkbench().getHelpSystem().setHelp( fromPage.getControl(),
             BrowserUIPlugin.PLUGIN_ID + "." + "tools_excelexport_wizard" );
@@ -71,15 +90,17 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean performFinish()
     {
-
-        this.fromPage.saveDialogSettings();
-        this.toPage.saveDialogSettings();
+        fromPage.saveDialogSettings();
+        toPage.saveDialogSettings();
         boolean exportDn = this.fromPage.isExportDn();
 
-        ExportXlsJob eej = new ExportXlsJob( this.exportFilename, this.search.getConnection(), this.search
-            .getSearchParameter(), exportDn );
+        ExportXlsJob eej = new ExportXlsJob( exportFilename, search.getConnection(), search.getSearchParameter(),
+            exportDn );
         eej.execute();
 
         return true;

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifFromWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifFromWizardPage.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifFromWizardPage.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifFromWizardPage.java Wed Mar 14 15:45:51 2007
@@ -26,9 +26,27 @@
 import org.apache.directory.ldapstudio.browser.ui.widgets.search.SearchPageWrapper;
 
 
+/**
+ * This class implements the page used to select the data to export to LDIF.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ExportLdifFromWizardPage extends ExportBaseFromWizardPage
 {
 
+    /**
+     * Creates a new instance of ExportLdifFromWizardPage using a 
+     * {@link SearchPageWrapper} with
+     * <ul> 
+     * <li>hidden name
+     * <li>visible all attributes checkbox
+     * <li>visible operational attributes checkbox
+     * </ul> 
+     * 
+     * @param pageName the page name
+     * @param wizard the wizard
+     */
     public ExportLdifFromWizardPage( String pageName, ExportBaseWizard wizard )
     {
         super( pageName, wizard, new SearchPageWrapper(

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifToWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifToWizardPage.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifToWizardPage.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifToWizardPage.java Wed Mar 14 15:45:51 2007
@@ -32,21 +32,37 @@
 import org.eclipse.ui.dialogs.PreferencesUtil;
 
 
+/**
+ * This class implements the page to select the target LDIF file.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ExportLdifToWizardPage extends ExportBaseToPage
 {
 
+    /** The extensions used by LDIF files */
     private static final String[] EXTENSIONS = new String[]
         { "*.ldif", "*.*" };
 
 
+    /**
+     * Creates a new instance of ExportLdifToWizardPage.
+     * 
+     * @param pageName the page name
+     * @param wizard the wizard
+     */
     public ExportLdifToWizardPage( String pageName, ExportBaseWizard wizard )
     {
         super( pageName, wizard );
-        super.setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor(
+        setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor(
             BrowserUIConstants.IMG_EXPORT_LDIF_WIZARD ) );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void createControl( Composite parent )
     {
         final Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );
@@ -68,12 +84,18 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     protected String[] getExtensions()
     {
         return EXTENSIONS;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     protected String getFileType()
     {
         return "LDIF";

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifWizard.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifWizard.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifWizard.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ExportLdifWizard.java Wed Mar 14 15:45:51 2007
@@ -27,26 +27,45 @@
 import org.eclipse.ui.PlatformUI;
 
 
+/**
+ * This class implements the Wizard for Exporting to LDIF
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ExportLdifWizard extends ExportBaseWizard
 {
 
+    /** The from page, used to select the exported data. */
     private ExportLdifFromWizardPage fromPage;
 
+    /** The to page, used to select the target file. */
     private ExportLdifToWizardPage toPage;
 
 
+    /**
+     * Creates a new instance of ExportLdifWizard.
+     */
     public ExportLdifWizard()
     {
         super( "LDIF Export" );
     }
 
 
+    /**
+     * Gets the ID of the Export LDIF Wizard
+     * 
+     * @return The ID of the Export LDIF Wizard
+     */
     public static String getId()
     {
         return ExportLdifWizard.class.getName();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void addPages()
     {
         fromPage = new ExportLdifFromWizardPage( ExportLdifFromWizardPage.class.getName(), this );
@@ -54,15 +73,15 @@
         toPage = new ExportLdifToWizardPage( ExportLdifToWizardPage.class.getName(), this );
         addPage( toPage );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public void createPageControls( Composite pageContainer )
     {
         super.createPageControls( pageContainer );
-        
+
         // set help context ID
         PlatformUI.getWorkbench().getHelpSystem().setHelp( fromPage.getControl(),
             BrowserUIPlugin.PLUGIN_ID + "." + "tools_ldifexport_wizard" );
@@ -71,14 +90,15 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean performFinish()
     {
+        fromPage.saveDialogSettings();
+        toPage.saveDialogSettings();
 
-        this.fromPage.saveDialogSettings();
-        this.toPage.saveDialogSettings();
-
-        ExportLdifJob elj = new ExportLdifJob( this.exportFilename, this.search.getConnection(), this.search
-            .getSearchParameter() );
+        ExportLdifJob elj = new ExportLdifJob( exportFilename, search.getConnection(), search.getSearchParameter() );
         elj.execute();
 
         return true;

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportDsmlMainWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportDsmlMainWizardPage.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportDsmlMainWizardPage.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportDsmlMainWizardPage.java Wed Mar 14 15:45:51 2007
@@ -20,8 +20,8 @@
 
 package org.apache.directory.ldapstudio.browser.ui.wizards;
 
-import java.io.File;
 
+import java.io.File;
 
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIConstants;
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIPlugin;
@@ -37,6 +37,7 @@
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.swt.widgets.Group;
 
+
 /**
  * This class implements the Main Page of the DSML Import Wizard
  *
@@ -44,24 +45,39 @@
  * @version $Rev$, $Date$
  */
 public class ImportDsmlMainWizardPage extends WizardPage
-{    
+{
     /** The wizard the page is attached to */
     private ImportDsmlWizard wizard;
-    
+
     /** The extensions used by DSML files*/
-    private static final String[] EXTENSIONS = new String[] { "*.xml", "*.*" };
-    
-    // UI elements    
+    private static final String[] EXTENSIONS = new String[]
+        { "*.xml", "*.*" };
+
+    /** The dsml file browser widget. */
     private FileBrowserWidget dsmlFileBrowserWidget;
+
+    /** The connection widget. */
     private ConnectionWidget connectionWidget;
+
+    /** The save response button. */
     private Button saveResponseButton;
+
+    /** The use default response file button. */
     private Button useDefaultResponseFileButton;
+
+    /** The use custom response file button. */
     private Button useCustomResponseFileButton;
+
+    /** The response file browser widget. */
     private FileBrowserWidget responseFileBrowserWidget;
+
+    /** The overwrite response file button. */
     private Button overwriteResponseFileButton;
-    
+
+    /** The custom response file name. */
     private String customResponseFileName;
-    
+
+
     /**
      * Creates a new instance of ImportDsmlMainWizardPage.
      *
@@ -73,15 +89,16 @@
     public ImportDsmlMainWizardPage( String pageName, ImportDsmlWizard wizard )
     {
         super( pageName );
-        super.setTitle( ImportDsmlWizard.WIZARD_TITLE );
-        super.setDescription( "Please select a connection and the DSML file to import" );
-        super.setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor( BrowserUIConstants.IMG_IMPORT_DSML_WIZARD ) );
-        super.setPageComplete( false );
+        setTitle( ImportDsmlWizard.WIZARD_TITLE );
+        setDescription( "Please select a connection and the DSML file to import" );
+        setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor( BrowserUIConstants.IMG_IMPORT_DSML_WIZARD ) );
+        setPageComplete( false );
         this.wizard = wizard;
     }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.dialogs.IDialogPage#createControl(org.eclipse.swt.widgets.Composite)
+
+
+    /**
+     * {@inheritDoc}
      */
     public void createControl( Composite parent )
     {
@@ -103,7 +120,7 @@
                 validate();
             }
         } );
-        
+
         // Connection
         BaseWidgetUtils.createLabel( composite, "Import into:", 1 );
         connectionWidget = new ConnectionWidget( wizard.getImportConnection() );
@@ -116,7 +133,7 @@
                 validate();
             }
         } );
-        
+
         // Save Response
         Composite responseOuterComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 3 );
         Group responseGroup = BaseWidgetUtils.createGroup( responseOuterComposite, "Response", 1 );
@@ -140,7 +157,8 @@
         } );
 
         BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
-        useDefaultResponseFileButton = BaseWidgetUtils.createRadiobutton( responseContainer, "Use default response file", 2 );
+        useDefaultResponseFileButton = BaseWidgetUtils.createRadiobutton( responseContainer,
+            "Use default response file", 2 );
         useDefaultResponseFileButton.setSelection( true );
         useDefaultResponseFileButton.addSelectionListener( new SelectionAdapter()
         {
@@ -155,7 +173,8 @@
         } );
 
         BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
-        useCustomResponseFileButton = BaseWidgetUtils.createRadiobutton( responseContainer, "Use custom response file", 2 );
+        useCustomResponseFileButton = BaseWidgetUtils.createRadiobutton( responseContainer, "Use custom response file",
+            2 );
         useCustomResponseFileButton.setSelection( false );
         useCustomResponseFileButton.addSelectionListener( new SelectionAdapter()
         {
@@ -182,7 +201,8 @@
         responseFileBrowserWidget.setEnabled( false );
 
         BaseWidgetUtils.createRadioIndent( responseContainer, 1 );
-        overwriteResponseFileButton = BaseWidgetUtils.createCheckbox( responseContainer, "Overwrite existing response file", 2 );
+        overwriteResponseFileButton = BaseWidgetUtils.createCheckbox( responseContainer,
+            "Overwrite existing response file", 2 );
         overwriteResponseFileButton.addSelectionListener( new SelectionAdapter()
         {
             public void widgetSelected( SelectionEvent event )
@@ -190,10 +210,11 @@
                 validate();
             }
         } );
-        
+
         setControl( composite );
     }
-    
+
+
     /**
      * Validates the page. This method is responsible for displaying errors, as well as enabling/disabling the "Finish" button
      */
@@ -217,7 +238,7 @@
             setErrorMessage( "Selected DSML file is not readable." );
             ok = false;
         }
-        else if ( this.saveResponseButton.getSelection() )
+        else if ( saveResponseButton.getSelection() )
         {
             File responseFile = new File( responseFileBrowserWidget.getFilename() );
             File responseFileDirectory = responseFile.getParentFile();
@@ -232,7 +253,7 @@
                 setErrorMessage( "Selected response file is not a file." );
                 ok = false;
             }
-            else if ( responseFile.exists() && !this.overwriteResponseFileButton.getSelection() )
+            else if ( responseFile.exists() && !overwriteResponseFileButton.getSelection() )
             {
                 setErrorMessage( "Selected response file already exists. Select option 'Overwrite existing response file' if you want to overwrite the response file." );
                 ok = false;
@@ -253,8 +274,8 @@
                 ok = false;
             }
         }
-        
-        if ( ( wizard.getImportConnection() == null ) || (connectionWidget.getConnection() == null ) )
+
+        if ( ( wizard.getImportConnection() == null ) || ( connectionWidget.getConnection() == null ) )
         {
             setErrorMessage( "Please select a Connection." );
             ok = false;
@@ -268,12 +289,12 @@
         getContainer().updateButtons();
     }
 
-    
+
     /**
      * Saves the Dialog Settings of the Page
      */
     public void saveDialogSettings()
     {
-        this.dsmlFileBrowserWidget.saveDialogSettings();
+        dsmlFileBrowserWidget.saveDialogSettings();
     }
 }

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportDsmlWizard.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportDsmlWizard.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportDsmlWizard.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportDsmlWizard.java Wed Mar 14 15:45:51 2007
@@ -38,6 +38,7 @@
 import org.eclipse.ui.IWorkbench;
 import org.eclipse.ui.PlatformUI;
 
+
 /**
  * This class implements the Import DSML Wizard.
  *
@@ -48,13 +49,13 @@
 {
     /** Page Title */
     public static final String WIZARD_TITLE = "DSML Import";
-    
+
     /** The connection attached to the import */
     private IConnection importConnection;
-    
+
     /** The main page of the wizard */
     private ImportDsmlMainWizardPage mainPage;
-    
+
     /** The DSML Filename */
     private String dsmlFilename;
 
@@ -63,16 +64,18 @@
 
     /** The Save Response flag */
     private boolean saveResponse;
-    
+
+
     /**
      * Creates a new instance of ImportDsmlWizard.
      */
     public ImportDsmlWizard()
     {
         super();
-        super.setWindowTitle( WIZARD_TITLE );
+        setWindowTitle( WIZARD_TITLE );
     }
-    
+
+
     /**
      * Creates a new instance of ImportDsmlWizard.
      * @param selectedConnection
@@ -80,10 +83,11 @@
      */
     public ImportDsmlWizard( IConnection selectedConnection )
     {
-        super.setWindowTitle( WIZARD_TITLE );
+        setWindowTitle( WIZARD_TITLE );
         this.importConnection = selectedConnection;
     }
-    
+
+
     /**
      * Gets the ID of the Import DSML Wizard
      * @return The ID of the Import DSML Wizard
@@ -92,27 +96,27 @@
     {
         return ImportDsmlWizard.class.getName();
     }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.wizard.Wizard#performFinish()
+
+
+    /**
+     * {@inheritDoc}
      */
     public boolean performFinish()
     {
+        mainPage.saveDialogSettings();
 
-        this.mainPage.saveDialogSettings();
-
-        if ( this.dsmlFilename != null && !"".equals( this.dsmlFilename ) )
+        if ( dsmlFilename != null && !"".equals( dsmlFilename ) )
         {
-            File dsmlFile = new File( this.dsmlFilename );
+            File dsmlFile = new File( dsmlFilename );
 
-            if ( this.saveResponse )
+            if ( saveResponse )
             {
-                File responseFile = new File( this.responseFilename );
-                new ImportDsmlJob( this.importConnection, dsmlFile, responseFile ).execute();
+                File responseFile = new File( responseFilename );
+                new ImportDsmlJob( importConnection, dsmlFile, responseFile ).execute();
             }
             else
             {
-                new ImportDsmlJob( this.importConnection, dsmlFile ).execute();
+                new ImportDsmlJob( importConnection, dsmlFile ).execute();
             }
 
             return true;
@@ -121,65 +125,66 @@
     }
 
 
-    /* (non-Javadoc)
-     * @see org.eclipse.ui.IWorkbenchWizard#init(org.eclipse.ui.IWorkbench, org.eclipse.jface.viewers.IStructuredSelection)
+    /**
+     * {@inheritDoc}
      */
     public void init( IWorkbench workbench, IStructuredSelection selection )
     {
         Object o = selection.getFirstElement();
         if ( o instanceof IEntry )
         {
-            this.importConnection = ( ( IEntry ) o ).getConnection();
+            importConnection = ( ( IEntry ) o ).getConnection();
         }
         else if ( o instanceof ISearchResult )
         {
-            this.importConnection = ( ( ISearchResult ) o ).getEntry().getConnection();
+            importConnection = ( ( ISearchResult ) o ).getEntry().getConnection();
         }
         else if ( o instanceof IBookmark )
         {
-            this.importConnection = ( ( IBookmark ) o ).getConnection();
+            importConnection = ( ( IBookmark ) o ).getConnection();
         }
         else if ( o instanceof IAttribute )
         {
-            this.importConnection = ( ( IAttribute ) o ).getEntry().getConnection();
+            importConnection = ( ( IAttribute ) o ).getEntry().getConnection();
         }
         else if ( o instanceof IValue )
         {
-            this.importConnection = ( ( IValue ) o ).getAttribute().getEntry().getConnection();
+            importConnection = ( ( IValue ) o ).getAttribute().getEntry().getConnection();
         }
         else if ( o instanceof IConnection )
         {
-            this.importConnection = ( IConnection ) o;
+            importConnection = ( IConnection ) o;
         }
         else
         {
-            this.importConnection = null;
+            importConnection = null;
         }
     }
-    
-    /* (non-Javadoc)
-     * @see org.eclipse.jface.wizard.Wizard#addPages()
+
+
+    /**
+     * {@inheritDoc}
      */
     public void addPages()
     {
         mainPage = new ImportDsmlMainWizardPage( ImportDsmlMainWizardPage.class.getName(), this );
         addPage( mainPage );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public void createPageControls( Composite pageContainer )
     {
         super.createPageControls( pageContainer );
-        
+
         // set help context ID
         PlatformUI.getWorkbench().getHelpSystem().setHelp( mainPage.getControl(),
             BrowserUIPlugin.PLUGIN_ID + "." + "tools_dsmlimport_wizard" );
     }
-    
-    
+
+
     /**
      * Get the connection attached to the Import
      * @return The connection attached to the Import
@@ -188,7 +193,8 @@
     {
         return importConnection;
     }
-    
+
+
     /**
      * Sets the connection attached to the Import
      * @param connection
@@ -199,6 +205,7 @@
         this.importConnection = connection;
     }
 
+
     /**
      * Sets the DSML Filename
      * @param dsmlFilename
@@ -209,6 +216,7 @@
         this.dsmlFilename = dsmlFilename;
     }
 
+
     /**
      * Sets the Save Filename
      * @param saveFilename
@@ -218,6 +226,7 @@
     {
         this.responseFilename = saveFilename;
     }
+
 
     /**
      * Sets the SaveResponse flag

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportLdifMainWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportLdifMainWizardPage.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportLdifMainWizardPage.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportLdifMainWizardPage.java Wed Mar 14 15:45:51 2007
@@ -38,66 +38,78 @@
 import org.eclipse.swt.widgets.Group;
 
 
+/**
+ * This class implements the Main Page of the LDIF Import Wizard
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ImportLdifMainWizardPage extends WizardPage
 {
 
+    /** The continue on error flag key */
     public static final String CONTINUE_ON_ERROR_DIALOGSETTING_KEY = ImportLdifMainWizardPage.class.getName()
         + ".continueOnError";
 
+    /** The valid extension. */
     private static final String[] EXTENSIONS = new String[]
         { "*.ldif", "*.*" };
 
+    /** The wizard. */
     private ImportLdifWizard wizard;
 
-    // private Text ldifFilenameText;
+    /** The ldif file browser widget. */
     private FileBrowserWidget ldifFileBrowserWidget;
 
+    /** The connection widget. */
     private ConnectionWidget connectionWidget;
 
+    /** The enable logging button. */
     private Button enableLoggingButton;
 
+    /** The use default logfile button. */
     private Button useDefaultLogfileButton;
 
+    /** The use custom logfile button. */
     private Button useCustomLogfileButton;
 
+    /** The custom logfile name. */
     private String customLogfileName;
 
+    /** The log file browser widget. */
     private FileBrowserWidget logFileBrowserWidget;
 
-    // private Text logfileText;
+    /** The overwrite logfile button. */
     private Button overwriteLogfileButton;
 
+    /** The continue on error button. */
     private Button continueOnErrorButton;
 
 
+    /**
+     * Creates a new instance of ImportLdifMainWizardPage.
+     * 
+     * @param pageName the page name
+     * @param wizard the wizard
+     */
     public ImportLdifMainWizardPage( String pageName, ImportLdifWizard wizard )
     {
         super( pageName );
-        super.setTitle( "LDIF Import" );
-        super.setDescription( "Please select a connection and the LDIF to import" );
-        super.setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor(
-            BrowserUIConstants.IMG_IMPORT_LDIF_WIZARD ) );
-        super.setPageComplete( false );
+        setTitle( "LDIF Import" );
+        setDescription( "Please select a connection and the LDIF to import" );
+        setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor( BrowserUIConstants.IMG_IMPORT_LDIF_WIZARD ) );
+        setPageComplete( false );
 
         this.wizard = wizard;
     }
 
 
-    public void dispose()
-    {
-        super.dispose();
-    }
-
-
-    public void setVisible( boolean visible )
-    {
-        super.setVisible( visible );
-    }
-
-
+    /**
+     * Validates the page. This method is responsible for displaying errors, 
+     * as well as enabling/disabling the "Finish" button
+     */
     private void validate()
     {
-
         boolean ok = true;
 
         File ldifFile = new File( ldifFileBrowserWidget.getFilename() );
@@ -116,7 +128,7 @@
             setErrorMessage( "Selected LDIF file is not readable." );
             ok = false;
         }
-        else if ( this.enableLoggingButton.getSelection() )
+        else if ( enableLoggingButton.getSelection() )
         {
             File logFile = new File( logFileBrowserWidget.getFilename() );
             File logFileDirectory = logFile.getParentFile();
@@ -131,7 +143,7 @@
                 setErrorMessage( "Selected logfile is no file." );
                 ok = false;
             }
-            else if ( logFile.exists() && !this.overwriteLogfileButton.getSelection() )
+            else if ( logFile.exists() && !overwriteLogfileButton.getSelection() )
             {
                 setErrorMessage( "Selected logfile already exists. Select option 'Overwrite existing logfile' if you want to overwrite the logfile." );
                 ok = false;
@@ -167,9 +179,11 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void createControl( Composite parent )
     {
-
         Composite composite = BaseWidgetUtils.createColumnContainer( parent, 3, 1 );
 
         // LDIF file
@@ -299,9 +313,12 @@
     }
 
 
+    /**
+     * Saves the dialog settings.
+     */
     public void saveDialogSettings()
     {
-        this.ldifFileBrowserWidget.saveDialogSettings();
+        ldifFileBrowserWidget.saveDialogSettings();
         BrowserUIPlugin.getDefault().getDialogSettings().put( CONTINUE_ON_ERROR_DIALOGSETTING_KEY,
             continueOnErrorButton.getSelection() );
     }

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportLdifWizard.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportLdifWizard.java?view=diff&rev=518364&r1=518363&r2=518364
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportLdifWizard.java (original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/ImportLdifWizard.java Wed Mar 14 15:45:51 2007
@@ -31,7 +31,6 @@
 import org.apache.directory.ldapstudio.browser.core.model.ISearchResult;
 import org.apache.directory.ldapstudio.browser.core.model.IValue;
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIPlugin;
-
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
@@ -40,112 +39,146 @@
 import org.eclipse.ui.PlatformUI;
 
 
+/**
+ * This class implements the Import LDIF Wizard.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class ImportLdifWizard extends Wizard implements IImportWizard
 {
 
+    /** The main page. */
     private ImportLdifMainWizardPage mainPage;
 
+    /** The ldif filename. */
     private String ldifFilename;
 
+    /** The import connection. */
     private IConnection importConnection;
 
+    /** The enable logging flag. */
     private boolean enableLogging;
 
+    /** The log filename. */
     private String logFilename;
 
+    /** The continue on error flag. */
     private boolean continueOnError;
 
 
+    /**
+     * Creates a new instance of ImportLdifWizard.
+     */
     public ImportLdifWizard()
     {
         super();
-        super.setWindowTitle( "LDIF Import" );
+        setWindowTitle( "LDIF Import" );
     }
 
 
-    public ImportLdifWizard( IConnection selectedConnection )
+    /**
+     * Creates a new instance of ImportLdifWizard.
+     * 
+     * @param importConnection the import connection
+     */
+    public ImportLdifWizard( IConnection importConnection )
     {
         super.setWindowTitle( "LDIF Import" );
-        this.importConnection = selectedConnection;
+        this.importConnection = importConnection;
     }
 
 
+    /**
+     * Gets the ID of the Import LDIF Wizard
+     * 
+     * @return The ID of the Import LDIF Wizard
+     */
     public static String getId()
     {
         return ImportLdifWizard.class.getName();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void init( IWorkbench workbench, IStructuredSelection selection )
     {
         Object o = selection.getFirstElement();
         if ( o instanceof IEntry )
         {
-            this.importConnection = ( ( IEntry ) o ).getConnection();
+            importConnection = ( ( IEntry ) o ).getConnection();
         }
         else if ( o instanceof ISearchResult )
         {
-            this.importConnection = ( ( ISearchResult ) o ).getEntry().getConnection();
+            importConnection = ( ( ISearchResult ) o ).getEntry().getConnection();
         }
         else if ( o instanceof IBookmark )
         {
-            this.importConnection = ( ( IBookmark ) o ).getConnection();
+            importConnection = ( ( IBookmark ) o ).getConnection();
         }
         else if ( o instanceof IAttribute )
         {
-            this.importConnection = ( ( IAttribute ) o ).getEntry().getConnection();
+            importConnection = ( ( IAttribute ) o ).getEntry().getConnection();
         }
         else if ( o instanceof IValue )
         {
-            this.importConnection = ( ( IValue ) o ).getAttribute().getEntry().getConnection();
+            importConnection = ( ( IValue ) o ).getAttribute().getEntry().getConnection();
         }
         else if ( o instanceof IConnection )
         {
-            this.importConnection = ( IConnection ) o;
+            importConnection = ( IConnection ) o;
         }
         else
         {
-            this.importConnection = null;
+            importConnection = null;
         }
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void addPages()
     {
         mainPage = new ImportLdifMainWizardPage( ImportLdifMainWizardPage.class.getName(), this );
         addPage( mainPage );
     }
-    
-    
+
+
     /**
      * {@inheritDoc}
      */
     public void createPageControls( Composite pageContainer )
     {
         super.createPageControls( pageContainer );
-        
+
         PlatformUI.getWorkbench().getHelpSystem().setHelp( mainPage.getControl(),
             BrowserUIPlugin.PLUGIN_ID + "." + "tools_ldifimport_wizard" );
     }
-    
 
+
+    /**
+     * {@inheritDoc}
+     */
     public boolean performFinish()
     {
 
-        this.mainPage.saveDialogSettings();
+        mainPage.saveDialogSettings();
 
-        if ( this.ldifFilename != null && !"".equals( this.ldifFilename ) )
+        if ( ldifFilename != null && !"".equals( ldifFilename ) )
         {
-            File ldifFile = new File( this.ldifFilename );
+            File ldifFile = new File( ldifFilename );
 
-            if ( this.enableLogging )
+            if ( enableLogging )
             {
-                File logFile = new File( this.logFilename );
-                new ImportLdifJob( this.importConnection, ldifFile, logFile, this.continueOnError ).execute();
+                File logFile = new File( logFilename );
+                new ImportLdifJob( importConnection, ldifFile, logFile, continueOnError ).execute();
             }
             else
             {
-                new ImportLdifJob( this.importConnection, ldifFile, this.continueOnError ).execute();
+                new ImportLdifJob( importConnection, ldifFile, continueOnError ).execute();
             }
 
             return true;
@@ -154,36 +187,66 @@
     }
 
 
+    /**
+     * Gets the import connection.
+     * 
+     * @return the import connection
+     */
     public IConnection getImportConnection()
     {
         return importConnection;
     }
 
 
+    /**
+     * Sets the import connection.
+     * 
+     * @param importConnection the import connection
+     */
     public void setImportConnection( IConnection importConnection )
     {
         this.importConnection = importConnection;
     }
 
 
+    /**
+     * Sets the ldif filename.
+     * 
+     * @param ldifFilename the ldif filename
+     */
     public void setLdifFilename( String ldifFilename )
     {
         this.ldifFilename = ldifFilename;
     }
 
 
+    /**
+     * Sets the continue on error flag.
+     * 
+     * @param continueOnError the continue on error flag
+     */
     public void setContinueOnError( boolean continueOnError )
     {
         this.continueOnError = continueOnError;
     }
 
 
+    /**
+     * Sets the log filename.
+     * 
+     * @param logFilename the log filename
+     */
     public void setLogFilename( String logFilename )
     {
         this.logFilename = logFilename;
     }
 
 
+    /**
+     * Sets the enable logging flag.
+     * 
+     * @param b the enable logging flag
+     */
     public void setEnableLogging( boolean b )
     {
         this.enableLogging = b;



Mime
View raw message