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 VII"

(Java Resource Model)
(Java Resource Model)
Line 31: Line 31:
  
 
=== Java Resource Model ===
 
=== Java Resource Model ===
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.
+
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:
 
Interfaces moved:
* JavaResourceNode
+
* <code>JavaResourceNode</code>
* JavaResourcePackage
+
* <code>JavaResourcePackage</code>
* JavaResourcePackageFragment
+
* <code>JavaResourcePackageFragment</code>
* JavaResourcePackageFragmentRoot
+
* <code>JavaResourcePackageFragmentRoot</code>
* JavaResourcePackageInfoCompilationUnit
+
* <code>JavaResourcePackageInfoCompilationUnit</code>
* JavaResourceClassFile
+
* <code>JavaResourceClassFile</code>
* JavaResourceCompilationUnit
+
* <code>JavaResourceCompilationUnit</code>
* JavaResourceAnnotatedElement
+
* <code>JavaResourceAnnotatedElement</code>
* Annotation
+
* <code>Annotation</code>
* AnnotationDefinition
+
* <code>AnnotationDefinition</code>
* NestableAnnotation
+
* <code>NestableAnnotation</code>
* NestableAnnotationDefinition
+
* <code>NestableAnnotationDefinition</code>
  
Changes:
+
Renamed:
* JavaResourcePersistentMember renamed-> JavaResourceMember
+
* <code>JavaResourcePersistentMember</code> renamed-> <code>JavaResourceMember</code>
* JavaResourcePersistentType renamed-> JavaResourceType
+
* <code>JavaResourcePersistentType</code> renamed-> <code>JavaResourceType</code>
* JavaResourcePersistentTypeCache renamed-> JavaResourceTypeCache
+
* <code>JavaResourcePersistentTypeCache</code> renamed-> <code>JavaResourceTypeCache</code>
* JavaResourceAbstractType added to the hierarchy - JavaResourceType and JavaResourceEnum extend it
+
* <code>JavaResourcePersistentAttribute</code> renamed-> <code>JavaResourceAttribute</code>
* JavaResourceEnum and JavaResourceEnumContanst added to the hierarchy.
+
 
* JavaResourcePersistentAttribute renamed-> JavaResourceAttribute and refactored to add JavaResourceField and JavaResourceMethod as extenders.
+
Added:
* ContainerAnnotation was removed
+
* <code>JavaResourceField</code> extends <code>JavaResourceAttribute</code>
* Annotation storeOn(Map) and restoreFrom(Map) were removed.
+
* <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"
  
 
== Reference ==
 
== Reference ==

Revision as of 15:23, 20 April 2012

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

  • 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.

Java Resource Model

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"

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