Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/DatabaseReconnectWizardPage.java')
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/DatabaseReconnectWizardPage.java19
1 files changed, 12 insertions, 7 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/DatabaseReconnectWizardPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/DatabaseReconnectWizardPage.java
index 5344c188b7..80509f9f86 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/DatabaseReconnectWizardPage.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/DatabaseReconnectWizardPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2008 Oracle. All rights reserved.
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v1.0, which accompanies this distribution
* and is available at http://www.eclipse.org/legal/epl-v10.html.
@@ -121,6 +121,7 @@ public class DatabaseReconnectWizardPage extends WizardPage {
generateEntitiesWizard.updatePossibleTables( CollectionTools.collection( schema.tables()));
}
+ @Override
public void dispose() {
this.removeConnectionListener();
super.dispose();
@@ -137,13 +138,12 @@ public class DatabaseReconnectWizardPage extends WizardPage {
ConnectionProfile getProjectConnectionProfile() {
- String profileName = this.jpaProject.dataSource().getConnectionProfileName();
+ String profileName = this.jpaProject.dataSource().connectionProfileName();
return JptDbPlugin.getDefault().getConnectionProfileRepository().profileNamed( profileName);
}
Schema getDefaultSchema() {
- ConnectionProfile profile = getProjectConnectionProfile();
- return profile.getDatabase().schemaNamed( profile.getDefaultSchema());
+ return getProjectConnectionProfile().defaultSchema();
}
// ********** member classes **********
@@ -168,10 +168,12 @@ public class DatabaseReconnectWizardPage extends WizardPage {
createLabel( this.group, 1, JptUiMessages.DatabaseReconnectWizardPage_connection);
this.connectionCombo = createCombo( this.group, true);
this.connectionCombo.addSelectionListener( new SelectionAdapter() {
+ @Override
public void widgetDefaultSelected( SelectionEvent e) {
widgetSelected( e);
}
+ @Override
public void widgetSelected( SelectionEvent e) {
handleConnectionChange();
}
@@ -179,10 +181,12 @@ public class DatabaseReconnectWizardPage extends WizardPage {
createLabel( this.group, 1, JptUiMessages.DatabaseReconnectWizardPage_schema);
this.schemaCombo = createCombo( this.group, true);
this.schemaCombo.addSelectionListener( new SelectionAdapter() {
+ @Override
public void widgetDefaultSelected( SelectionEvent e) {
widgetSelected( e);
}
+ @Override
public void widgetSelected( SelectionEvent e) {
handleSchemaChange();
}
@@ -194,6 +198,7 @@ public class DatabaseReconnectWizardPage extends WizardPage {
this.addConnectionLink.setLayoutData( data);
this.addConnectionLink.setText( JptUiMessages.DatabaseReconnectWizardPage_addConnectionLink);
this.addConnectionLink.addSelectionListener( new SelectionAdapter() {
+ @Override
public void widgetSelected( SelectionEvent e) {
openNewConnectionWizard();
}
@@ -205,6 +210,7 @@ public class DatabaseReconnectWizardPage extends WizardPage {
this.reconnectLink.setText( JptUiMessages.DatabaseReconnectWizardPage_reconnectLink);
this.reconnectLink.setEnabled( false);
this.reconnectLink.addSelectionListener( new SelectionAdapter() {
+ @Override
public void widgetSelected( SelectionEvent e) {
openConnectionProfileNamed( connectionCombo.getText());
}
@@ -222,12 +228,11 @@ public class DatabaseReconnectWizardPage extends WizardPage {
}
private String getProjectConnectionProfileName() {
- return jpaProject.dataSource().getConnectionProfileName();
+ return jpaProject.dataSource().connectionProfileName();
}
Schema getDefaultSchema() {
- ConnectionProfile profile = getProjectConnectionProfile();
- return profile.getDatabase().schemaNamed( profile.getDefaultSchema());
+ return getProjectConnectionProfile().defaultSchema();
}
private void openConnectionProfileNamed( String connectionProfileName) {

Back to the top