Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "New Help for Old Friends VIII"

(Dali)
Line 16: Line 16:
 
== Dali ==
 
== Dali ==
  
=== General ===
+
=== Database (Provisional API) ===
* bug [https://bugs.eclipse.org/319736 319736] - provisional API changes throughout the model to switch Iterators to Iterable
+
* Promoted the method <code>refresh()</code> from Schema to DatabaseObject
  
 
=== JPA (Provisional API) ===
 
=== JPA (Provisional API) ===
* While fixing bug [https://bugs.eclipse.org/277017 277017] provisional API was added for resolving a JDT IType for class names specified throughout the JPA model. This would only affect those who have their own implementation of the interfaces listed in the bug.
 
* <code>org.eclipse.jpt.jpa.core.JptJpaCorePlugin.getJpaProject(IProject)</code> ->  <code>(JpaProject) iProject.getAdapter(JpaProject.class)</code>
 
 
=== Java Resource Model (Provisional API) ===
 
The non-JPA specific interfaces for the Java resource model found in <code>org.eclipse.jpt.jpa.core.resource.java</code> have been moved to the <code>org.eclipse.jpt.common.core</code> plug-in in the <code>org.eclipse.jpt.common.core.resource.java</code> package.
 
 
Interfaces moved:
 
* <code>JavaResourceNode</code>
 
* <code>JavaResourcePackage</code>
 
* <code>JavaResourcePackageFragment</code>
 
* <code>JavaResourcePackageFragmentRoot</code>
 
* <code>JavaResourcePackageInfoCompilationUnit</code>
 
* <code>JavaResourceClassFile</code>
 
* <code>JavaResourceCompilationUnit</code>
 
* <code>JavaResourceAnnotatedElement</code>
 
* <code>Annotation</code>
 
* <code>AnnotationDefinition</code>
 
* <code>NestableAnnotation</code>
 
* <code>NestableAnnotationDefinition</code>
 
 
Renamed:
 
* <code>JavaResourcePersistentMember</code> renamed-> <code>JavaResourceMember</code>
 
* <code>JavaResourcePersistentType</code> renamed-> <code>JavaResourceType</code>
 
* <code>JavaResourcePersistentTypeCache</code> renamed-> <code>JavaResourceTypeCache</code>
 
* <code>JavaResourcePersistentAttribute</code> renamed-> <code>JavaResourceAttribute</code>
 
 
Added:
 
* <code>JavaResourceField</code> extends <code>JavaResourceAttribute</code>
 
* <code>JavaResourceMethod</code> extends <code>JavaResourceAttribute</code>
 
* <code>JavaResourceAbstractType</code> - <code>JavaResourceType</code> now extends it
 
* <code>JavaResourceEnum</code> extends <code>JavaResourceAbstractType</code>
 
* <code>JavaResourceEnumConstant</code> - <code>JavaResourceEnum.getEnumConstants()</code>
 
 
Removed:
 
* <code>Annotation.storeOn(Map)</code> and <code>Annotation.restoreFrom(Map)</code> were removed.
 
* <code>AnnotationContainer</code>, <code>ContainerAnnotation</code> and all sub-interfaces: <code>AssociationOverridesAnnotation</code>, <code>AttributeOverridesAnnotation</code>, <code>JoinColumnsAnnotation</code>, <code>MapKeyJoinColumns2_0Annotation</code>, <code>NamedNativeQueriesAnnotation</code>, <code>NamedQueriesAnnotation</code>, <code>PrimaryKeyJoinColumnsAnnotation</code>, <code>SecondaryTablesAnnotation</code>.
 
** We changed how "container" annotations are handled. Our <code>NestableAnnotation</code> implementations now build a <code>CombinationIndexedDeclarationAnnotationAdapter</code> to handle moving nestable annotations between stand-alone and nested. You can look at <code>SourceNamedQueryAnnotation</code> as an example.
 
 
Changes to <code>JavaResourceAnnotationElement</code>:
 
*<code>addAnnotation(int, String, String)</code> changed to <code>addAnnotation(int, String) : NestableAnnotation</code>. We now use the <code>NestableAnnotationDefintion</code> to determine the container annotation name so this method now takes only an index and the nestable annotation name.
 
*<code>addStandAloneAnnotation(NestableAnnotation)</code> - this has been removed, no longer needed
 
*<code>annotations(String nestableAnnotationName, String containerAnnotationName): Iterator<NestableAnnotation></code> replaced with <code>getAnnotations(String nestableAnnotationName) : Iterable<NestableAnnotation></code>
 
*<code>annotationsSize()</code> renamed to <code>getAnnotationsSize()</code>
 
 
 
Changes to <code>org.eclipse.jpt.jpa.core.JpaAnnotationDefinitionProvider</code>
 
*Removed <code>getTypeAnnotationDefinitions()</code>, <code>getTypeMappingAnnotationDefinitions()</code>, <code>getAttributeAnnotationDefinitions()</code> , <code>getPackageAnnotationDefinitions()</code>
 
*Added <code>getAnnotationDefinitions()</code>  and <code>getNestableAnnotationDefinitions()</code>.
 
*A "nestable" annotation definition would include <code>NamedQueryAnnotationDefinition</code> and defines the nestable annotation as "NamedQuery", the container annotation as "NamedQueries" and the element name as "value"
 
 
 
=== JPA Java Context Model (Provisional API) ===
 
* <code>org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute.getResourcePersistentAttribute()</code> - this has been renamed to <code>getResourceAttribute()</code> and now returns a <code>JavaResourceAttribute</code> which is the <code>JavaResourceField</code> or <code>JavaResourceMethod</code> that will be annotated. See <code>JavaPersistentAttribute.getAccessor() : Accessor</code> which is a new interface that holds either the <code>JavaResourceField</code> or the <code>JavaResourceMethod</code> getter/setter pair. This is more flexible and allows for more advanced validation on property access in JPA. It also allowed us to support JAXB where you can annotate either the getter or the setter.
 
 
* As there are now "normal" and "map key" converters:
 
** <code>org.eclipse.jpt.jpa.core.context.TemporalConverter</code> -> <code>org.eclipse.jpt.jpa.core.context.BaseTemporalConverter</code>
 
** <code>org.eclipse.jpt.jpa.core.context.EnumeratedConverter</code> -> <code>org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter</code>
 
 
* As we now support EclipseLink "virtual" types and attributes (i.e. types that do not exist in Java and are generated at runtime):
 
** <code>org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute.convertToSpecified()</code> -> <code>org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute.addToXml()</code>
 
** <code>org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute.convertToSpecified(String)</code> -> <code>org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute.addToXml(String)</code>
 
 
* The technique for significantly and synchronously modifying a <code>JpaProject</code> has been simplified. Instead of using the methods
 
** <code>JpaProject.getUpdateSynchronizer()</code>
 
** <code>JpaProject.setUpdateSynchronizer(CallbackSynchronizer)</code>
 
** <code>JpaProject.getContextModelSynchronizer()</code>
 
** <code>JpaProject.setContextModelSynchronizer(Synchronizer)</code>
 
** <code>JpaProject.setThreadLocalModifySharedDocumentCommandExecutor(CommandExecutor)</code>
 
* Use the method <code>JpaProjectManager.execute(Command, ExtendedCommandExecutor)</code>. An example is in <code>org.eclipse.jpt.jpa.ui.internal.actions.SynchronizeClassesAction</code>
 
 
* The constants defined in the following interfaces are no longer used.  Instead the appropriate interface is used to identify a JPA structure node. See <code>org.eclipse.jpt.jpa.core.JpaStructureNode.getType()</code>
 
** <code>org.eclipse.jpt.jpa.core.context.java.JavaStructureNodes</code>
 
** <code>org.eclipse.jpt.jpa.core.context.orm.OrmStructureNodes</code>
 
** <code>org.eclipse.jpt.jpa.core.context.persistence.PersistenceStructureNodes</code>
 
 
=== UI (Provisional API) ===
 
* <code>org.eclipse.jpt.jpa.ui.navigator.JpaNavigatorProvider</code> -> <code>org.eclipse.jpt.common.ui.jface.ItemTreeStateProviderFactoryProvider</code>
 
* <code>org.eclipse.jpt.jpa.ui.details.JpaDetailsPage</code> -> <code>org.eclipse.jpt.jpa.ui.details.JpaDetailsPageManager</code>
 
* <code>org.eclipse.jpt.jpa.ui.structure.JpaStructureProvider</code> -> <code>org.eclipse.jpt.common.ui.jface.ItemTreeStateProviderFactoryProvider</code>
 
 
=== Utility (Provisional API) ===
 
* <code>org.eclipse.jpt.common.core.IResourcePart</code> is no longer used
 
 
* <code>org.eclipse.jpt.common.ui.jface.ItemContentProvider</code> -> <code>org.eclipse.jpt.common.ui.jface.ItemStructuredContentProvider</code>
 
* <code>org.eclipse.jpt.common.ui.jface.ItemContentProviderFactory</code> -> <code>org.eclipse.jpt.common.ui.jface.ItemStructuredContentProviderFactory</code>
 
* <code>org.eclipse.jpt.common.ui.jface.TreeItemContentProvider</code> -> <code>org.eclipse.jpt.common.ui.jface.ItemTreeContentProvider</code>
 
* <code>org.eclipse.jpt.common.ui.jface.TreeItemContentProviderFactory</code> -> <code>org.eclipse.jpt.common.ui.jface.ItemTreeContentProviderFactory</code>
 
* <code>org.eclipse.jpt.common.ui.jface.DelegatingContentAndLabelProvider</code> is no longer used
 
 
* <code>org.eclipse.jpt.common.utility.Command</code> -> <code>org.eclipse.jpt.common.utility.command.Command</code>
 
* <code>org.eclipse.jpt.common.utility.CommandExecutor</code> -> <code>org.eclipse.jpt.common.utility.command.CommandExecutor</code>
 
* <code>org.eclipse.jpt.common.utility.model.listener.SimpleChangeListener</code> -> <code>org.eclipse.jpt.common.utility.model.listener.AbstractChangeListener</code>
 
* <code>org.eclipse.jpt.common.utility.model.value.WritableCollectionValueModel</code> -> <code>org.eclipse.jpt.common.utility.model.value.ModifiableCollectionValueModel</code>
 
* <code>org.eclipse.jpt.common.utility.model.value.WritableListValueModel</code> -> <code>org.eclipse.jpt.common.utility.model.value.ModifiableListValueModel</code>
 
* <code>org.eclipse.jpt.common.utility.model.value.WritablePropertyValueModel</code> -> <code>org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel</code>
 
* <code>org.eclipse.jpt.common.utility.ReadOnlyObjectReference</code> -> <code>org.eclipse.jpt.common.utility.ObjectReference</code>
 
* <code>org.eclipse.jpt.common.utility.ObjectReference</code> -> <code>org.eclipse.jpt.common.utility.ModifiableObjectReference</code>
 
  
 
== Reference ==
 
== Reference ==

Revision as of 11:29, 14 June 2012

This page collects notes and pointers to changes coming up in the WTP 3.4+ (Kepler) release.

This page acts as a central "jumping off" point for those adopters of WTP that are moving up from a previous version of WTP. Most of this information may be already contained in various mailing lists and Bugzilla reports, but it is believed best to have a central place to get people started. Adopters: if you run into trouble or notice things that are not covered here, please update this page and/or let us know (such as by opening a bug, or sending a note to wtp-dev). Web Tools is a Platform and we strive to provide compatible API evolution with clear migration paths, instructions, etc.

One thing we have learned in the past is that some adopters do not move with us to every new release. Some early adopters went from 0.7 directly to 1.5, for example. Unfortunately, it is difficult to present the information in that way, covering multiple changes across multiple version ranges, so those types of migrations have to read about migrating to each version.

Note: as these notes develop and grow in number, they may occasionally be re-organized into categories, etc.

Dali

Database (Provisional API)

  • Promoted the method refresh() from Schema to DatabaseObject

JPA (Provisional API)

Reference

This document ONLY covers changes between WTP 3.4+ and WTP 3.4. See also:

Back to the top