summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNan Li2012-09-11 18:16:31 (EDT)
committer Neil Hauge2012-09-11 18:16:31 (EDT)
commit55d5c5f275271bbe6df3787b1d6465fc572548c6 (patch)
tree0ae4a56b065298ab058a07b98f4197db31e2c207
parent1eea2aa4b8a346a9f1b2c26685b571667720bb89 (diff)
downloadwebtools.dali-55d5c5f275271bbe6df3787b1d6465fc572548c6.zip
webtools.dali-55d5c5f275271bbe6df3787b1d6465fc572548c6.tar.gz
webtools.dali-55d5c5f275271bbe6df3787b1d6465fc572548c6.tar.bz2
364093 - Revert some earlier changes to support tables outside the scope
of generation.
-rw-r--r--jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/AssociationTablesPage.java17
1 files changed, 2 insertions, 15 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/AssociationTablesPage.java b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/AssociationTablesPage.java
index 74e2573..d0411aa 100644
--- a/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/AssociationTablesPage.java
+++ b/jpa/plugins/org.eclipse.jpt.jpa.ui/src/org/eclipse/jpt/jpa/ui/internal/wizards/gen/AssociationTablesPage.java
@@ -13,13 +13,9 @@ package org.eclipse.jpt.jpa.ui.internal.wizards.gen;
import static org.eclipse.jpt.jpa.ui.internal.wizards.gen.SWTUtil.createButton;
import static org.eclipse.jpt.jpa.ui.internal.wizards.gen.SWTUtil.createLabel;
import static org.eclipse.jpt.jpa.ui.internal.wizards.gen.SWTUtil.createText;
-
-import java.util.ArrayList;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.resource.ResourceManager;
import org.eclipse.jpt.common.utility.internal.CollectionTools;
-import org.eclipse.jpt.jpa.db.Schema;
-import org.eclipse.jpt.jpa.db.Table;
import org.eclipse.jpt.jpa.gen.internal.Association;
import org.eclipse.jpt.jpa.gen.internal.ORMGenCustomizer;
import org.eclipse.jpt.jpa.ui.internal.ImageRepository;
@@ -34,7 +30,6 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Text;
@@ -152,7 +147,7 @@ public class AssociationTablesPage extends NewAssociationWizardPage {
public void widgetDefaultSelected(SelectionEvent e) {}
public void widgetSelected(SelectionEvent e) {
- SelectTableDialog dlg = new SelectTableDialog( SWTUtil.getShell(), resourceManager, customizer.getSchema() );
+ SelectTableDialog dlg = new SelectTableDialog( SWTUtil.getShell(), resourceManager, customizer.getTableNames() );
if( dlg.open() == Dialog.OK){
joinTableTextField.setText( dlg.getSelectedTable() );
getWizardDataModel().put( NewAssociationWizard.ASSOCIATION_JOIN_TABLE, joinTableTextField.getText() );
@@ -230,17 +225,9 @@ public class AssociationTablesPage extends NewAssociationWizardPage {
}
private String buildJoinTableErrorMessage() {
- if (!CollectionTools.contains(this.getAllTableNames(this.customizer.getSchema()), this.joinTableTextField.getText())) {
+ if (!CollectionTools.contains(this.customizer.getTableNames(), this.joinTableTextField.getText())) {
return NLS.bind(JptUiEntityGenMessages.GenerateEntitiesWizard_newAssoc_tablesPage_nonexsistent_join_table, this.joinTableTextField.getText());
}
return null;
}
-
- protected ArrayList<String> getAllTableNames(Schema schema) {
- ArrayList<String> list = new ArrayList<String>();
- for (Table table : schema.getTables()) {
- list.add(table.getName());
- }
- return list;
- }
}