Community
Participate
Working Groups
We should provide a mechanism to search p2 repos for packages, bundles or features and add the matching IUs to your target. I thought we had a bug for this, but I can't find it.
Created attachment 148667 [details] patch Start of a patch to create a search dialog.
Created attachment 148668 [details] mylyn/context/zip
Created attachment 148702 [details] Updated Patch This is still very hacky, and I'll continue to work on it in the coming weeks, but I think the idea is good. It will allow you to search for packages / bundles or features in p2 repositories, and add the resulting IUs to your target. This doesn't work yet (so don't try it out), I just wanted to put this here so that it doesn't get lost.
Created attachment 148703 [details] mylyn/context/zip
While working on this, it became evident that there are actually 4 workflows that we can enable with this work. 1. When you add a bundle dependency (on the dependency tab of the Manifest editor) you can either choose your current target, or a p2 repository from which to fetch the bundle (or all repos). If you add it from a repo it will fetch the bundle (and the dependencies) and add it to your manifest. 2. When you add a package dependency (on the dependency tab of the Manifest editor) you can either choose your current target, or a p2 repo. If you choose a repo, it will present you with a list of bundles that provide that package and you can choose which bundle you want. The bundle will be downloaded and the package will be added to the dependency list. 3. When you add an included feature (on the feature editor), like #1 and #2 you can either search your target or a p2 repo. If a remote feature is choosen, it will fetch the feature (and included bundles) and add the feature to list. 4. Ctrl+Sift+8 (for now). This will bring up a dialog and allow you to search p2 repos for bundles (or features) to add to your target.
For now, I want us to focus on #4 as #1,2,3 have some complicated aspects to it that we need to think through. The first workflow I want to enable is people to search for artifacts quickly and amend your target with those artifacts. I also want to use the underlying code to improve PDEs' quickfixes to do this search for missing imports and dependencies. While working with people, a big complaint is usually checking out a project and missing dependencies. This feature should alleviate a big part of that pain. In the end, the goal is to make it easier for people to craft their target definitions. We can tackle #1,23 once the rest is in place :) I will add the quickfix support and add to target support.
I think Chris's comment #6 is the right direction. Add the feature to add a bundle then integrate it into the quickfixes so missing bundles can be added.
Just out of curiosity, what will happen if your running system is your target (i.e. the default behaviour for Eclipse)? Can we "install" bundles into this target or is this just a regular p2 install?
This isn't a problem.
*** Bug 292045 has been marked as a duplicate of this bug. ***
Created attachment 149611 [details] org.eclipse.pde.patch An updated patch that actually installs selected IUs into your target.
It's still a proof of concept hack, but I'm in love already. Here's some basic things that need to be done in the next revision. 1) We need to figure out the proper workflow for this... I have some ideas that we'll discuss over tomorrow's call. 2) Need to refactor out the query mechanism from the dialog. I would like to query for IUs in other scenarios, like from a quickfix. 3) Need to figure out the proper repositories to query for things. Right now we search across all repos. It seems we need a notion of "target" repositories.
Created attachment 149841 [details] Updated patch This updated patch refactors out the query so it's passed to the dialog in the constructor. The query has also been updated to search java.packages now too. In summary, we now search an IUs: name ID java.packages in provided capabilities
Created attachment 149842 [details] mylyn/context/zip
Created attachment 149915 [details] org.eclipse.pde.patch An updated and complete patch.
To sort by latest version we need LatestIUQuery to work on VersionedIds, not just IUs. Added bug 292727 as a dependency.
Created attachment 149941 [details] org.eclipse.pde.patch This updated patch now includes packages in your search.
Created attachment 149942 [details] mylyn/context/zip
Created attachment 149946 [details] org.eclipse.pde.patch This patch now "installs" packages. (it gets the IU that the package is in and installs that).
Created attachment 149947 [details] mylyn/context/zip
Created attachment 150153 [details] org.eclipse.pde.patch I have removed the injection of the search pattern and created a small workaround for a p2 bug. The p2 bug will be fixed in M4.
Created attachment 150154 [details] mylyn/context/zip
*** Bug 290402 has been marked as a duplicate of this bug. ***
Created attachment 156711 [details] org.eclipse.pde.patch An updated patch against HEAD.
Created attachment 160541 [details] org.eclipse.pde.patch The latest patch...
I dropped the initial cut of this. It's complete but still needs polish. To access the functionality, M1+M2+M3+A (can't think of a better binding).