X-Git-Url: http://secure.phpeclipse.com diff --git a/archive/net.sourceforge.phpeclipse.sql/src/net/sourceforge/phpdt/sql/wizards/BookmarkWizard.java b/archive/net.sourceforge.phpeclipse.sql/src/net/sourceforge/phpdt/sql/wizards/BookmarkWizard.java index 71d1112..9bdf6db 100644 --- a/archive/net.sourceforge.phpeclipse.sql/src/net/sourceforge/phpdt/sql/wizards/BookmarkWizard.java +++ b/archive/net.sourceforge.phpeclipse.sql/src/net/sourceforge/phpdt/sql/wizards/BookmarkWizard.java @@ -1,11 +1,13 @@ package net.sourceforge.phpdt.sql.wizards; import net.sourceforge.phpdt.sql.IConstants; +import net.sourceforge.phpdt.sql.PHPEclipseSQLPlugin; import net.sourceforge.phpdt.sql.adapters.AdapterFactory; import net.sourceforge.phpdt.sql.adapters.DriverInfo; import net.sourceforge.phpdt.sql.view.BookmarkView; import net.sourceforge.phpdt.sql.view.bookmark.BookmarkNode; +import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.jface.wizard.Wizard; import org.eclipse.jface.wizard.WizardPage; import org.eclipse.swt.SWT; @@ -32,6 +34,7 @@ public class BookmarkWizard extends Wizard implements IConstants { this.current = selection; setWindowTitle("New Bookmark"); } + public void init() { if (DEBUG) { System.out.println("Initing workbench"); @@ -39,6 +42,7 @@ public class BookmarkWizard extends Wizard implements IConstants { current = null; setWindowTitle("New Bookmark"); } + public boolean performFinish() { if (DEBUG) { System.out.println("perform finish workbench"); @@ -46,6 +50,7 @@ public class BookmarkWizard extends Wizard implements IConstants { mainPage.performFinish(); return true; } + public void addPages() { if (DEBUG) { System.out.println("adding pages"); @@ -230,6 +235,23 @@ class BookmarkPage extends WizardPage implements IConstants { type.select(selectedIndex); driverFile.setText(initialData.getDriverFile()); updateDriverList(); + } else { + + IPreferenceStore fStore = + PHPEclipseSQLPlugin.getDefault().getPreferenceStore(); + username.setText(fStore.getString("phpeclipse.sql.username.connect")); + connect.setText(fStore.getString("phpeclipse.sql.connect.connect")); + driver.setText(fStore.getString("phpeclipse.sql.driver.connect")); + String typeData = fStore.getString("phpeclipse.sql.type.connect"); + int selectedIndex = 0; + for (int i = 0; i < drivers.length; i++) { + if (typeData.equals(drivers[i].getDisplayName())) { + selectedIndex = i; + } + } + type.select(selectedIndex); + driverFile.setText(fStore.getString("phpeclipse.sql.filename.connect")); + // updateDriverList(); } setControl(container);