Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 260913

Summary: [metadata] Move concrete metadata classes to an internal package
Product: [Eclipse Project] Equinox Reporter: Ian Bull <irbull>
Component: p2Assignee: John Arthorne <john.arthorne>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aniefer, curtis.windatt.public, dj.houghton, john.arthorne
Version: unspecified   
Target Milestone: 3.5 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 262109    
Bug Blocks:    
Attachments:
Description Flags
Patch to PDE UI
none
Moves classes to an internal package none

Description Ian Bull CLA 2009-01-13 14:43:20 EST
Now that Bug# 256359 is fixed, we should move the concrete metadata classes to o.e.e.internal.p2.metadata. This should just affect import statements.
Comment 1 John Arthorne CLA 2009-01-13 16:10:18 EST
I noticed there are a couple of references in PDE Build to RequiredCapability and RequirementChange. We'll need to get either Andrew or Chris A to fix these before moving.

Another missing piece is that License, Copyright and RequirementChange still have public constructors, and no factory method on MetadataFactory. We need to add those factory methods so clients constructing them can stop using the concrete class constructors.

I think once these changes are made the move should be trivial and we won't even need to carefully coordinate it. Most of the concrete classes are only referenced now in MetadataFactory, so the code change here is quite tiny.
Comment 2 Andrew Niefer CLA 2009-01-13 17:07:32 EST
These references are PDE/UI and will need Chris or Curtis.
Comment 3 John Arthorne CLA 2009-01-14 15:13:23 EST
Right, I was fooled by the "build" in the package name. Curtis, the references are in:

org.eclipse.pde.internal.ui.build.RuntimeInstallJob.createInstallableUnitPatch(String, Version, Version, IProfile, IProgressMonitor)
Comment 4 John Arthorne CLA 2009-01-14 15:14:32 EST
Since there are series of coordinated changes needed here, I have released a factory method for constructing a requirement change. This will allow PDE UI to move away from the concrete class, which will then allow the move to occur. Factory methods are still needed for Copyright and License.
Comment 5 John Arthorne CLA 2009-01-14 15:18:32 EST
Created attachment 122575 [details]
Patch to PDE UI
Comment 6 Curtis Windatt CLA 2009-01-14 15:46:47 EST
The PDE UI patch has been applied.
Comment 7 Ian Bull CLA 2009-01-22 19:25:40 EST
I opened Bug 262109 for adding the factory methods for Copyright and License.
Comment 8 Ian Bull CLA 2009-01-23 03:12:09 EST
Created attachment 123485 [details]
Moves classes to an internal package

This patch updates references to RequirementChange (they now use the factory) and it moves the classes to an internal package.
Comment 9 John Arthorne CLA 2009-02-12 17:32:26 EST
I'll take this. The patch was out of date but applying the refactorings myself was just as easy.
Comment 10 John Arthorne CLA 2009-02-12 17:33:09 EST
Fixed in HEAD.
Comment 11 Ian Bull CLA 2009-02-12 18:58:32 EST
Thanks John.