Overview

This page collects notes and pointers to changes coming up in the WTP 3.5 (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.

WTP Git migration

WTP has moved its source code repository from CVS to Git. A detailed list of what moved where can be found here

General

All the BundleActivator implementations (i.e. "plug-in" classes; e.g. JptJpaCorePlugin) were moved from public packages to private packages and all public members moved to the appropriate public interfaces etc.

Various convenience Transformers have been added to many public interfaces.

Common Utility (Provisional API)

added interfaces:

Association

Bag

Queue

Stack

ListIterable

MultiThreadedExceptionHandler

Node

Problem

IntReference

ModifiableIntReference

ModifiableBooleanReference

Transformer

moved interfaces:

ObjectReference

ModifiableObjectReference

BooleanReference

IndentingPrintWriter

Synchronizer (moved to JAXB core plug-in)

CallbackSynchronizer (moved to JAXB core plug-in)

removed all "tree"-related events and listeners

removed the Filter interface and converted all Filters to Predicates

renamed MultiThreadedExceptionHandler to MultiThreadExceptionHandler

renamed various CommandExecutor classes:

Old

New

CommandExecutor

CommandContext

ExtendedCommandExecutor

ExtendedCommandContext

InterruptibleCommandExecutor

InterruptibleCommandContext

StatefulCommandExecutor

StatefulCommandContext

StatefulExtendedCommandExecutor

StatefulExtendedCommandContext

Common Core (Provisional API)

added interfaces:

JptWorkspace

LibraryValidatorManager

ResourceLocatorManager

JptCommonCorePlugin - moved to private package and moved its members to the appropriate public interfaces etc.

Old

New

JAVA_SOURCE_CONTENT_TYPE

JavaResourceCompilationUnit.CONTENT_TYPE

JAVA_SOURCE_RESOURCE_TYPE

JavaResourceCompilationUnit.RESOURCE_TYPE

JAVA_SOURCE_PACKAGE_INFO_CONTENT_TYPE

JavaResourceCompilationUnit.PACKAGE_INFO_CONTENT_TYPE

JAVA_SOURCE_PACKAGE_INFO_RESOURCE_TYPE

JavaResourceCompilationUnit.PACKAGE_INFO_RESOURCE_TYPE

JAR_CONTENT_TYPE

JavaResourcePackageFragmentRoot.JAR_CONTENT_TYPE

JAR_SOURCE_RESOURCE_TYPE

JavaResourcePackageFragmentRoot.JAR_RESOURCE_TYPE

JavaResourceClassFile.CONTENT_TYPE

JavaResourceClassFile.CONTENT_TYPE_ID

getLibraryValidators(...)

LibraryValidatorManager.getLibraryValidators(...)

reworked resource types

added resourcTypes extension point to specify resource types and their relationships

converted JptResourceType to an interface with instances defined by the resourcTypes extension point - extensions are managed by the JptResourceTypeManager

JavaResourceMethod - removed initialize(MethodDeclaration) as it was unnecessary.

JavaResourceType

Added

getAttributeTypeBinding(JavaResourceAttribute)

getField(String name)

Annotation - initialize/synchronizeWith(Annotation) are preferred where possible over initialize/syncrhonizeWith(CompilationUnit). It is probably more performant to use the Annotation that has already been discovered than to search through the CompilationUnit again. If reusing any of the generic JPA annotation implementations, clients will now need to call initialize(Annotation)

added

initialize(Annotation).

synchronizeWith(Annotation).

JavaResourceAnnotatedElement

added

getContainerAnnotation(String) : Annotation. - You can no longer use getAnnotation(String) to return container annotations. This was changed to improve performance. see bug 376787

changed

getNameTextRange(CompilationUnit) to getNameTextRange(). Caching the name TextRange during sync

possibly want to use OrmManagedType.getJavaManagedType() instead of OrmPersistent.getJavaPersistentType() that is now just a helper method for returning the JavaManagedType of it is of type JavaPersistentType

OrmTypeMapping

getClass_() and setClass(...) and getClassTextRange()moved to OrmManagedType

moved JPA 2.0- and 2.1-specific methods from PersistenceXmlContextModelFactory to appropriate sub-interfaces: PersistenceXmlContextModelFactory2_0 and PersistenceXmlContextModelFactory2_1

added method PersistenceUnit.addPersistentTypes(...) to support adding persistent types from a wizard

renamed PersistenceXmlContextNodeFactory to PersistenceXmlContextModelFactory and corresponding methods PersistenceXmlDefinition.getResourceNodeFactory() to getResourceModelFactory() and PersistenceXmlDefinition.getContextNodeFactory() to getContextModelFactory()

renamed OrmXmlContextNodeFactory to OrmXmlContextModelFactory and corresponding methods OrmXmlDefinition.getResourceNodeFactory() to getResourceModelFactory() and OrmXmlDefinition.getContextNodeFactory() to getContextModelFactory()

Various Owner interfaces were renamed to the corresponding interface ParentAdapter and refactored to return the client's parent; so, instead of constructing a client with both a parent and an owner, the client is constructed with only a parent adapter. The appropriate factory methods were changed accordingly: