288027 - Adding product customization pref for ignoring synonyms in Dali. Also updated plugin and feature versions for 2.2.2.
diff --git a/jpa/features/org.eclipse.jpt.eclipselink.feature/feature.xml b/jpa/features/org.eclipse.jpt.eclipselink.feature/feature.xml
index 27832cf..0402ba0 100644
--- a/jpa/features/org.eclipse.jpt.eclipselink.feature/feature.xml
+++ b/jpa/features/org.eclipse.jpt.eclipselink.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jpt.eclipselink.feature"
label="%featureName"
- version="2.2.1.qualifier"
+ version="2.2.2.qualifier"
provider-name="%providerName"
plugin="org.eclipse.jpt.eclipselink.branding">
@@ -25,7 +25,7 @@
</url>
<requires>
- <import feature="org.eclipse.jpt.feature" version="2.2.1"/>
+ <import feature="org.eclipse.jpt.feature" version="2.2.2"/>
</requires>
<plugin
diff --git a/jpa/features/org.eclipse.jpt.eclipselink_sdk.feature/feature.xml b/jpa/features/org.eclipse.jpt.eclipselink_sdk.feature/feature.xml
index ea77449..57341bf 100644
--- a/jpa/features/org.eclipse.jpt.eclipselink_sdk.feature/feature.xml
+++ b/jpa/features/org.eclipse.jpt.eclipselink_sdk.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jpt.eclipselink_sdk.feature"
label="%featureName"
- version="2.2.1.qualifier"
+ version="2.2.2.qualifier"
provider-name="%providerName">
<description>
diff --git a/jpa/features/org.eclipse.jpt.feature/feature.xml b/jpa/features/org.eclipse.jpt.feature/feature.xml
index 3241639..7633215 100644
--- a/jpa/features/org.eclipse.jpt.feature/feature.xml
+++ b/jpa/features/org.eclipse.jpt.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jpt.feature"
label="%featureName"
- version="2.2.1.qualifier"
+ version="2.2.2.qualifier"
provider-name="%providerName"
plugin="org.eclipse.jpt.branding">
diff --git a/jpa/features/org.eclipse.jpt.tests.feature/feature.xml b/jpa/features/org.eclipse.jpt.tests.feature/feature.xml
index 7025730..911b9ab 100644
--- a/jpa/features/org.eclipse.jpt.tests.feature/feature.xml
+++ b/jpa/features/org.eclipse.jpt.tests.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jpt.tests.feature"
label="Dali Java Persistence Tools JUnit Tests"
- version="2.2.1.qualifier"
+ version="2.2.2.qualifier"
provider-name="Eclipse.org">
<description>
diff --git a/jpa/features/org.eclipse.jpt_sdk.feature/feature.xml b/jpa/features/org.eclipse.jpt_sdk.feature/feature.xml
index 9d1b183..5fe8f27 100644
--- a/jpa/features/org.eclipse.jpt_sdk.feature/feature.xml
+++ b/jpa/features/org.eclipse.jpt_sdk.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.jpt_sdk.feature"
label="%featureName"
- version="2.2.1.qualifier"
+ version="2.2.2.qualifier"
provider-name="%providerName">
<description>
diff --git a/jpa/plugins/org.eclipse.jpt.branding/META-INF/MANIFEST.MF b/jpa/plugins/org.eclipse.jpt.branding/META-INF/MANIFEST.MF
index 655e6b8..ef1f11d 100644
--- a/jpa/plugins/org.eclipse.jpt.branding/META-INF/MANIFEST.MF
+++ b/jpa/plugins/org.eclipse.jpt.branding/META-INF/MANIFEST.MF
@@ -2,6 +2,6 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jpt.branding;singleton:=true
-Bundle-Version: 2.2.1.qualifier
+Bundle-Version: 2.2.2.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %providerName
diff --git a/jpa/plugins/org.eclipse.jpt.db/META-INF/MANIFEST.MF b/jpa/plugins/org.eclipse.jpt.db/META-INF/MANIFEST.MF
index 383e94e..877f384 100644
--- a/jpa/plugins/org.eclipse.jpt.db/META-INF/MANIFEST.MF
+++ b/jpa/plugins/org.eclipse.jpt.db/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.jpt.db
-Bundle-Version: 1.2.101.qualifier
+Bundle-Version: 1.2.102.qualifier
Bundle-Activator: org.eclipse.jpt.db.JptDbPlugin
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/DTPSchemaWrapper.java b/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/DTPSchemaWrapper.java
index 0fb39f0..6fe63a6 100644
--- a/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/DTPSchemaWrapper.java
+++ b/jpa/plugins/org.eclipse.jpt.db/src/org/eclipse/jpt/db/internal/DTPSchemaWrapper.java
@@ -10,8 +10,14 @@
package org.eclipse.jpt.db.internal;
import com.ibm.icu.text.Collator;
+
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.datatools.modelbase.sql.tables.SQLTablesPackage;
+
import org.eclipse.jpt.db.Schema;
import org.eclipse.jpt.db.Sequence;
import org.eclipse.jpt.db.Table;
@@ -35,7 +41,12 @@
// lazy-initialized
private DTPSequenceWrapper[] sequences;
+ // ********** constants **********
+
+ //used for adopter product customization
+ private static final String PERSISTENT_AND_VIEW_TABLES_ONLY = "supportPersistentAndViewTablesOnly";
+
// ********** constructor **********
DTPSchemaWrapper(DTPSchemaContainerWrapper container, org.eclipse.datatools.modelbase.sql.schema.Schema dtpSchema) {
@@ -92,7 +103,27 @@
// minimize scope of suppressed warnings
@SuppressWarnings("unchecked")
private List<org.eclipse.datatools.modelbase.sql.tables.Table> getDTPTables() {
- return this.dtpSchema.getTables();
+
+ //if product customization flag is set to true return only persistent and view tables.
+ //this will filter out synonyms where they are not fully supported and potentially other
+ //problematic table types - see bug 269057
+ String supportPersistentAndViewTablesOnly = Platform.getProduct().getProperty(PERSISTENT_AND_VIEW_TABLES_ONLY);
+ if ( supportPersistentAndViewTablesOnly != null && supportPersistentAndViewTablesOnly.equals("true") ) {
+ List<org.eclipse.datatools.modelbase.sql.tables.Table> result =
+ new ArrayList<org.eclipse.datatools.modelbase.sql.tables.Table>();
+ for (Iterator iterT = this.dtpSchema.getTables().iterator();iterT.hasNext();) {
+ org.eclipse.datatools.modelbase.sql.tables.Table table
+ = (org.eclipse.datatools.modelbase.sql.tables.Table) iterT.next();
+ if (SQLTablesPackage.eINSTANCE.getPersistentTable().isSuperTypeOf(table.eClass()) ||
+ SQLTablesPackage.eINSTANCE.getViewTable().isSuperTypeOf(table.eClass()) ) {
+ result.add(table);
+ }
+ }
+ return result;
+ }
+ else {
+ return this.dtpSchema.getTables();
+ }
}
public int tablesSize() {
diff --git a/jpa/plugins/org.eclipse.jpt.eclipselink.branding/META-INF/MANIFEST.MF b/jpa/plugins/org.eclipse.jpt.eclipselink.branding/META-INF/MANIFEST.MF
index 6f20f96..2363103 100644
--- a/jpa/plugins/org.eclipse.jpt.eclipselink.branding/META-INF/MANIFEST.MF
+++ b/jpa/plugins/org.eclipse.jpt.eclipselink.branding/META-INF/MANIFEST.MF
@@ -2,6 +2,6 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jpt.eclipselink.branding;singleton:=true
-Bundle-Version: 2.2.1.qualifier
+Bundle-Version: 2.2.2.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %providerName
diff --git a/jpa/plugins/org.eclipse.jpt.ui/META-INF/MANIFEST.MF b/jpa/plugins/org.eclipse.jpt.ui/META-INF/MANIFEST.MF
index af23cc1..2aabd4e 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/META-INF/MANIFEST.MF
+++ b/jpa/plugins/org.eclipse.jpt.ui/META-INF/MANIFEST.MF
@@ -3,7 +3,7 @@
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-SymbolicName: org.eclipse.jpt.ui;singleton:=true
-Bundle-Version: 2.2.1.qualifier
+Bundle-Version: 2.2.2.qualifier
Bundle-Activator: org.eclipse.jpt.ui.JptUiPlugin
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .