Bug 306439 - Verify that all metadata fields are properly persisted
Summary: Verify that all metadata fields are properly persisted
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.6   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 3.6 M7   Edit
Assignee: DJ Houghton CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks: 281226
  Show dependency tree
 
Reported: 2010-03-18 16:45 EDT by Pascal Rapicault CLA
Modified: 2010-04-15 12:35 EDT (History)
5 users (show)

See Also:
tjwatson: pmc_approved+


Attachments
patch to read/write update descriptor location (1.81 KB, patch)
2010-03-18 19:08 EDT, Susan McCourt CLA
no flags Details | Diff
modified patch to include parsing of location (2.97 KB, patch)
2010-03-18 21:21 EDT, Steffen Pingel CLA
no flags Details | Diff
mylyn/context/zip (11.23 KB, application/octet-stream)
2010-03-18 21:21 EDT, Steffen Pingel CLA
no flags Details
patch (11.83 KB, patch)
2010-04-07 15:48 EDT, DJ Houghton CLA
no flags Details | Diff
patch (16.87 KB, patch)
2010-04-09 10:16 EDT, DJ Houghton CLA
no flags Details | Diff
patch (18.41 KB, patch)
2010-04-12 17:36 EDT, DJ Houghton CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2010-03-18 16:45:15 EDT
We've added several new fields to the metadata (description in a requirement, URI in a license, URI in a update descriptor, etc.) and we need to verify that all fields of each metadata type is properly persisted.
Comment 1 Susan McCourt CLA 2010-03-18 19:08:55 EDT
Created attachment 162484 [details]
patch to read/write update descriptor location

This patch adds read/write for the IUpdateDescriptor.getLocation()
I needed this for my EclipseCon demo.
This patch introduces new API on MetadataFactory so I couldn't commit it, and I felt we may as well figure out what new API is needed for all of this before bugging the PMC.
Comment 2 Susan McCourt CLA 2010-03-18 20:15:28 EDT
Steffen, you'll need this patch in your workspace when/if you build RCP Cloud version 1.0.  I've sent you email with more detail.
Comment 3 Steffen Pingel CLA 2010-03-18 21:21:32 EDT
Created attachment 162485 [details]
modified patch to include parsing of location

Thanks Susan. I had to add another slight modification to MetadataParser to parse the actual URI but other than that it works great!
Comment 4 Steffen Pingel CLA 2010-03-18 21:21:38 EDT
Created attachment 162486 [details]
mylyn/context/zip
Comment 5 Susan McCourt CLA 2010-04-05 15:06:59 EDT
This is API-affecting, as it requires adding methods to a public class.
Comment 6 DJ Houghton CLA 2010-04-07 15:48:57 EDT
Created attachment 164122 [details]
patch

Updated patch.
Comment 7 DJ Houghton CLA 2010-04-09 10:16:45 EDT
Created attachment 164376 [details]
patch
Comment 8 DJ Houghton CLA 2010-04-12 17:36:42 EDT
Created attachment 164635 [details]
patch
Comment 9 DJ Houghton CLA 2010-04-13 09:08:45 EDT
I created bug 308997 about creating and using a RequirementDescription object in the future. I started coding this but it started introducing too many API changes at this point in the release cycle. So I just added a couple of new methods to MetadataFactory to minimize the API change.

Adding Tom to the CC for PMC approval for these API changes. There are 3 method additions to the MetadataFactory class. They are all the same as already existing methods except they add a new (previously missing) parameter. 

These parameter additions are necessary because without them there are no (API) ways to create a Requirement object with a description or an UpdateDescriptor with a location.
Comment 10 Thomas Watson CLA 2010-04-14 10:58:54 EDT
(In reply to comment #9)
> I created bug 308997 about creating and using a RequirementDescription object
> in the future. I started coding this but it started introducing too many API
> changes at this point in the release cycle. So I just added a couple of new
> methods to MetadataFactory to minimize the API change.
> 
> Adding Tom to the CC for PMC approval for these API changes. There are 3 method
> additions to the MetadataFactory class. They are all the same as already
> existing methods except they add a new (previously missing) parameter. 
> 
> These parameter additions are necessary because without them there are no (API)
> ways to create a Requirement object with a description or an UpdateDescriptor
> with a location.

Is MetadataFactory intended to be implemented by clients?  If not we should add @noextend @noimplement to the javadoc.  If so then this will have an impact on clients.  What is the impact, who is implementing etc.
Comment 11 DJ Houghton CLA 2010-04-14 11:01:40 EDT
No, it is declared as being final. I will add the annotations though to be more explicit.
Comment 12 Thomas Watson CLA 2010-04-14 11:32:21 EDT
(In reply to comment #11)
> No, it is declared as being final. I will add the annotations though to be more
> explicit.

Thanks, that makes sense.  Sorry I missed that.  I approve the addition.  Any way you could add javadoc to these additions?  I realize even the previous methods you are overloading with additional parameters are not javadoc'ed, but it would really help make sense of all the public methods on MetadataFactory that take different params.
Comment 13 DJ Houghton CLA 2010-04-14 11:33:16 EDT
Javadoc on API? Are you crazy? I'll see what I can do. :-)
Comment 14 DJ Houghton CLA 2010-04-14 16:25:21 EDT
I opened bug 309214 to address getting the rest of the class javadoc'd.
Closing.
Comment 15 Thomas Watson CLA 2010-04-15 12:04:46 EDT
Olivier, Could you please add the following methods to the api exception list that showed up in last night's API report:

org.eclipse.equinox.p2.metadata.MetadataFactory#IRequirement createRequirement(String, String, VersionRange, IMatchExpression, int, int, boolean, String)

org.eclipse.equinox.p2.metadata.MetadataFactory#IRequirement createRequirement(IMatchExpression, IMatchExpression, int, int, boolean, String)

org.eclipse.equinox.p2.metadata.MetadataFactory#IUpdateDescriptor createUpdateDescriptor(String, VersionRange, int, String, URI)
Comment 16 Olivier Thomann CLA 2010-04-15 12:11:22 EDT
Sure. I'll take care of this.
Comment 17 Olivier Thomann CLA 2010-04-15 12:35:43 EDT
Done. I also added as commented entries the new entries for SWT (they added @noreference tag)