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

New Help for Old Friends VII

This page collects notes and pointers to changes between the WTP 3.3 (Indigo) and WTP 3.4 (Juno) 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.


Common

  • org.eclipse.wst.common.uriresolver has been incremented to 1.2.0 because of new API added for bug 365243.

Java EE

  • The Java Facet can now be installed on more projects than before, specifically on projects also having the Static Web facet, with which it previously conflicted. Discussion can be found in bug 353775, including early configuration issues similar to those that may be encountered by adopters.

Dali

General

  • bug 319736 - provisional API changes throughout the model to switch Iterators to Iterable

JPA (Provisional API)

  • While fixing bug 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.
  • org.eclipse.jpt.jpa.core.JptJpaCorePlugin.getJpaProject(IProject) -> (JpaProject) iProject.getAdapter(JpaProject.class)

Java Resource Model (Provisional API)

The non-JPA specific interfaces for the Java resource model found in org.eclipse.jpt.jpa.core.resource.java have been moved to the org.eclipse.jpt.common.core plug-in in the org.eclipse.jpt.common.core.resource.java package.

Interfaces moved:

  • JavaResourceNode
  • JavaResourcePackage
  • JavaResourcePackageFragment
  • JavaResourcePackageFragmentRoot
  • JavaResourcePackageInfoCompilationUnit
  • JavaResourceClassFile
  • JavaResourceCompilationUnit
  • JavaResourceAnnotatedElement
  • Annotation
  • AnnotationDefinition
  • NestableAnnotation
  • NestableAnnotationDefinition

Renamed:

  • JavaResourcePersistentMember renamed-> JavaResourceMember
  • JavaResourcePersistentType renamed-> JavaResourceType
  • JavaResourcePersistentTypeCache renamed-> JavaResourceTypeCache
  • JavaResourcePersistentAttribute renamed-> JavaResourceAttribute

Added:

  • JavaResourceField extends JavaResourceAttribute
  • JavaResourceMethod extends JavaResourceAttribute
  • JavaResourceAbstractType - JavaResourceType now extends it
  • JavaResourceEnum extends JavaResourceAbstractType
  • JavaResourceEnumConstant - JavaResourceEnum.getEnumConstants()

Removed:

  • Annotation.storeOn(Map) and Annotation.restoreFrom(Map) were removed.
  • AnnotationContainer, ContainerAnnotation and all sub-interfaces: AssociationOverridesAnnotation, AttributeOverridesAnnotation, JoinColumnsAnnotation, MapKeyJoinColumns2_0Annotation, NamedNativeQueriesAnnotation, NamedQueriesAnnotation, PrimaryKeyJoinColumnsAnnotation, SecondaryTablesAnnotation.
    • We changed how "container" annotations are handled. Our NestableAnnotation implementations now build a CombinationIndexedDeclarationAnnotationAdapter to handle moving nestable annotations between stand-alone and nested. You can look at SourceNamedQueryAnnotation as an example.

Changes to JavaResourceAnnotationElement:

  • addAnnotation(int, String, String) changed to addAnnotation(int, String) : NestableAnnotation. We now use the NestableAnnotationDefintion to determine the container annotation name so this method now takes only an index and the nestable annotation name.
  • addStandAloneAnnotation(NestableAnnotation) - this has been removed, no longer needed
  • annotations(String nestableAnnotationName, String containerAnnotationName): Iterator<NestableAnnotation> replaced with getAnnotations(String nestableAnnotationName) : Iterable<NestableAnnotation>
  • annotationsSize() renamed to getAnnotationsSize()


Changes to org.eclipse.jpt.jpa.core.JpaAnnotationDefinitionProvider

  • Removed getTypeAnnotationDefinitions(), getTypeMappingAnnotationDefinitions(), getAttributeAnnotationDefinitions() , getPackageAnnotationDefinitions()
  • Added getAnnotationDefinitions() and getNestableAnnotationDefinitions().
  • A "nestable" annotation definition would include NamedQueryAnnotationDefinition and defines the nestable annotation as "NamedQuery", the container annotation as "NamedQueries" and the element name as "value"


JPA Java Context Model (Provisional API)

  • org.eclipse.jpt.jpa.core.context.java.JavaPersistentAttribute.getResourcePersistentAttribute() - this has been renamed to getResourceAttribute() and now returns a JavaResourceAttribute which is the JavaResourceField or JavaResourceMethod that will be annotated. See JavaPersistentAttribute.getAccessor() : Accessor which is a new interface that holds either the JavaResourceField or the JavaResourceMethod 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:
    • org.eclipse.jpt.jpa.core.context.TemporalConverter -> org.eclipse.jpt.jpa.core.context.BaseTemporalConverter
    • org.eclipse.jpt.jpa.core.context.EnumeratedConverter -> org.eclipse.jpt.jpa.core.context.BaseEnumeratedConverter
  • As we now support EclipseLink "virtual" types and attributes (i.e. types that do not exist in Java and are generated at runtime):
    • org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute.convertToSpecified() -> org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute.addToXml()
    • org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute.convertToSpecified(String) -> org.eclipse.jpt.jpa.core.context.orm.OrmReadOnlyPersistentAttribute.addToXml(String)
  • The technique for significantly and synchronously modifying a JpaProject has been simplified. Instead of using the methods
    • JpaProject.getUpdateSynchronizer()
    • JpaProject.setUpdateSynchronizer(CallbackSynchronizer)
    • JpaProject.getContextModelSynchronizer()
    • JpaProject.setContextModelSynchronizer(Synchronizer)
    • JpaProject.setThreadLocalModifySharedDocumentCommandExecutor(CommandExecutor)
  • Use the method JpaProjectManager.execute(Command, ExtendedCommandExecutor). An example is in org.eclipse.jpt.jpa.ui.internal.actions.SynchronizeClassesAction
  • The constants defined in the following interfaces are no longer used. Instead the appropriate interface is used to identify a JPA structure node. See org.eclipse.jpt.jpa.core.JpaStructureNode.getType()
    • org.eclipse.jpt.jpa.core.context.java.JavaStructureNodes
    • org.eclipse.jpt.jpa.core.context.orm.OrmStructureNodes
    • org.eclipse.jpt.jpa.core.context.persistence.PersistenceStructureNodes

UI (Provisional API)

  • org.eclipse.jpt.jpa.ui.navigator.JpaNavigatorProvider -> org.eclipse.jpt.common.ui.jface.ItemTreeStateProviderFactoryProvider
  • org.eclipse.jpt.jpa.ui.details.JpaDetailsPage -> org.eclipse.jpt.jpa.ui.details.JpaDetailsPageManager
  • org.eclipse.jpt.jpa.ui.structure.JpaStructureProvider -> org.eclipse.jpt.common.ui.jface.ItemTreeStateProviderFactoryProvider

Utility (Provisional API)

  • org.eclipse.jpt.common.core.IResourcePart is no longer used
  • org.eclipse.jpt.common.ui.jface.ItemContentProvider -> org.eclipse.jpt.common.ui.jface.ItemStructuredContentProvider
  • org.eclipse.jpt.common.ui.jface.ItemContentProviderFactory -> org.eclipse.jpt.common.ui.jface.ItemStructuredContentProviderFactory
  • org.eclipse.jpt.common.ui.jface.TreeItemContentProvider -> org.eclipse.jpt.common.ui.jface.ItemTreeContentProvider
  • org.eclipse.jpt.common.ui.jface.TreeItemContentProviderFactory -> org.eclipse.jpt.common.ui.jface.ItemTreeContentProviderFactory
  • org.eclipse.jpt.common.ui.jface.DelegatingContentAndLabelProvider is no longer used
  • org.eclipse.jpt.common.utility.Command -> org.eclipse.jpt.common.utility.command.Command
  • org.eclipse.jpt.common.utility.CommandExecutor -> org.eclipse.jpt.common.utility.command.CommandExecutor
  • org.eclipse.jpt.common.utility.model.listener.SimpleChangeListener -> org.eclipse.jpt.common.utility.model.listener.AbstractChangeListener
  • org.eclipse.jpt.common.utility.model.value.WritableCollectionValueModel -> org.eclipse.jpt.common.utility.model.value.ModifiableCollectionValueModel
  • org.eclipse.jpt.common.utility.model.value.WritableListValueModel -> org.eclipse.jpt.common.utility.model.value.ModifiableListValueModel
  • org.eclipse.jpt.common.utility.model.value.WritablePropertyValueModel -> org.eclipse.jpt.common.utility.model.value.ModifiablePropertyValueModel
  • org.eclipse.jpt.common.utility.ReadOnlyObjectReference -> org.eclipse.jpt.common.utility.ObjectReference
  • org.eclipse.jpt.common.utility.ObjectReference -> org.eclipse.jpt.common.utility.ModifiableObjectReference

JSDT

  • Fixing bug 375652 required a breaking change introducing 2 new methods to org.eclipse.wst.jsdt.debug.core.jsdi.VirtualMachine. As one method determines whether toggling enablement is supported by the VM, adopters may wish to return false and continue only supporting the previous ability to add and remove breakpoints until such time as they are able to implement the enablement functionality.

Source Editing

  • The HTML Validator can now be run headlessly as requested in bug 338111, changing the validator extension ID accordingly. This may affect existing inclusion/exclusion rules, as well as adopter plug-ins that set them.

Reference

This document ONLY covers changes between WTP 3.4 and WTP 3.3. See also: New Help for Old Friends VI (3.3), New Help for Old Friends V (3.2), New Help for Old Friends IV (3.1), New Help for Old Friends III (3.0), New Help for Old Friends II (2.0), and the original New Help for Old Friends (1.5)

Back to the top