Bug 291227 - [target][p2] Provide a search tool which searches p2 repos and adds matching IUs to your target
Summary: [target][p2] Provide a search tool which searches p2 repos and adds matching ...
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 3.6 M6   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
: 290402 292045 (view as bug list)
Depends on: 292727
Blocks:
  Show dependency tree
 
Reported: 2009-10-02 12:38 EDT by Ian Bull CLA
Modified: 2010-03-01 16:38 EST (History)
10 users (show)

See Also:


Attachments
patch (8.76 KB, patch)
2009-10-02 13:52 EDT, Ian Bull CLA
no flags Details | Diff
mylyn/context/zip (66.08 KB, application/octet-stream)
2009-10-02 13:52 EDT, Ian Bull CLA
no flags Details
Updated Patch (15.43 KB, patch)
2009-10-02 18:59 EDT, Ian Bull CLA
no flags Details | Diff
mylyn/context/zip (357.76 KB, application/octet-stream)
2009-10-02 18:59 EDT, Ian Bull CLA
no flags Details
org.eclipse.pde.patch (18.92 KB, patch)
2009-10-14 20:57 EDT, Chris Aniszczyk CLA
no flags Details | Diff
Updated patch (19.92 KB, patch)
2009-10-19 00:28 EDT, Ian Bull CLA
no flags Details | Diff
mylyn/context/zip (541.34 KB, application/octet-stream)
2009-10-19 00:28 EDT, Ian Bull CLA
no flags Details
org.eclipse.pde.patch (21.43 KB, patch)
2009-10-19 16:09 EDT, Chris Aniszczyk CLA
no flags Details | Diff
org.eclipse.pde.patch (25.18 KB, patch)
2009-10-20 00:01 EDT, Ian Bull CLA
no flags Details | Diff
mylyn/context/zip (197.79 KB, application/octet-stream)
2009-10-20 00:01 EDT, Ian Bull CLA
no flags Details
org.eclipse.pde.patch (25.39 KB, patch)
2009-10-20 00:57 EDT, Ian Bull CLA
no flags Details | Diff
mylyn/context/zip (51.89 KB, application/octet-stream)
2009-10-20 00:57 EDT, Ian Bull CLA
no flags Details
org.eclipse.pde.patch (25.03 KB, patch)
2009-10-21 15:52 EDT, Ian Bull CLA
no flags Details | Diff
mylyn/context/zip (101.37 KB, application/octet-stream)
2009-10-21 15:52 EDT, Ian Bull CLA
no flags Details
org.eclipse.pde.patch (22.31 KB, text/plain)
2010-01-20 16:05 EST, Chris Aniszczyk CLA
no flags Details
org.eclipse.pde.patch (21.84 KB, patch)
2010-03-01 16:30 EST, Chris Aniszczyk CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Bull CLA 2009-10-02 12:38:12 EDT
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.
Comment 1 Ian Bull CLA 2009-10-02 13:52:55 EDT
Created attachment 148667 [details]
patch

Start of a patch to create a search dialog.
Comment 2 Ian Bull CLA 2009-10-02 13:52:58 EDT
Created attachment 148668 [details]
mylyn/context/zip
Comment 3 Ian Bull CLA 2009-10-02 18:59:20 EDT
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.
Comment 4 Ian Bull CLA 2009-10-02 18:59:34 EDT
Created attachment 148703 [details]
mylyn/context/zip
Comment 5 Ian Bull CLA 2009-10-02 22:41:59 EDT
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.
Comment 6 Chris Aniszczyk CLA 2009-10-04 20:29:24 EDT
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.
Comment 7 Curtis Windatt CLA 2009-10-06 11:08:04 EDT
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.
Comment 8 Ian Bull CLA 2009-10-06 11:43:31 EDT
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?
Comment 9 Chris Aniszczyk CLA 2009-10-06 11:45:18 EDT
This isn't a problem.
Comment 10 Chris Aniszczyk CLA 2009-10-12 10:39:32 EDT
*** Bug 292045 has been marked as a duplicate of this bug. ***
Comment 11 Chris Aniszczyk CLA 2009-10-14 20:57:09 EDT
Created attachment 149611 [details]
org.eclipse.pde.patch

An updated patch that actually installs selected IUs into your target.
Comment 12 Chris Aniszczyk CLA 2009-10-14 21:00:49 EDT
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.
Comment 13 Ian Bull CLA 2009-10-19 00:28:18 EDT
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
Comment 14 Ian Bull CLA 2009-10-19 00:28:31 EDT
Created attachment 149842 [details]
mylyn/context/zip
Comment 15 Chris Aniszczyk CLA 2009-10-19 16:09:47 EDT
Created attachment 149915 [details]
org.eclipse.pde.patch

An updated and complete patch.
Comment 16 Ian Bull CLA 2009-10-19 23:58:37 EDT
To sort by latest version we need LatestIUQuery to work on VersionedIds, not just IUs. Added bug 292727 as a dependency.
Comment 17 Ian Bull CLA 2009-10-20 00:01:00 EDT
Created attachment 149941 [details]
org.eclipse.pde.patch

This updated patch now includes packages in your search.
Comment 18 Ian Bull CLA 2009-10-20 00:01:07 EDT
Created attachment 149942 [details]
mylyn/context/zip
Comment 19 Ian Bull CLA 2009-10-20 00:57:37 EDT
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).
Comment 20 Ian Bull CLA 2009-10-20 00:57:43 EDT
Created attachment 149947 [details]
mylyn/context/zip
Comment 21 Ian Bull CLA 2009-10-21 15:52:31 EDT
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.
Comment 22 Ian Bull CLA 2009-10-21 15:52:38 EDT
Created attachment 150154 [details]
mylyn/context/zip
Comment 23 Chris Aniszczyk CLA 2009-10-27 06:35:07 EDT
*** Bug 290402 has been marked as a duplicate of this bug. ***
Comment 24 Chris Aniszczyk CLA 2010-01-20 16:05:19 EST
Created attachment 156711 [details]
org.eclipse.pde.patch

An updated patch against HEAD.
Comment 25 Chris Aniszczyk CLA 2010-03-01 16:30:54 EST
Created attachment 160541 [details]
org.eclipse.pde.patch

The latest patch...
Comment 26 Chris Aniszczyk CLA 2010-03-01 16:38:01 EST
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).