directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r518344 - in /directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui: widgets/connection/ wizards/
Date Wed, 14 Mar 2007 21:54:12 GMT
Author: seelmann
Date: Wed Mar 14 14:54:11 2007
New Revision: 518344

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

Modified:
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/widgets/connection/ConnectionPageWrapper.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewBookmarkMainWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewBookmarkWizard.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionAuthWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionMainWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionOptionsWizardPage.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionWizard.java
    directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewEntryWizard.java

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/widgets/connection/ConnectionPageWrapper.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/widgets/connection/ConnectionPageWrapper.java?view=diff&rev=518344&r1=518343&r2=518344
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/widgets/connection/ConnectionPageWrapper.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/widgets/connection/ConnectionPageWrapper.java
Wed Mar 14 14:54:11 2007
@@ -149,14 +149,21 @@
     /**
      * Creates a new instance of ConnectionPageWrapper.
      *
-     * @param listener the initial modify listener
+     * @param listener the initial modify listener, may be null
      * @param runnableContext the runnable context
      */
     public ConnectionPageWrapper( ConnectionPageModifyListener listener, IRunnableContext
runnableContext )
     {
         this.listenerList = new ArrayList<ConnectionPageModifyListener>( 5 );
-        this.listenerList.add( listener );
-        this.isConnectionOpened = listener.getRealConnection() != null && listener.getRealConnection().isOpened();
+        if(listener != null) 
+        {
+            this.listenerList.add( listener );
+            this.isConnectionOpened = listener.getRealConnection() != null && listener.getRealConnection().isOpened();
+        }
+        else
+        {
+            this.isConnectionOpened = false;
+        }
         this.runnableContext = runnableContext;
     }
 

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewBookmarkMainWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewBookmarkMainWizardPage.java?view=diff&rev=518344&r1=518343&r2=518344
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewBookmarkMainWizardPage.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewBookmarkMainWizardPage.java
Wed Mar 14 14:54:11 2007
@@ -27,7 +27,6 @@
 import org.apache.directory.ldapstudio.browser.ui.widgets.WidgetModifyEvent;
 import org.apache.directory.ldapstudio.browser.ui.widgets.WidgetModifyListener;
 import org.apache.directory.ldapstudio.browser.ui.widgets.search.EntryWidget;
-
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.ModifyEvent;
@@ -38,58 +37,85 @@
 import org.eclipse.swt.widgets.Text;
 
 
+/**
+ * The NewBookmarkMainWizardPage is used to specify the bookmark name
+ * and the DN of the target entry.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class NewBookmarkMainWizardPage extends WizardPage implements WidgetModifyListener
 {
 
+    /** The entry. */
     private IEntry entry;
 
+    /** The bookmark name text. */
     private Text bookmarkNameText;
 
+    /** The bookmark entry widget. */
     private EntryWidget bookmarkEntryWidget;
 
 
+    /**
+     * Creates a new instance of NewBookmarkMainWizardPage.
+     * 
+     * @param pageName the page name
+     * @param entry the entry
+     * @param wizard the wizard
+     */
     public NewBookmarkMainWizardPage( String pageName, IEntry entry, NewBookmarkWizard wizard
)
     {
         super( pageName );
-        super.setTitle( "New Bookmark" );
-        super.setDescription( "Please enter the bookmark parameters." );
-        // super.setImageDescriptor(BrowserUIPlugin.getDefault().getImageDescriptor(BrowserUIConstants.IMG_ATTRIBUTE_WIZARD));
-        super.setPageComplete( false );
+        setTitle( "New Bookmark" );
+        setDescription( "Please enter the bookmark parameters." );
+        // setImageDescriptor(BrowserUIPlugin.getDefault().getImageDescriptor(BrowserUIConstants.IMG_ATTRIBUTE_WIZARD));
+        setPageComplete( false );
 
         this.entry = entry;
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void dispose()
     {
         super.dispose();
-        this.bookmarkEntryWidget.removeWidgetModifyListener( this );
+        bookmarkEntryWidget.removeWidgetModifyListener( this );
     }
 
 
+    /**
+     * Validates this page.
+     */
     private void validate()
     {
-        if ( this.bookmarkNameText != null && !this.bookmarkNameText.isDisposed()
)
+        if ( bookmarkNameText != null && !bookmarkNameText.isDisposed() )
         {
-            this.setPageComplete( this.bookmarkEntryWidget.getDn() != null
-                && !"".equals( this.bookmarkNameText.getText() ) );
+            setPageComplete( bookmarkEntryWidget.getDn() != null && !"".equals( bookmarkNameText.getText()
) );
         }
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setVisible( boolean visible )
     {
         super.setVisible( visible );
         if ( visible )
         {
-            this.validate();
+            validate();
         }
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void createControl( Composite parent )
     {
-
         Composite composite = new Composite( parent, SWT.NONE );
         GridLayout gl = new GridLayout( 1, false );
         composite.setLayout( gl );
@@ -98,9 +124,9 @@
         Composite innerComposite = BaseWidgetUtils.createColumnContainer( composite, 3, 1
);
 
         BaseWidgetUtils.createLabel( innerComposite, "Bookmark Name:", 1 );
-        this.bookmarkNameText = BaseWidgetUtils.createText( innerComposite, this.entry.getDn().toString(),
2 );
-        this.bookmarkNameText.setFocus();
-        this.bookmarkNameText.addModifyListener( new ModifyListener()
+        bookmarkNameText = BaseWidgetUtils.createText( innerComposite, entry.getDn().toString(),
2 );
+        bookmarkNameText.setFocus();
+        bookmarkNameText.addModifyListener( new ModifyListener()
         {
             public void modifyText( ModifyEvent e )
             {
@@ -109,36 +135,52 @@
         } );
 
         BaseWidgetUtils.createLabel( innerComposite, "Bookmark DN:", 1 );
-        this.bookmarkEntryWidget = new EntryWidget();
-        this.bookmarkEntryWidget.addWidgetModifyListener( this );
-        this.bookmarkEntryWidget.createWidget( innerComposite );
-        this.bookmarkEntryWidget.setInput( this.entry.getConnection(), this.entry.getDn()
);
+        bookmarkEntryWidget = new EntryWidget();
+        bookmarkEntryWidget.addWidgetModifyListener( this );
+        bookmarkEntryWidget.createWidget( innerComposite );
+        bookmarkEntryWidget.setInput( entry.getConnection(), entry.getDn() );
 
         setControl( composite );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void widgetModified( WidgetModifyEvent event )
     {
         validate();
     }
 
 
+    /**
+     * Gets the bookmark dn.
+     * 
+     * @return the bookmark dn
+     */
     public DN getBookmarkDn()
     {
-        return this.bookmarkEntryWidget.getDn();
+        return bookmarkEntryWidget.getDn();
     }
 
 
+    /**
+     * Gets the bookmark name.
+     * 
+     * @return the bookmark name
+     */
     public String getBookmarkName()
     {
-        return this.bookmarkNameText.getText();
+        return bookmarkNameText.getText();
     }
 
 
+    /**
+     * Saves the dialog settings.
+     */
     public void saveDialogSettings()
     {
-        this.bookmarkEntryWidget.saveDialogSettings();
+        bookmarkEntryWidget.saveDialogSettings();
     }
 
 }

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewBookmarkWizard.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewBookmarkWizard.java?view=diff&rev=518344&r1=518343&r2=518344
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewBookmarkWizard.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewBookmarkWizard.java
Wed Mar 14 14:54:11 2007
@@ -40,63 +40,86 @@
 import org.eclipse.ui.IWorkbench;
 
 
+/**
+ * The NewConnectionWizard is used to create a new bookmark.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class NewBookmarkWizard extends Wizard implements INewWizard
 {
 
+    /** The main page. */
     private NewBookmarkMainWizardPage mainPage;
 
+    /** The selected entry. */
     private IEntry selectedEntry;
 
 
+    /**
+     * Creates a new instance of NewBookmarkWizard.
+     */
     public NewBookmarkWizard()
     {
-        super.setWindowTitle( "New Bookmark" );
-        super.setNeedsProgressMonitor( false );
+        setWindowTitle( "New Bookmark" );
+        setNeedsProgressMonitor( false );
     }
 
 
+    /**
+     * Gets the id.
+     * 
+     * @return the id
+     */
     public static String getId()
     {
         return NewBookmarkWizard.class.getName();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void init( IWorkbench workbench, IStructuredSelection selection )
     {
+        // determine the currently selected entry, used 
+        // to preset the bookmark target DN
         Object o = selection.getFirstElement();
         if ( o instanceof IEntry )
         {
-            this.selectedEntry = ( ( IEntry ) o );
+            selectedEntry = ( ( IEntry ) o );
         }
         else if ( o instanceof ISearchResult )
         {
-            this.selectedEntry = ( ( ISearchResult ) o ).getEntry();
+            selectedEntry = ( ( ISearchResult ) o ).getEntry();
         }
         else if ( o instanceof Bookmark )
         {
-            this.selectedEntry = ( ( Bookmark ) o ).getEntry();
+            selectedEntry = ( ( Bookmark ) o ).getEntry();
         }
         else if ( o instanceof IAttribute )
         {
-            this.selectedEntry = ( ( IAttribute ) o ).getEntry();
+            selectedEntry = ( ( IAttribute ) o ).getEntry();
         }
         else if ( o instanceof IValue )
         {
-            this.selectedEntry = ( ( IValue ) o ).getAttribute().getEntry();
+            selectedEntry = ( ( IValue ) o ).getAttribute().getEntry();
         }
         else
         {
-            this.selectedEntry = null;
+            selectedEntry = null;
         }
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void addPages()
     {
-        if ( this.selectedEntry != null )
+        if ( selectedEntry != null )
         {
-            mainPage = new NewBookmarkMainWizardPage( NewBookmarkMainWizardPage.class.getName(),
this.selectedEntry,
-                this );
+            mainPage = new NewBookmarkMainWizardPage( NewBookmarkMainWizardPage.class.getName(),
selectedEntry, this );
             addPage( mainPage );
         }
         else
@@ -106,19 +129,31 @@
         }
     }
 
+    /**
+     * Just a dummy page.
+     *
+     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+     * @version $Rev$, $Date$
+     */
     class DummyWizardPage extends WizardPage
     {
 
+        /**
+         * Creates a new instance of DummyWizardPage.
+         */
         protected DummyWizardPage()
         {
             super( "" );
-            super.setTitle( "No entry selected" );
-            super.setDescription( "In order to use the bookmark creation wizard please select
an entry." );
-            // super.setImageDescriptor(BrowserUIPlugin.getDefault().getImageDescriptor(BrowserUIConstants.IMG_ATTRIBUTE_WIZARD));
-            super.setPageComplete( true );
+            setTitle( "No entry selected" );
+            setDescription( "In order to use the bookmark creation wizard please select an
entry." );
+            // setImageDescriptor(BrowserUIPlugin.getDefault().getImageDescriptor(BrowserUIConstants.IMG_ATTRIBUTE_WIZARD));
+            setPageComplete( true );
         }
 
 
+        /**
+         * {@inheritDoc}
+         */
         public void createControl( Composite parent )
         {
             Composite composite = new Composite( parent, SWT.NONE );
@@ -131,12 +166,9 @@
     }
 
 
-    public boolean performCancel()
-    {
-        return true;
-    }
-
-
+    /**
+     * {@inheritDoc}
+     */
     public boolean performFinish()
     {
         if ( selectedEntry != null )

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionAuthWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionAuthWizardPage.java?view=diff&rev=518344&r1=518343&r2=518344
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionAuthWizardPage.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionAuthWizardPage.java
Wed Mar 14 14:54:11 2007
@@ -25,33 +25,48 @@
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIConstants;
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIPlugin;
 import org.apache.directory.ldapstudio.browser.ui.widgets.connection.ConnectionPageModifyListener;
-
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 
 
+/**
+ * The NewConnectionAuthWizardPage is used to specify the 
+ * authentication method of the new connection.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class NewConnectionAuthWizardPage extends WizardPage implements ConnectionPageModifyListener
 {
 
+    /** The wizard. */
     private NewConnectionWizard wizard;
 
 
+    /**
+     * Creates a new instance of NewConnectionAuthWizardPage.
+     * 
+     * @param pageName the page name
+     * @param wizard the wizard
+     */
     public NewConnectionAuthWizardPage( String pageName, NewConnectionWizard wizard )
     {
         super( pageName );
-        super.setTitle( "Authentification" );
-        super.setDescription( "Please select an authentification method and input authentification
data." );
-        super.setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor(
-            BrowserUIConstants.IMG_CONNECTION_WIZARD ) );
-        super.setPageComplete( false );
+        setTitle( "Authentification" );
+        setDescription( "Please select an authentification method and input authentification
data." );
+        setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor( BrowserUIConstants.IMG_CONNECTION_WIZARD
) );
+        setPageComplete( false );
 
         this.wizard = wizard;
         wizard.getCpw().addConnectionPageModifyListener( this );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void connectionPageModified()
     {
         if ( isCurrentPage() )
@@ -61,6 +76,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setMessage( String message )
     {
         if ( isCurrentPage() )
@@ -71,6 +89,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setErrorMessage( String errorMessage )
     {
         if ( isCurrentPage() )
@@ -81,19 +102,18 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public IConnection getRealConnection()
     {
         return null;
     }
 
 
-    public void setVisible( boolean visible )
-    {
-        super.setVisible( visible );
-        // this.validate();
-    }
-
-
+    /**
+     * Validates this page.
+     */
     private void validate()
     {
         setPageComplete( getMessage() == null );
@@ -101,6 +121,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void createControl( Composite parent )
     {
         Composite composite = new Composite( parent, SWT.NONE );

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionMainWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionMainWizardPage.java?view=diff&rev=518344&r1=518343&r2=518344
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionMainWizardPage.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionMainWizardPage.java
Wed Mar 14 14:54:11 2007
@@ -25,45 +25,48 @@
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIConstants;
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIPlugin;
 import org.apache.directory.ldapstudio.browser.ui.widgets.connection.ConnectionPageModifyListener;
-
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 
 
+/**
+ * The NewConnectionMainWizardPage is used to specify the connection name
+ * and the network parameters of the new connection.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class NewConnectionMainWizardPage extends WizardPage implements ConnectionPageModifyListener
 {
 
+    /** The wizard. */
     private NewConnectionWizard wizard;
 
 
+    /**
+     * Creates a new instance of NewConnectionMainWizardPage.
+     * 
+     * @param pageName the page name
+     * @param wizard the wizard
+     */
     public NewConnectionMainWizardPage( String pageName, NewConnectionWizard wizard )
     {
         super( pageName );
-        super.setTitle( "New LDAP Connection" );
-        super.setDescription( "Please enter connection name and network parameters." );
-        super.setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor(
-            BrowserUIConstants.IMG_CONNECTION_WIZARD ) );
-        super.setPageComplete( false );
+        setTitle( "New LDAP Connection" );
+        setDescription( "Please enter connection name and network parameters." );
+        setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor( BrowserUIConstants.IMG_CONNECTION_WIZARD
) );
+        setPageComplete( false );
 
         this.wizard = wizard;
         wizard.getCpw().addConnectionPageModifyListener( this );
     }
 
 
-    public void dispose()
-    {
-        super.dispose();
-    }
-
-
-    public void setVisible( boolean visible )
-    {
-        super.setVisible( visible );
-    }
-
-
+    /**
+     * {@inheritDoc}
+     */
     public void connectionPageModified()
     {
         if ( isCurrentPage() )
@@ -73,6 +76,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setMessage( String message )
     {
         if ( isCurrentPage() )
@@ -83,6 +89,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setErrorMessage( String errorMessage )
     {
         if ( isCurrentPage() )
@@ -93,12 +102,18 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public IConnection getRealConnection()
     {
         return null;
     }
 
 
+    /**
+     * Validates this page.
+     */
     private void validate()
     {
         setPageComplete( getMessage() == null );
@@ -106,6 +121,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void createControl( Composite parent )
     {
         Composite composite = new Composite( parent, SWT.NONE );
@@ -116,7 +134,6 @@
         wizard.getCpw().addOpenConnectionInput( true, composite );
 
         setControl( composite );
-        // nameText.setFocus();
     }
 
 }

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionOptionsWizardPage.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionOptionsWizardPage.java?view=diff&rev=518344&r1=518343&r2=518344
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionOptionsWizardPage.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionOptionsWizardPage.java
Wed Mar 14 14:54:11 2007
@@ -25,33 +25,48 @@
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIConstants;
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIPlugin;
 import org.apache.directory.ldapstudio.browser.ui.widgets.connection.ConnectionPageModifyListener;
-
 import org.eclipse.jface.wizard.WizardPage;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridLayout;
 import org.eclipse.swt.widgets.Composite;
 
 
+/**
+ * The NewConnectionAuthWizardPage is used to specify the 
+ * advanced options of the new connection.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
 public class NewConnectionOptionsWizardPage extends WizardPage implements ConnectionPageModifyListener
 {
 
+    /** The wizard. */
     private NewConnectionWizard wizard;
 
 
+    /**
+     * Creates a new instance of NewConnectionOptionsWizardPage.
+     * 
+     * @param pageName the page name
+     * @param wizard the wizard
+     */
     public NewConnectionOptionsWizardPage( String pageName, NewConnectionWizard wizard )
     {
         super( pageName );
-        super.setTitle( "Connection Parameter" );
-        super.setDescription( "You can specify additional connection parameters." );
-        super.setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor(
-            BrowserUIConstants.IMG_CONNECTION_WIZARD ) );
-        super.setPageComplete( true );
+        setTitle( "Connection Parameter" );
+        setDescription( "You can specify additional connection parameters." );
+        setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor( BrowserUIConstants.IMG_CONNECTION_WIZARD
) );
+        setPageComplete( true );
 
         this.wizard = wizard;
         wizard.getCpw().addConnectionPageModifyListener( this );
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void connectionPageModified()
     {
         if ( isCurrentPage() )
@@ -61,6 +76,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setMessage( String message )
     {
         if ( isCurrentPage() )
@@ -71,6 +89,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void setErrorMessage( String errorMessage )
     {
         if ( isCurrentPage() )
@@ -81,19 +102,18 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public IConnection getRealConnection()
     {
         return null;
     }
 
 
-    public void setVisible( boolean visible )
-    {
-        super.setVisible( visible );
-        // this.validate();
-    }
-
-
+    /**
+     * Validates this page.
+     */
     private void validate()
     {
         setPageComplete( getMessage() == null );
@@ -101,6 +121,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void createControl( Composite parent )
     {
         Composite composite = new Composite( parent, SWT.NONE );

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionWizard.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionWizard.java?view=diff&rev=518344&r1=518343&r2=518344
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionWizard.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewConnectionWizard.java
Wed Mar 14 14:54:11 2007
@@ -25,11 +25,8 @@
 import org.apache.directory.ldapstudio.browser.core.jobs.OpenConnectionsJob;
 import org.apache.directory.ldapstudio.browser.core.model.IConnection;
 import org.apache.directory.ldapstudio.browser.ui.BrowserUIPlugin;
-import org.apache.directory.ldapstudio.browser.ui.widgets.connection.ConnectionPageModifyListener;
 import org.apache.directory.ldapstudio.browser.ui.widgets.connection.ConnectionPageWrapper;
-
 import org.eclipse.jface.viewers.IStructuredSelection;
-import org.eclipse.jface.wizard.IWizardPage;
 import org.eclipse.jface.wizard.Wizard;
 import org.eclipse.swt.widgets.Composite;
 import org.eclipse.ui.INewWizard;
@@ -37,48 +34,63 @@
 import org.eclipse.ui.PlatformUI;
 
 
-public class NewConnectionWizard extends Wizard implements INewWizard, ConnectionPageModifyListener
+/**
+ * The NewConnectionWizard is used to create a new connection.
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+public class NewConnectionWizard extends Wizard implements INewWizard
 {
 
+    /** The connection page wrapper. */
     private ConnectionPageWrapper cpw;
 
+    /** The main page. */
     private NewConnectionMainWizardPage mainPage;
 
+    /** The auth page. */
     private NewConnectionAuthWizardPage authPage;
 
+    /** The options page. */
     private NewConnectionOptionsWizardPage optionsPage;
 
 
+    /**
+     * Creates a new instance of NewConnectionWizard.
+     */
     public NewConnectionWizard()
     {
-        super.setWindowTitle( "New LDAP Connection" );
-        super.setNeedsProgressMonitor( true );
-
-    }
-
-
-    public boolean needsProgressMonitor()
-    {
-        return true;
+        setWindowTitle( "New LDAP Connection" );
+        setNeedsProgressMonitor( true );
     }
 
 
+    /**
+     * Gets the id.
+     * 
+     * @return the id
+     */
     public static String getId()
     {
         return NewConnectionWizard.class.getName();
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void init( IWorkbench workbench, IStructuredSelection selection )
     {
-
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public void addPages()
     {
-
-        cpw = new ConnectionPageWrapper( this, this.getContainer() );
+        cpw = new ConnectionPageWrapper( null, getContainer() );
 
         mainPage = new NewConnectionMainWizardPage( NewConnectionMainWizardPage.class.getName(),
this );
         addPage( mainPage );
@@ -97,7 +109,7 @@
     public void createPageControls( Composite pageContainer )
     {
         super.createPageControls( pageContainer );
-        
+
         // set help context ID
         PlatformUI.getWorkbench().getHelpSystem().setHelp( mainPage.getControl(),
             BrowserUIPlugin.PLUGIN_ID + "." + "tools_newconnection_wizard" );
@@ -108,37 +120,18 @@
     }
 
 
-    public IWizardPage getNextPage( IWizardPage page )
-    {
-        if ( page == this.mainPage )
-        {
-            return this.authPage;
-        }
-        else if ( page == this.authPage )
-        {
-            return this.optionsPage;
-        }
-        else if ( page == this.optionsPage )
-        {
-            return null;
-        }
-        else
-        {
-            return null;
-        }
-    }
-
-
+    /**
+     * {@inheritDoc}
+     */
     public boolean canFinish()
     {
         if ( cpw.getAuthenticationMethod() == IConnection.AUTH_ANONYMOUS )
         {
-            return this.mainPage.isPageComplete() && this.optionsPage.isPageComplete();
+            return mainPage.isPageComplete() && optionsPage.isPageComplete();
         }
         else if ( cpw.getAuthenticationMethod() == IConnection.AUTH_SIMPLE )
         {
-            return this.mainPage.isPageComplete() && this.authPage.isPageComplete()
-                && this.optionsPage.isPageComplete();
+            return mainPage.isPageComplete() && authPage.isPageComplete() &&
optionsPage.isPageComplete();
         }
         else
         {
@@ -147,6 +140,9 @@
     }
 
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean performFinish()
     {
         final IConnection conn = cpw.getTestConnection();
@@ -165,28 +161,11 @@
     }
 
 
-    public void connectionPageModified()
-    {
-
-    }
-
-
-    public void setMessage( String message )
-    {
-    }
-
-
-    public void setErrorMessage( String errorMessage )
-    {
-    }
-
-
-    public IConnection getRealConnection()
-    {
-        return null;
-    }
-
-
+    /**
+     * Gets the connection page wrapper.
+     * 
+     * @return the connection page wrapper
+     */
     public ConnectionPageWrapper getCpw()
     {
         return cpw;

Modified: directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewEntryWizard.java
URL: http://svn.apache.org/viewvc/directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewEntryWizard.java?view=diff&rev=518344&r1=518343&r2=518344
==============================================================================
--- directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewEntryWizard.java
(original)
+++ directory/ldapstudio/trunk/ldapstudio-browser-ui/src/main/java/org/apache/directory/ldapstudio/browser/ui/wizards/NewEntryWizard.java
Wed Mar 14 14:54:11 2007
@@ -85,8 +85,8 @@
      */
     public NewEntryWizard()
     {
-        super.setWindowTitle( "New Entry" );
-        super.setNeedsProgressMonitor( true );
+        setWindowTitle( "New Entry" );
+        setNeedsProgressMonitor( true );
     }
 
 
@@ -217,11 +217,11 @@
         protected DummyWizardPage()
         {
             super( "" );
-            super.setTitle( "No connection selected or connection is closed" );
-            super.setDescription( "In order to use the entry creation wizard please select
an opened connection." );
-            super.setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor(
+            setTitle( "No connection selected or connection is closed" );
+            setDescription( "In order to use the entry creation wizard please select an opened
connection." );
+            setImageDescriptor( BrowserUIPlugin.getDefault().getImageDescriptor(
                 BrowserUIConstants.IMG_ENTRY_WIZARD ) );
-            super.setPageComplete( true );
+            setPageComplete( true );
         }
 
 



Mime
View raw message