Jump to: navigation, search

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

(This page collects notes and pointers to changes between the WTO 3.3 (Indigo) and WTP 3.4 (Juno) release.)
 
(23 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== This page collects notes and pointers to changes coming up in the WTP 3.4 (Juno) release. ==
+
== 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 [mailto:wtp-dev@eclipse.org?Subject=Migration%20help wtp-dev]).  Web Tools is a Platform and we strive to provide compatible API evolution with clear migration paths, instructions, etc.
 
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 [mailto:wtp-dev@eclipse.org?Subject=Migration%20help wtp-dev]).  Web Tools is a Platform and we strive to provide compatible API evolution with clear migration paths, instructions, etc.
Line 15: Line 15:
 
Following are some of the noteworthy 'minor' field changes.  
 
Following are some of the noteworthy 'minor' field changes.  
 
-->
 
-->
 +
 +
== Common ==
 +
* org.eclipse.wst.common.uriresolver has been incremented to 1.2.0 because of new API added for bug [https://bugs.eclipse.org/bugs/show_bug.cgi?id=365243 365243].
  
 
== Java EE ==
 
== Java EE ==
Line 21: Line 24:
 
== Dali ==
 
== Dali ==
  
 +
=== General ===
 +
* bug [https://bugs.eclipse.org/319736 319736] - provisional API changes throughout the model to switch Iterators to Iterable
 +
 +
=== 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>
 +
 +
== JSDT ==
 +
*Fixing bug [http://bugs.eclipse.org/375652 375652] required a '''breaking change''' introducing 2 new methods to <code>org.eclipse.wst.jsdt.debug.core.jsdi.VirtualMachine</code>.  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 [http://bugs.eclipse.org/338111 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 ==
 
== Reference ==

Latest revision as of 16:17, 12 November 2012

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)