------------------------------
Message: 2
Date: Sat, 19 Sep 2009 11:01:13 -0400
From: Jeff McAffer <jeff@xxxxxxxxxxxxxxxxx>
Subject: Re: [equinox-dev] How to recognize Categories, Features,
Bundles and Products?
To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Message-ID: <1BADD6A2-F763-43C2-950E-A5F42F8D106F@xxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="us-ascii"
Perhaps some information on why you are doing this would help. It
seems that you are infering some semantics from things that just
*happen* to be a certain way. This may change in the future so
understanding what you are actually looking for would help.
Jeff
On 18-Sep-09, at 5:53 AM, Filip Hrbek wrote:
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
--
Filip Hrbek | filip.hrbek@xxxxxxxxxxxxxx | +420.777.662642 |
skype: filip.hrbek
CLOUDSMITH | Czech Republic
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://dev.eclipse.org/mailman/private/equinox-dev/attachments/20090919/475613ca/attachment.html
------------------------------
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev
End of equinox-dev Digest, Vol 53, Issue 25
*******************************************