This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 262663 - Support for JPA platform versioning
Summary: Support for JPA platform versioning
Status: NEW
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JPA (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows Vista
: P3 enhancement (vote)
Target Milestone: Future   Edit
Assignee: Neil Hauge CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-27 15:59 EST by Paul Fullbright CLA
Modified: 2011-07-01 16:26 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Fullbright CLA 2009-01-27 15:59:39 EST
In order for extenders to better enable/disable functionality based on JPA platform, it will be very desirable to *not* have to enumerate all versions of a platform that apply.  Here's an example snippet from the eclipselink ui code:

<extension
   point="org.eclipse.ui.navigator.navigatorContent">
   <commonWizard
      menuGroupId="org.eclipse.jpt.ui"
      type="new"
      wizardId="org.eclipse.jpt.eclipselink.ui.wizard.newEclipseLinkMappingFile">
      <enablement>
         <and>
               ... <<SNIP>> ...
            <test
               property="org.eclipse.jpt.core.jpaPlatform"
               value="org.eclipse.eclipselink.platform">
            </test>
         </and>
      </enablement>
   </commonWizard>
</extension>

With the limitations of our current extension point story, all new versions of a platform would have to be a new platform extension, and we would have to put in multiple tests like so to enable this wizard for multiple platform versions:

            <or>
               <test
                  property="org.eclipse.jpt.core.jpaPlatform"
                  value="org.eclipse.eclipselink.platform">
               </test>
               <test
                  property="org.eclipse.jpt.core.jpaPlatform"
                  value="org.eclipse.eclipselink_1_1.platform">
               </test>
               <test
                  property="org.eclipse.jpt.core.jpaPlatform"
                  value="org.eclipse.eclipselink_2_0.platform">
               </test>
               ... <<etc.>> ...
            </or>

There would of course be similar stories for all JPA platform providers and their extenders.

It would be much simpler to provide a global platform setting with versioning expressions available if they apply:
            
            ... (all versions of eclipselink from 1.0 up to but not including 2.0) ...
            <test
               property="org.eclipse.jpt.core.jpaPlatform"
               value="org.eclipse.eclipselink.platform:[1.0,2.0)">
            </test>

            or

            ... (all versions of eclipselink) ...
            <test
               property="org.eclipse.jpt.core.jpaPlatform"
               value="org.eclipse.eclipselink.platform">
            </test>

This would require changes to our existing jpaPlatforms extension point and references to a jpaPlatform in plugin code.
Comment 1 Paul Fullbright CLA 2009-01-27 16:04:30 EST
In addition, to interact with the version of the JPA facet used for a given project, it will likely be necessary to filter JPA platform versions that are available for a given JPA facet version.
Comment 2 Paul Fullbright CLA 2009-01-27 16:13:02 EST
Here's an illustration of what the extension point API might look like:

<<NOW>>

<extension
   point="org.eclipse.jpt.core.jpaPlatforms">
      <jpaPlatform
         id="generic"
         label="%GENERIC_PLATFORM_LABEL"
         factoryClass="org.eclipse.jpt.core.internal.platform.GenericJpaPlatformFactory"
			default="false"/>
</extension>


<<FUTURE>>

<extension
   point="org.eclipse.jpt.core.jpaPlatforms">
      <jpaPlatform
         id="generic"
         label="%GENERIC_PLATFORM_LABEL"/>
      <jpaPlatformVersion
         platform="generic"
         version="1.0"
         factoryClass="org.eclipse.jpt.core.internal.platform.GenericJpaPlatformFactory"
			default="false"
         jpaFacetVersions="1.0"/>
</extension>
Comment 3 Neil Hauge CLA 2011-07-01 16:26:55 EDT
Moving JPA specific bugs to new JPA component in bugzilla.