Jump to: navigation, search

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

(JPA UI (Provisional API))
m (JPA UI (Provisional API))
Line 486: Line 486:
  
 
* enhanced <code>JavaUiFactory</code> and <code>JavaUiFactory2_0</code>:
 
* enhanced <code>JavaUiFactory</code> and <code>JavaUiFactory2_0</code>:
** added parameter<code>PropertyValueModel<Boolean> enabledModel <code> to all attribute mapping methods
+
** added parameter<code>PropertyValueModel<Boolean> enabledModel </code> to all attribute mapping methods
  
 
* enhanced <code>OrmAttributeMappingUiDefinition</code>:
 
* enhanced <code>OrmAttributeMappingUiDefinition</code>:
** added parameter<code>PropertyValueModel<Boolean> enabledModel <code> to <code>buildAttributeMappingComposite</code>
+
** added parameter<code>PropertyValueModel<Boolean> enabledModel </code> to <code>buildAttributeMappingComposite</code>
  
 
* enhanced <code>OrmXmlUiFactory</code> and <code>OrmXmlUiFactory2_0</code>:
 
* enhanced <code>OrmXmlUiFactory</code> and <code>OrmXmlUiFactory2_0</code>:
** added parameter<code>PropertyValueModel<Boolean> enabledModel <code> to all attribute mapping methods
+
** added parameter<code>PropertyValueModel<Boolean> enabledModel </code> to all attribute mapping methods
  
 
* enhanced <code>JpaComposite</code>
 
* enhanced <code>JpaComposite</code>

Revision as of 11:02, 11 October 2012

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

Dali

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.

Common Utility (Provisional API)

  • added interfaces:
    • Association
    • Bag
    • Queue
    • Stack
    • ListIterable
    • MultiThreadedExceptionHandler
    • Node
    • Problem
    • IntReference
    • ModifiableIntReference
    • ModifiableBooleanReference
    • Transformer
  • moved interfaces:
    • ObjectReference
    • ModifiableObjectReference
    • BooleanReference
    • Filter
    • IndentingPrintWriter
    • Synchronizer (moved to JAXB core plug-in)
    • CallbackSynchronizer (moved to JAXB core plug-in)
  • removed all "tree"-related events and listeners

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
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
    • defined basic resource types
    • added JptResourceTypeReference
    • added ContentTypeReference
  • added TypeBinding to encapsulate type information (e.g. simple/qualified name, is interface/enum) spread elsewhere in resource model
  • JavaResourceAbstractType
    • Removed
      • getQualifiedName()
      • getPackageName()
      • isMemberType() (and associated property strings).
    • Added getTypeBinding() (and associated property string) whose API now takes their place (and adds related API).
  • JavaResourceAttribute
    • Removed
      • getTypeArrayComponentTypeName()
      • getTypeArrayDimensionality()
      • getTypeInterfaceNames()
      • getTypeName()
      • getTypeSuperclassNames()
      • getTypeTypeArgumentName(int)
      • getTypeTypeArgumentNames()
      • getTypeTypeArgumentNamesSize()
      • typeIsArray()
      • typeIsEnum()
      • typeIsInterface()
      • typeIsSubTypeOf(String)
      • typeIsVariablePrimitive() (and associated property strings).
    • Added getTypeBinding() (and associated property string) whose API now takes their place (and adds related API).
  • JavaResourceField - added synchronizeWith(FieldDeclaration, VariableDeclarationFragment) to replace synchronizeWith(CompilationUnit)
  • 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
  • AnnotationAdapter
    • changed method signature of newMarkerAnnotation() to return MarkerAnnotation
    • changed method signature of newSingleMemberAnnotation() to return SingleMemberAnnotation
    • changed method signature of newNormalAnnotation() to return NormalAnnotation
  • AnnotationElementAdapter
    • Added methods for performance improvements
      • getValue(Annotation)
      • getExpression(Annotation)
  • DeclarationAnnotationElementAdapter
    • Added methods for performance improvements
      • getValue(Annotation)
      • getExpression(Annotation)

JPA Database (Provisional API)

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

Old New
getConnectionProfileFactory() IWorkspace.getAdapter(ConnectionProfileFactory.class)
buildDriverClasspathContainerFor(...) ConnectionProfileFactory.buildDriverClasspathContainer(...)

  • promoted the method refresh() from Schema to DatabaseObject
  • added ConnectionProfileFactory.getWorkspace()

JPA Core (Provisional API)

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

Old New
DEFAULT_PERSISTENCE_XML_RUNTIME_PATH XmlPersistence.DEFAULT_RUNTIME_PATH
PERSISTENCE_XML_CONTENT_TYPE XmlPersistence.CONTENT_TYPE
PERSISTENCE_XML_1_0_CONTENT_TYPE XmlPersistence.CONTENT_TYPE
PERSISTENCE_XML_2_0_CONTENT_TYPE XmlPersistence.CONTENT_TYPE
MAPPING_FILE_CONTENT_TYPE ResourceMappingFile.Root.CONTENT_TYPE
DEFAULT_ORM_XML_RUNTIME_PATH XmlEntityMappings.DEFAULT_RUNTIME_PATH
ORM_XML_CONTENT_TYPE XmlEntityMappings.CONTENT_TYPE
ORM_XML_RESOURCE_TYPE XmlEntityMappings.RESOURCE_TYPE
ORM_XML_1_0_RESOURCE_TYPE XmlEntityMappings.RESOURCE_TYPE_1_0
ORM_XML_2_0_RESOURCE_TYPE XmlEntityMappings.RESOURCE_TYPE_2_0
VALIDATION_MARKER_ID JpaValidator.MARKER_ID
VALIDATOR_ID removed
WEB_FACET ProjectFacetsManager.getProjectFacet(IModuleConstants.JST_WEB_MODULE)
USER_OVERRIDE_DEFAULT_CATALOG JpaProject.USER_OVERRIDE_DEFAULT_CATALOG_PERSISTENT_PROPERTY_KEY
USER_OVERRIDE_DEFAULT_SCHEMA JpaProject.USER_OVERRIDE_DEFAULT_SCHEMA_PERSISTENT_PROPERTY_KEY
DATA_SOURCE_CONNECTION_PROFILE_NAME JpaDataSource.CONNECTION_PROFILE_NAME_PERSISTENT_PROPERTY_KEY
getConnectionProfileName(...) removed
setConnectionProfileName(...) removed
getUserOverrideDefaultCatalog(...) removed
setUserOverrideDefaultCatalog(...) removed
getUserOverrideDefaultSchema(...) removed
setUserOverrideDefaultSchema(...) removed
clearProjectPersistentProperties(...) removed
getJarRuntimeRootPath(...) ProjectTools.getJarRuntimeRootPath(...)
nodeIsJpa2_0Compatible(...) JptResourceType.isCompatibleWith(...)
nodeIsXml2_0Compatible(...) JptResourceType.isCompatibleWith(...)
resourceTypeIsCompatible(...) JptResourceType.isCompatibleWith(...)
projectHasWebFacet(...) ProjectTools.hasWebFacet(...)

  • moved preference code to new facade JpaPreferences
  • JpaStructureNode now extends JpaContextNode
  • renamed AbstractXmlResourceProvider to AbstractJpaXmlResourceProvider and moved to internal package
  • moved JpaXmlResourceProvider to appropriate package and added method createFileAndResource(...)
  • cleaned up support for non-XML mapping files:
    • changed the resource passed to the method JpaFactory.buildMappingFile(...) from JpaXmlResource to Object
    • moved MappingFileRoot to be a member type: MappingFile.Root
    • added change support for MappingFile.ROOT_PROPERTY
    • added methods to MappingFile:
      • getResourceMappingFile()
      • validate(...)
      • getValidationTextRange()
    • MappingFilePersistenceUnitMetadata now extends JpaContextNode, not XmlContextNode and declares the method getValidationTextRange()
    • MappingFilePersistenceUnitDefaults now extends JpaContextNode, not XmlContextNode
    • added support for a root to XmlFile
    • OrmXml now extends XmlFile
    • EntityMappings now extends both MappingFile.Root and XmlFile.Root
    • Persistence now extends XmlFile.Root
    • replaced PersistenceXml.getPersistence() with getRoot()
    • added method MappingFile.getDefinition()
  • added method EntityMappings.getOrmXml()
  • removed JpaXmlStructureNode and moved method getXmlCompletionProposals(...) to XmlContextNode
  • removed unneeded method MappingFileRef.isFor(...)
  • renamed MappingFileRef.isImplied() to MappingFileRef.isDefault()
  • renamed PersistenceXmlContextNodeFactory.buildImpliedMappingFileRef(...) to PersistenceXmlContextNodeFactory.buildVirtualMappingFileRef(...)
  • added method JpaNode.getJpaPlatform()
  • deleted class JpaFacet
    • moved ID to JpaProject.FACET_ID
    • moved FACET to JpaProject.FACET
    • moved VERSION_1_0 to JpaProject.FACET_VERSION_STRING and JpaProject.FACET_VERSION
    • moved VERSION_2_0 to JpaProject2_0.FACET_VERSION_STRING and JpaProject2_0.FACET_VERSION
  • reworked JpaPlatformManager
    • no longer a singleton - access it via JpaWorkspace
    • renamed various methods to more accurately reflect model (e.g. getPlatform(String) now returns a JpaPlatform, while getJpaPlatformDescription(String) returns the JpaPlatformDescription)
  • ConnectionProfileFactory is no longer a singleton - access it via JpaWorkspace
  • PersistenceUnit added method removeSpecifiedClassRefs(Iterable<ClassRef>)
  • JpaProjectManager
    • renamed
      • addAsyncEventListenerFlag(BooleanReference) to addJavaEventListenerFlag(BooleanReference)
      • removeAsyncEventListenerFlag(BooleanReference) to removeJavaEventListenerFlag(BooleanReference)
  • JpaPlatformProvider
    • removed getMostRecentSupportedResourceType(IContentType)
    • added getMostRecentSupportedResourceTypes()
  • PersistentType
    • added getAttributeTypeBinding(ReadOnlyPersistentAttribute)
  • ReadOnlyPersistentAttribute
    • added getTypeName(PersistentType)
  • Generator - refactored all DB specific methods to a new interface DbGenerator bug 380150
  • added interface JavaElementReference - implemented by:
    • JavaPersistentType
    • JavaPersistentAttribute
    • Accessor
  • cleaned up how JpaFile root structure nodes are registered Bug 231872:
    • added JpaFile.updateRootStructureNodes()
    • removed JpaFile.addRootStructureNode(Object, JpaStructureNode)
    • removed JpaFile.removeRootStructureNode(Object, JpaStructureNode)
    • added JpaStructureNode.gatherRootStructureNodes(JpaFile, Collection<JpaStructureNode>)
  • renamed JpaPlatformDescription to JpaPlatformConfig
  • renamed JpaPlatformGroupDescription to JpaPlatformGroupConfig

JAXB Core (Provisional API)

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

Old New
JAXB_INDEX_CONTENT_TYPE JaxbIndexResource.CONTENT_TYPE
JAXB_INDEX_RESOURCE_TYPE JaxbIndexResource.RESOURCE_TYPE
JAXB_PROPERTIES_CONTENT_TYPE JaxbPropertiesResource.CONTENT_TYPE
JAXB_PROPERTIES_RESOURCE_TYPE JaxbPropertiesResource.RESOURCE_TYPE
VALIDATION_MARKER_ID JaxbValidator.MARKER_ID

EclipseLink JPA Core (Provisional API)

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

Old New
DEFAULT_ECLIPSELINK_ORM_XML_RUNTIME_PATH XmlEntityMappings.DEFAULT_RUNTIME_PATH
ECLIPSELINK_ORM_XML_CONTENT_TYPE XmlEntityMappings.CONTENT_TYPE
ECLIPSELINK_ORM_XML_1_0_RESOURCE_TYPE XmlEntityMappings.RESOURCE_TYPE_1_0
ECLIPSELINK_ORM_XML_1_1_RESOURCE_TYPE XmlEntityMappings.RESOURCE_TYPE_1_1
ECLIPSELINK_ORM_XML_1_2_RESOURCE_TYPE XmlEntityMappings.RESOURCE_TYPE_1_2
ECLIPSELINK_ORM_XML_2_0_RESOURCE_TYPE XmlEntityMappings.RESOURCE_TYPE_2_0
ECLIPSELINK_ORM_XML_2_1_RESOURCE_TYPE XmlEntityMappings.RESOURCE_TYPE_2_1
ECLIPSELINK_ORM_XML_2_2_RESOURCE_TYPE XmlEntityMappings.RESOURCE_TYPE_2_2
ECLIPSELINK_ORM_XML_2_3_RESOURCE_TYPE XmlEntityMappings.RESOURCE_TYPE_2_3
ECLIPSELINK_ORM_XML_2_4_RESOURCE_TYPE XmlEntityMappings.RESOURCE_TYPE_2_4
ECLIPSELINK_PLATFORM_VERSION_1_0 EclipseLinkJpaPlatformFactory.VERSION
ECLIPSELINK_PLATFORM_VERSION_1_1 EclipseLink1_1JpaPlatformFactory.VERSION
ECLIPSELINK_PLATFORM_VERSION_1_2 EclipseLink1_2JpaPlatformFactory.VERSION
ECLIPSELINK_PLATFORM_VERSION_2_0 EclipseLink2_0JpaPlatformFactory.VERSION
ECLIPSELINK_PLATFORM_VERSION_2_1 EclipseLink2_1JpaPlatformFactory.VERSION
ECLIPSELINK_PLATFORM_VERSION_2_2 EclipseLink2_2JpaPlatformFactory.VERSION
ECLIPSELINK_PLATFORM_VERSION_2_3 EclipseLink2_3JpaPlatformFactory.VERSION
ECLIPSELINK_PLATFORM_VERSION_2_4 EclipseLink2_4JpaPlatformFactory.VERSION
nodeIsEclipseLink2_3Compatible(...) removed
nodeIsEclipseLink2_4Compatible(...) removed
nodeIsEclipseLinkVersionCompatible(...) removed

  • moved preference code to new facade EclipseLinkJpaPreferences

Common UI (Provisional API)

  • WidgetFactory:
    • removed deprecated createCCombo(...)
    • removed deprecated createEditableCCombo(...)
    • removed createMultiLineLabel(...)

JPA UI (Provisional API)

  • enhanced JpaPlatformUi:
    • added getTypeMappingUiDefinition(...)
    • added getAttributeMappingUiDefinition(...)
    • added parameterPropertyValueModel<Boolean> enabledModel <code> to <code>buildAttributeMappingComposite
  • converted Iterators to Iterables:
    • JpaPlatformUi.getTypeMappingUiDefinitions(...)
    • JpaPlatformUi.getAttributeMappingUiDefinitions(...)
    • JpaPlatformUiProvider.getDetailProviders()
    • JpaPlatformUiProvider.getResourceUiDefinitions()
    • MappingResourceUiDefinition.getTypeMappingUiDefinitions()
    • MappingResourceUiDefinition.getAttributeMappingUiDefinitions()
  • enhanced MappingResourceUiDefinition:
    • added getTypeMappingUiDefinition(...)
    • added getAttributeMappingUiDefinition(...)
    • added parameterPropertyValueModel<Boolean> enabledModel <code> to <code>buildAttributeMappingComposite
  • enhanced MappingUiDefinition:
    • added getGhostImage()
  • enhanced JavaAttributeMappingUiDefinition:
    • added parameterPropertyValueModel<Boolean> enabledModel <code> to <code>buildAttributeMappingComposite
  • enhanced JavaUiFactory and JavaUiFactory2_0:
    • added parameterPropertyValueModel<Boolean> enabledModel to all attribute mapping methods
  • enhanced OrmAttributeMappingUiDefinition:
    • added parameterPropertyValueModel<Boolean> enabledModel to buildAttributeMappingComposite
  • enhanced OrmXmlUiFactory and OrmXmlUiFactory2_0:
    • added parameterPropertyValueModel<Boolean> enabledModel to all attribute mapping methods
  • enhanced JpaComposite
    • removed enableWidgets(boolean) - a Pane now takes a PropertyValueModel<Boolean> used for enabling widgets.
  • moved JpaPageComposite from org.eclipse.jpt.jpa.ui.details to org.eclipse.jpa.ui.editors
  • added JpaWorkbench
  • added JpaPlatformUiManager

JAXB UI (Provisional API)

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

Old New
getJaxbPlatformUiManager() TO DO

Reference

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