Hi all,
I have difficulties with IU analysis. I wonder what determines the type
of an IU.
Basically we can analyze following properties:
1) does ID end with ".feature.group" or not?
2) is "org.eclipse.equinox.p2.type.category" set to true?
3) is "org.eclipse.equinox.p2.type.group" set to true?
My guess is that this we could use following algorithm:
if("true".equalsIgnoreCase(iu.getProperty(IInstallableUnit.PROP_TYPE_CATEGORY)))
{
if("true".equalsIgnoreCase(iu.getProperty(IInstallableUnit.PROP_TYPE_GROUP)))
return NESTED_CATEGORY;
else
return CATEGORY;
}
if("true".equalsIgnoreCase(iu.getProperty(IInstallableUnit.PROP_TYPE_GROUP)))
return PRODUCT;
if(iu.getId().endsWith(".feature.group"))
return FEATURE;
if(iu.isFragment())
return FRAGMENT;
if(iu.isBundle())
return BUNDLE;
return OTHER;
You may have noticed that I also used two category variants - normal
and nested. This is an attempt to handle cases such as http://download.eclipse.org/releases/galileo
| General Purpose Tools | PDE/API Tools Environment Descriptions.
The algorithm looks fairly complicated. Is there any standard method
for this in p2 code? If not, is my suggestion correct?
Thanks,
Filip
|