Community
Participate
Working Groups
There are many methods on MetadataFactory to create a Requirement. We keep adding new methods with more arguments. We should consider the approach we took with InstallableUnit and create a RequirementDescription object which the client creates and populates and then we would use that to create the Requirement instance.
I took a look at this as motivation to become more familiar with some P2 code. This case looks a little different than the InstallableUnit case in that the MetaDataFactory.createRequirement* methods seem to map onto various flavours of RequiredCapabilities constructors and that these constructors are called in many places in the code base. The non-test occurances being primarily in generator and publisher. Is it the case that all places in the code directly instantiating RequiredCapabilities should be changed to call the static methods on MetaDataFactory? If that is not the case, are we sure that the current single line calls to the RequiredCapabilities constructors will really be improved by multi line calls like: RequirementDescriptor descriptor = new RequirementDescriptor(); descriptor.setName(name); descriptor.setNameSpace(namespace); descriptor.setRange(range); ... Clearly we could make a few multiple argument constructors on the new descriptor ... but that probably just creates the same permuations we see on the create methods.
Move all 3.8 bugs to Juno.
Given that this has been absent for so long, it seems there would be very few users of any new API developed for this purpose at this point in time.