[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[p2-dev] P2 Profiles and IDirector

Hi folks,

I finally managed to use P2 (for a customized remote install procedure) programmatically, although it was very difficult to get so far due to the lack of  documentation. Thus I still  have a lot of questions regarding P2.

1. Profiles: how exactly do I use profiles for install procedures? Say I have provisioned (not necessary with P2) my RCP application to some customer PCs. Now I want to remotely update these RCP-clients and e.g. install a new feature. Say I am able to connect with these clients and execute remote calls.
- Is there a default profile each customer has where I have to install my new features? 
- Or do I have to create a new profile for my new features I want to add? If so, I do not know the customer's disk layout, so how do I know where to create the new profile?

2. IDirector and dependencies: To install a new feature I have to provide the repository URL and the featureID:

.addRepository(new URI(repositorylocation));
.addRepository(new URI(repositorylocation));


Query query = new MatchQuery() {

public boolean isMatch(Object object) {
IInstallableUnit candidate = (IInstallableUnit) object;
//  FEature to install
return candidate.getId().equals(

Collector collector = new Collector();
Collector test = metadataRepository.query(query, collector,
new NullProgressMonitor());


In case my feature has dependencies to other plug-ins (not features!) which are located in a different repository. When I create a feature project I can define on the dependencies-tab which plug-ins my feature depends on. How does P2 know where to download these dependencies? Do I have to provide P2 an additional repository location?

These are the fist questions so far and I would be very grateful if you could help me to sort things out.