Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpfullbright2010-09-28 16:26:18 -0400
committerpfullbright2010-09-28 16:26:18 -0400
commitd78c7e45fdd1fa8abbe7fb8b310c37c66ffd1543 (patch)
treea62e5404d97ebafa2104360fa5fb5f8313e1fa3f
parent75e1c5d953f160acf6f8cece28970a39245925c5 (diff)
downloadwebtools.dali-d78c7e45fdd1fa8abbe7fb8b310c37c66ffd1543.tar.gz
webtools.dali-d78c7e45fdd1fa8abbe7fb8b310c37c66ffd1543.tar.xz
webtools.dali-d78c7e45fdd1fa8abbe7fb8b310c37c66ffd1543.zip
jpt changes to accommodate jaxb
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatform.java8
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatform.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetActionDelegate.java10
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetDataModelProperties.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDataModelProvider.java7
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetUninstallDelegate.java3
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetVersionChangeDataModelProvider.java23
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/libprov/JptLibraryProviderInstallOperationConfig.java21
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/libprov/JptOsgiBundlesLibraryProviderInstallOperationConfig.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/libprov/JptUserLibraryProviderInstallOperationConfig.java43
-rw-r--r--jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/JpaFacetActionPage.java6
-rw-r--r--jpa/plugins/org.eclipse.jpt.utility/META-INF/MANIFEST.MF2
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/ContextModelTestCase.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/JpaProjectTests.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/Generic2_0ContextModelTestCase.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/persistence/Generic2_0PersistenceUnitTests.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/platform/JpaPlatformExtensionTests.java5
-rw-r--r--jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/platform/JpaPlatformTests.java7
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/EclipseLinkContextModelTestCase.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/persistence/EclipseLinkPersistenceUnitTestCase.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_1/core/tests/internal/context/EclipseLink1_1ContextModelTestCase.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_2/core/tests/internal/context/EclipseLink1_2ContextModelTestCase.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/EclipseLink2_0ContextModelTestCase.java2
-rw-r--r--jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/persistence/EclipseLink2_0PersistenceUnitTestCase.java2
24 files changed, 167 insertions, 43 deletions
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatform.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatform.java
index f9ede889cd..a6cb7f88e3 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatform.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/JpaPlatform.java
@@ -18,6 +18,7 @@ import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
import org.eclipse.jpt.core.context.java.NullDefaultJavaAttributeMappingDefinition;
import org.eclipse.jpt.core.context.java.NullJavaTypeMappingDefinition;
import org.eclipse.jpt.core.context.java.NullSpecifiedJavaAttributeMappingDefinition;
+import org.eclipse.jpt.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
import org.eclipse.jpt.db.ConnectionProfileFactory;
@@ -42,7 +43,7 @@ import org.eclipse.jpt.db.ConnectionProfileFactory;
* @see JpaPlatformFactory
* @see JpaPlatformProvider
*
- * @version 2.3
+ * @version 3.0
* @since 2.0
*/
public interface JpaPlatform
@@ -53,6 +54,11 @@ public interface JpaPlatform
String getId();
/**
+ * Return the description for this platform
+ */
+ JpaPlatformDescription getDescription();
+
+ /**
* Get the version object for this platform.
*/
Version getJpaVersion();
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatform.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatform.java
index 4de5f202f5..57da85e230 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatform.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/GenericJpaPlatform.java
@@ -23,6 +23,7 @@ import org.eclipse.jpt.core.JpaProject;
import org.eclipse.jpt.core.JpaResourceModel;
import org.eclipse.jpt.core.JpaResourceModelProvider;
import org.eclipse.jpt.core.JpaResourceType;
+import org.eclipse.jpt.core.JptCorePlugin;
import org.eclipse.jpt.core.ResourceDefinition;
import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
import org.eclipse.jpt.core.context.java.JavaPersistentAttribute;
@@ -30,6 +31,7 @@ import org.eclipse.jpt.core.context.java.JavaPersistentType;
import org.eclipse.jpt.core.context.java.JavaTypeMappingDefinition;
import org.eclipse.jpt.core.internal.utility.PlatformTools;
import org.eclipse.jpt.core.internal.utility.jdt.DefaultAnnotationEditFormatter;
+import org.eclipse.jpt.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.core.utility.jdt.AnnotationEditFormatter;
import org.eclipse.jpt.db.ConnectionProfileFactory;
import org.eclipse.jpt.db.JptDbPlugin;
@@ -71,6 +73,10 @@ public class GenericJpaPlatform
return this.id;
}
+ public JpaPlatformDescription getDescription() {
+ return JptCorePlugin.getJpaPlatformManager().getJpaPlatform(getId());
+ }
+
public Version getJpaVersion() {
return this.jpaVersion;
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetActionDelegate.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetActionDelegate.java
index 3daaad7cb8..b91372feaf 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetActionDelegate.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetActionDelegate.java
@@ -15,6 +15,7 @@ import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.SubMonitor;
import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.platform.JpaPlatformDescription;
import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IDelegate;
@@ -39,14 +40,11 @@ public abstract class JpaFacetActionDelegate
SubMonitor subMonitor = SubMonitor.convert(monitor, 7);
- // NB: WTP Natures (including the JavaEMFNature)
- // should already be added, as this facet should
- // always coexist with a module facet.
-
IDataModel dataModel = (IDataModel) config;
// project settings
- JptCorePlugin.setJpaPlatformId(project, dataModel.getStringProperty(PLATFORM_ID));
+ JpaPlatformDescription platform = (JpaPlatformDescription) dataModel.getProperty(PLATFORM);
+ JptCorePlugin.setJpaPlatformId(project, platform.getId());
subMonitor.worked(1);
// do NOT use IDataModel.getStringProperty(String) - or the connection profile name can
@@ -68,7 +66,7 @@ public abstract class JpaFacetActionDelegate
subMonitor.worked(1);
// defaults settings
- JptCorePlugin.setDefaultJpaPlatformId(fv.getVersionString(), dataModel.getStringProperty(PLATFORM_ID));
+ JptCorePlugin.setDefaultJpaPlatformId(fv.getVersionString(), platform.getId());
subMonitor.worked(1);
//Delegate to LibraryInstallDelegate to configure the project classpath
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetDataModelProperties.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetDataModelProperties.java
index 4b3eb38bf5..4c2c6e051e 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetDataModelProperties.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetDataModelProperties.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle.
+ * Copyright (c) 2009, 2010 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
@@ -26,9 +26,9 @@ public interface JpaFacetDataModelProperties
String RUNTIME = PREFIX_ + "RUNTIME";
/**
- * Required, type String, identifies Jpa Platform
+ * Required, type JpaPlatformDescription, identifies Jpa Platform
*/
- String PLATFORM_ID = PREFIX_ + "PLATFORM_ID";
+ String PLATFORM = PREFIX_ + "PLATFORM";
/**
* Required, type LibraryInstallDelegate, the library install delegate used to configure JPA provider library
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDataModelProvider.java
index 70a12f93f9..c576475364 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDataModelProvider.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetInstallDataModelProvider.java
@@ -12,6 +12,7 @@ package org.eclipse.jpt.core.internal.facet;
import java.util.Set;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.db.ConnectionProfile;
import org.eclipse.jpt.db.Database;
import org.eclipse.jpt.db.SchemaContainer;
@@ -83,8 +84,8 @@ public class JpaFacetInstallDataModelProvider
}
@Override
- protected String getDefaultPlatformId() {
- return JptCorePlugin.getDefaultJpaPlatform(getProjectFacetVersion()).getId();
+ protected JpaPlatformDescription getDefaultPlatform() {
+ return JptCorePlugin.getDefaultJpaPlatform(getProjectFacetVersion());
}
@Override
@@ -159,7 +160,7 @@ public class JpaFacetInstallDataModelProvider
@Override
public DataModelPropertyDescriptor[] getValidPropertyDescriptors(String propertyName) {
- if (propertyName.equals(PLATFORM_ID)) {
+ if (propertyName.equals(PLATFORM)) {
return this.buildValidPlatformDescriptors();
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetUninstallDelegate.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetUninstallDelegate.java
index acdfa2dff5..f4c83701af 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetUninstallDelegate.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetUninstallDelegate.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2007 Oracle. All rights reserved.
+ * Copyright (c) 2006, 2010 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.
@@ -27,5 +27,4 @@ public class JpaFacetUninstallDelegate
// it is required by the facet extension point action element, and that
// is required by the facet UI to allow uninstallation of this facet.
}
-
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetVersionChangeDataModelProvider.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetVersionChangeDataModelProvider.java
index 3efb401b89..c00035caf9 100644
--- a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetVersionChangeDataModelProvider.java
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/facet/JpaFacetVersionChangeDataModelProvider.java
@@ -49,8 +49,8 @@ public class JpaFacetVersionChangeDataModelProvider
// **************** defaults **********************************************
@Override
- protected String getDefaultPlatformId() {
- return getJpaProject().getJpaPlatform().getId();
+ protected JpaPlatformDescription getDefaultPlatform() {
+ return getJpaProject().getJpaPlatform().getDescription();
}
@Override
@@ -87,25 +87,24 @@ public class JpaFacetVersionChangeDataModelProvider
// **************** valid property descriptors ****************************
@Override
- protected Iterable<String> buildValidPlatformIds() {
- // add existing platform id to list of choices
- Iterable<String> validPlatformIds = super.buildValidPlatformIds();
- if (! CollectionTools.contains(validPlatformIds, getDefaultPlatformId())) {
- validPlatformIds = new CompositeIterable(getDefaultPlatformId(), validPlatformIds);
+ protected Iterable<JpaPlatformDescription> buildValidPlatformDescriptions() {
+ // add existing platform to list of choices
+ Iterable<JpaPlatformDescription> validPlatformDescs = super.buildValidPlatformDescriptions();
+ if (! CollectionTools.contains(validPlatformDescs, getDefaultPlatform())) {
+ validPlatformDescs = new CompositeIterable(getDefaultPlatform(), validPlatformDescs);
}
- return validPlatformIds;
+ return validPlatformDescs;
}
// **************** validation ********************************************
@Override
- protected IStatus validatePlatformId() {
- IStatus status = super.validatePlatformId();
+ protected IStatus validatePlatform() {
+ IStatus status = super.validatePlatform();
if (status.isOK()) {
- JpaPlatformDescription platform = JptCorePlugin.getJpaPlatformManager().getJpaPlatform(getPlatformId());
- if (! platform.supportsJpaFacetVersion(getProjectFacetVersion())) {
+ if (! getPlatform().supportsJpaFacetVersion(getProjectFacetVersion())) {
status = PLATFORM_DOES_NOT_SUPPORT_FACET_VERSION_STATUS;
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/libprov/JptLibraryProviderInstallOperationConfig.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/libprov/JptLibraryProviderInstallOperationConfig.java
new file mode 100644
index 0000000000..f1861e8a3a
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/libprov/JptLibraryProviderInstallOperationConfig.java
@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.libprov;
+
+import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
+import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
+
+
+public interface JptLibraryProviderInstallOperationConfig {
+
+ ILibraryProvider getLibraryProvider();
+
+ IProjectFacetVersion getProjectFacetVersion();
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/libprov/JptOsgiBundlesLibraryProviderInstallOperationConfig.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/libprov/JptOsgiBundlesLibraryProviderInstallOperationConfig.java
new file mode 100644
index 0000000000..490334ca91
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/libprov/JptOsgiBundlesLibraryProviderInstallOperationConfig.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.libprov;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.libval.LibraryValidator;
+
+
+public abstract class JptOsgiBundlesLibraryProviderInstallOperationConfig
+ extends TempWtpOsgiBundlesLibraryProviderInstallOperationConfig
+ implements JptLibraryProviderInstallOperationConfig {
+
+ protected JptOsgiBundlesLibraryProviderInstallOperationConfig() {
+ super();
+ }
+
+
+ @Override
+ public synchronized IStatus validate() {
+ IStatus status = super.validate();
+ if (! status.isOK()) {
+ return status;
+ }
+
+ for (LibraryValidator libraryValidator : JptCorePlugin.getLibraryValidators(this)) {
+ status = libraryValidator.validate(this);
+ if (! status.isOK()) {
+ return status;
+ }
+ }
+
+ return Status.OK_STATUS;
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/libprov/JptUserLibraryProviderInstallOperationConfig.java b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/libprov/JptUserLibraryProviderInstallOperationConfig.java
new file mode 100644
index 0000000000..d798cf030f
--- /dev/null
+++ b/jpa/plugins/org.eclipse.jpt.core/src/org/eclipse/jpt/core/internal/libprov/JptUserLibraryProviderInstallOperationConfig.java
@@ -0,0 +1,43 @@
+/*******************************************************************************
+ * Copyright (c) 2010 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
+ *
+ * Contributors:
+ * Oracle - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.jpt.core.internal.libprov;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.jpt.core.JptCorePlugin;
+import org.eclipse.jpt.core.libval.LibraryValidator;
+
+
+public abstract class JptUserLibraryProviderInstallOperationConfig
+ extends TempWtpUserLibraryProviderInstallOperationConfig
+ implements JptLibraryProviderInstallOperationConfig {
+
+ protected JptUserLibraryProviderInstallOperationConfig() {
+ super();
+ }
+
+
+ @Override
+ public synchronized IStatus validate() {
+ IStatus status = super.validate();
+ if (! status.isOK()) {
+ return status;
+ }
+
+ for (LibraryValidator libraryValidator : JptCorePlugin.getLibraryValidators(this)) {
+ status = libraryValidator.validate(this);
+ if (! status.isOK()) {
+ return status;
+ }
+ }
+
+ return Status.OK_STATUS;
+ }
+}
diff --git a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/JpaFacetActionPage.java b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/JpaFacetActionPage.java
index 950d2e7ad7..05a5bf7924 100644
--- a/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/JpaFacetActionPage.java
+++ b/jpa/plugins/org.eclipse.jpt.ui/src/org/eclipse/jpt/ui/internal/wizards/JpaFacetActionPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2009 Oracle.
+ * Copyright (c) 2009, 2010 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
@@ -104,7 +104,7 @@ public abstract class JpaFacetActionPage
@Override
protected String[] getValidationPropertyNames() {
return new String[] {
- PLATFORM_ID,
+ PLATFORM,
CONNECTION,
USER_WANTS_TO_OVERRIDE_DEFAULT_CATALOG,
USER_OVERRIDE_DEFAULT_CATALOG,
@@ -157,7 +157,7 @@ public abstract class JpaFacetActionPage
PlatformUI.getWorkbench().getHelpSystem().setHelp(group, JpaHelpContextIds.DIALOG_JPA_PLATFORM);
platformCombo = createCombo(group, 1, true);
- synchHelper.synchCombo(platformCombo, PLATFORM_ID, null);
+ synchHelper.synchCombo(platformCombo, PLATFORM, null);
}
}
diff --git a/jpa/plugins/org.eclipse.jpt.utility/META-INF/MANIFEST.MF b/jpa/plugins/org.eclipse.jpt.utility/META-INF/MANIFEST.MF
index 54e340eabe..26641f1b28 100644
--- a/jpa/plugins/org.eclipse.jpt.utility/META-INF/MANIFEST.MF
+++ b/jpa/plugins/org.eclipse.jpt.utility/META-INF/MANIFEST.MF
@@ -12,6 +12,7 @@ Export-Package: org.eclipse.jpt.utility,
org.eclipse.jpt.db,
org.eclipse.jpt.db.ui,
org.eclipse.jpt.gen,
+ org.eclipse.jpt.jaxb.core,
org.eclipse.jpt.jaxb.ui,
org.eclipse.jpt.ui",
org.eclipse.jpt.utility.internal.enumerations;
@@ -25,6 +26,7 @@ Export-Package: org.eclipse.jpt.utility,
org.eclipse.jpt.db,
org.eclipse.jpt.db.ui,
org.eclipse.jpt.gen,
+ org.eclipse.jpt.jaxb.core,
org.eclipse.jpt.jaxb.ui,
org.eclipse.jpt.ui",
org.eclipse.jpt.utility.internal.iterators;
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/ContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/ContextModelTestCase.java
index 16bb406415..9eba2e15a4 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/ContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/ContextModelTestCase.java
@@ -91,7 +91,7 @@ public abstract class ContextModelTestCase extends AnnotationTestCase
// default facet version is 2.0 - most tests use 1.0
dataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, JpaFacet.VERSION_1_0.getVersionString());
// most tests use the basic generic platform
- dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM_ID, GenericPlatform.VERSION_1_0.getId());
+ dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM, GenericPlatform.VERSION_1_0);
// most tests do use an orm.xml
dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
return dataModel;
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/JpaProjectTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/JpaProjectTests.java
index 8b647ee591..cc91c15fbe 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/JpaProjectTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/context/JpaProjectTests.java
@@ -48,7 +48,7 @@ public class JpaProjectTests extends TestCase
protected IDataModel buildJpaConfigDataModel() {
IDataModel dataModel = DataModelFactory.createDataModel(new JpaFacetInstallDataModelProvider());
dataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, JpaFacet.VERSION_1_0.getVersionString());
- dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM_ID, GenericPlatform.VERSION_1_0.getId());
+ dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM, GenericPlatform.VERSION_1_0);
dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
return dataModel;
}
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/Generic2_0ContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/Generic2_0ContextModelTestCase.java
index bdf48e809e..37cbcc66da 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/Generic2_0ContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/Generic2_0ContextModelTestCase.java
@@ -28,7 +28,7 @@ public abstract class Generic2_0ContextModelTestCase extends ContextModelTestCas
protected IDataModel buildJpaConfigDataModel() {
IDataModel dataModel = super.buildJpaConfigDataModel();
dataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, JpaFacet.VERSION_2_0.getVersionString());
- dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM_ID, GenericPlatform.VERSION_2_0.getId());
+ dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM, GenericPlatform.VERSION_2_0);
dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
return dataModel;
}
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/persistence/Generic2_0PersistenceUnitTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/persistence/Generic2_0PersistenceUnitTests.java
index 14a6241311..67b814d8f8 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/persistence/Generic2_0PersistenceUnitTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/jpa2/context/persistence/Generic2_0PersistenceUnitTests.java
@@ -46,7 +46,7 @@ public abstract class Generic2_0PersistenceUnitTests extends PersistenceUnitTest
protected IDataModel buildJpaConfigDataModel() {
IDataModel dataModel = super.buildJpaConfigDataModel();
dataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, JpaFacet.VERSION_2_0.getVersionString());
- dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM_ID, GenericPlatform.VERSION_2_0.getId());
+ dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM, GenericPlatform.VERSION_2_0);
dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
return dataModel;
}
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/platform/JpaPlatformExtensionTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/platform/JpaPlatformExtensionTests.java
index 44a45a3c56..ca29b821bb 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/platform/JpaPlatformExtensionTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/platform/JpaPlatformExtensionTests.java
@@ -17,6 +17,7 @@ import org.eclipse.jpt.core.JpaFacet;
import org.eclipse.jpt.core.JptCorePlugin;
import org.eclipse.jpt.core.internal.facet.JpaFacetDataModelProperties;
import org.eclipse.jpt.core.internal.facet.JpaFacetInstallDataModelProvider;
+import org.eclipse.jpt.core.platform.JpaPlatformDescription;
import org.eclipse.jpt.core.tests.extension.resource.ExtensionTestPlugin;
import org.eclipse.jpt.core.tests.extension.resource.TestJpaPlatformProvider;
import org.eclipse.jpt.core.tests.internal.context.ContextModelTestCase;
@@ -31,6 +32,8 @@ import org.eclipse.wst.common.project.facet.core.IActionConfigFactory;
public class JpaPlatformExtensionTests extends ContextModelTestCase
{
public static final String TEST_PLATFORM_ID = TestJpaPlatformProvider.ID;
+ public static final JpaPlatformDescription TEST_PLATFORM_DESC =
+ JptCorePlugin.getJpaPlatformManager().getJpaPlatform(TEST_PLATFORM_ID);
public static final String TEST_PLATFORM_LABEL = "Test Jpa Platform";
protected TestJpaProject testProject;
@@ -54,7 +57,7 @@ public class JpaPlatformExtensionTests extends ContextModelTestCase
IActionConfigFactory configFactory = new JpaFacetInstallDataModelProvider();
IDataModel config = (IDataModel) configFactory.create();
config.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, JpaFacet.VERSION_1_0.getVersionString());
- config.setProperty(JpaFacetDataModelProperties.PLATFORM_ID, TEST_PLATFORM_ID);
+ config.setProperty(JpaFacetDataModelProperties.PLATFORM, TEST_PLATFORM_DESC);
return config;
}
diff --git a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/platform/JpaPlatformTests.java b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/platform/JpaPlatformTests.java
index b6a754db0f..9d0654778a 100644
--- a/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/platform/JpaPlatformTests.java
+++ b/jpa/tests/org.eclipse.jpt.core.tests/src/org/eclipse/jpt/core/tests/internal/platform/JpaPlatformTests.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2009 Oracle. All rights reserved.
+ * Copyright (c) 2007, 2010 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.
@@ -14,6 +14,7 @@ import java.util.Iterator;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jpt.core.JpaFacet;
import org.eclipse.jpt.core.JpaPlatform;
+import org.eclipse.jpt.core.JptCorePlugin;
import org.eclipse.jpt.core.MappingKeys;
import org.eclipse.jpt.core.context.java.JavaAttributeMapping;
import org.eclipse.jpt.core.context.java.JavaAttributeMappingDefinition;
@@ -72,7 +73,9 @@ public class JpaPlatformTests extends ContextModelTestCase
IActionConfigFactory configFactory = new JpaFacetInstallDataModelProvider();
IDataModel config = (IDataModel) configFactory.create();
config.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, JpaFacet.VERSION_1_0.getVersionString());
- config.setProperty(JpaFacetDataModelProperties.PLATFORM_ID, TestJpaPlatformProvider.ID);
+ config.setProperty(
+ JpaFacetDataModelProperties.PLATFORM,
+ JptCorePlugin.getJpaPlatformManager().getJpaPlatform(TestJpaPlatformProvider.ID));
return config;
}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/EclipseLinkContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/EclipseLinkContextModelTestCase.java
index aa9ecedcb3..02a8bb78b9 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/EclipseLinkContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/EclipseLinkContextModelTestCase.java
@@ -29,7 +29,7 @@ public abstract class EclipseLinkContextModelTestCase
@Override
protected IDataModel buildJpaConfigDataModel() {
IDataModel dataModel = super.buildJpaConfigDataModel();
- dataModel.setProperty(JpaFacetInstallDataModelProperties.PLATFORM_ID, EclipseLinkPlatform.VERSION_1_0.getId());
+ dataModel.setProperty(JpaFacetInstallDataModelProperties.PLATFORM, EclipseLinkPlatform.VERSION_1_0);
return dataModel;
}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/persistence/EclipseLinkPersistenceUnitTestCase.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/persistence/EclipseLinkPersistenceUnitTestCase.java
index 3ffd75489c..9b3bf424b5 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/persistence/EclipseLinkPersistenceUnitTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink/core/tests/internal/context/persistence/EclipseLinkPersistenceUnitTestCase.java
@@ -42,7 +42,7 @@ public abstract class EclipseLinkPersistenceUnitTestCase extends PersistenceUnit
@Override
protected IDataModel buildJpaConfigDataModel() {
IDataModel dataModel = super.buildJpaConfigDataModel();
- dataModel.setProperty(JpaFacetInstallDataModelProperties.PLATFORM_ID, EclipseLinkPlatform.VERSION_1_0.getId());
+ dataModel.setProperty(JpaFacetInstallDataModelProperties.PLATFORM, EclipseLinkPlatform.VERSION_1_0);
return dataModel;
}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_1/core/tests/internal/context/EclipseLink1_1ContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_1/core/tests/internal/context/EclipseLink1_1ContextModelTestCase.java
index 8ac5a5e8e2..a50fbb3334 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_1/core/tests/internal/context/EclipseLink1_1ContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_1/core/tests/internal/context/EclipseLink1_1ContextModelTestCase.java
@@ -26,7 +26,7 @@ public abstract class EclipseLink1_1ContextModelTestCase extends EclipseLinkCont
@Override
protected IDataModel buildJpaConfigDataModel() {
IDataModel dataModel = super.buildJpaConfigDataModel();
- dataModel.setProperty(JpaFacetInstallDataModelProperties.PLATFORM_ID, EclipseLinkPlatform.VERSION_1_1.getId());
+ dataModel.setProperty(JpaFacetInstallDataModelProperties.PLATFORM, EclipseLinkPlatform.VERSION_1_1);
dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
return dataModel;
}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_2/core/tests/internal/context/EclipseLink1_2ContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_2/core/tests/internal/context/EclipseLink1_2ContextModelTestCase.java
index 87e9ea866d..303eee18dd 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_2/core/tests/internal/context/EclipseLink1_2ContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink1_2/core/tests/internal/context/EclipseLink1_2ContextModelTestCase.java
@@ -27,7 +27,7 @@ public abstract class EclipseLink1_2ContextModelTestCase extends EclipseLinkCont
@Override
protected IDataModel buildJpaConfigDataModel() {
IDataModel dataModel = super.buildJpaConfigDataModel();
- dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM_ID, EclipseLinkPlatform.VERSION_1_2.getId());
+ dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM, EclipseLinkPlatform.VERSION_1_2);
dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
return dataModel;
}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/EclipseLink2_0ContextModelTestCase.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/EclipseLink2_0ContextModelTestCase.java
index 641d44b80a..c2e7b60bda 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/EclipseLink2_0ContextModelTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/EclipseLink2_0ContextModelTestCase.java
@@ -28,7 +28,7 @@ public abstract class EclipseLink2_0ContextModelTestCase extends EclipseLinkCont
protected IDataModel buildJpaConfigDataModel() {
IDataModel dataModel = super.buildJpaConfigDataModel();
dataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, JpaFacet.VERSION_2_0.getVersionString());
- dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM_ID, EclipseLinkPlatform.VERSION_2_0.getId());
+ dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM, EclipseLinkPlatform.VERSION_2_0);
dataModel.setProperty(JpaFacetInstallDataModelProperties.CREATE_ORM_XML, Boolean.TRUE);
return dataModel;
}
diff --git a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/persistence/EclipseLink2_0PersistenceUnitTestCase.java b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/persistence/EclipseLink2_0PersistenceUnitTestCase.java
index 793f4491ac..d908f91e12 100644
--- a/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/persistence/EclipseLink2_0PersistenceUnitTestCase.java
+++ b/jpa/tests/org.eclipse.jpt.eclipselink.core.tests/src/org/eclipse/jpt/eclipselink2_0/core/tests/internal/context/persistence/EclipseLink2_0PersistenceUnitTestCase.java
@@ -45,7 +45,7 @@ public abstract class EclipseLink2_0PersistenceUnitTestCase extends PersistenceU
protected IDataModel buildJpaConfigDataModel() {
IDataModel dataModel = super.buildJpaConfigDataModel();
dataModel.setProperty(IFacetDataModelProperties.FACET_VERSION_STR, JpaFacet.VERSION_2_0.getVersionString());
- dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM_ID, EclipseLinkPlatform.VERSION_2_0.getId());
+ dataModel.setProperty(JpaFacetDataModelProperties.PLATFORM, EclipseLinkPlatform.VERSION_2_0);
return dataModel;
}

Back to the top