intial source from http://www.sf.net/projects/wdte
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / wizards / BookmarkConnectionWizardPage.java
index 36a4077..e76daaf 100644 (file)
@@ -33,6 +33,7 @@ class BookmarkConnectionWizardPage extends PropertyChangeWizardPage {
     private Text jdbcUrl;
     private URLSetupControl urlSetupControl;
     private Composite container;
+    private boolean requiresRebuild = false;
     
     private PropertyChangeListener listener = new PropertyChangeListener() {
                public void propertyChange(PropertyChangeEvent event) {
@@ -110,6 +111,13 @@ class BookmarkConnectionWizardPage extends PropertyChangeWizardPage {
                setControl(container);
        }
        
+       public void setVisible(boolean visible) {
+               if (visible && this.requiresRebuild) {
+                       rebuildJDBCControls(this.driver);
+               }
+               super.setVisible(visible);
+       }
+       
        /**
         * @param container
         */
@@ -145,7 +153,7 @@ class BookmarkConnectionWizardPage extends PropertyChangeWizardPage {
                
                if (oldDriverClassName == null 
                                || !oldDriverClassName.equals(this.driver.getClassName())) {
-                       rebuildJDBCControls(this.driver);
+                       this.requiresRebuild = true;
                }
        }
        /**