Bug 248953 - [plug-in registry] view could display bundle fragments
Summary: [plug-in registry] view could display bundle fragments
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: 3.5 M6   Edit
Assignee: Chris Aniszczyk CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks:
 
Reported: 2008-09-29 11:21 EDT by Jacek Pospychala CLA
Modified: 2009-03-10 10:12 EDT (History)
1 user (show)

See Also:


Attachments
show fragments in plug-in registry (69.24 KB, patch)
2009-03-08 14:06 EDT, Jacek Pospychala CLA
no flags Details | Diff
org.eclipse.pde.patch (15.87 KB, patch)
2009-03-09 10:53 EDT, Chris Aniszczyk CLA
no flags Details | Diff
patch (29.44 KB, patch)
2009-03-10 08:21 EDT, Jacek Pospychala CLA
caniszczyk: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jacek Pospychala CLA 2008-09-29 11:21:04 EDT
OSGi console prints info about all plug-ins and their fragments like this:
169	<<LAZY>>    org.eclipse.ecf.provider.filetransfer_2.0.1.v20080908-0800
	            Fragments=72
...
172	RESOLVED    org.eclipse.ui.workbench.compatibility_3.2.0.I20080509-2000
	            Master=27

so for every plug-in we get an idea it has fragments and we can recognize fragments from regular bundles.

OSGi API (e.g. BundleContext.getBundles()) by default returns all bundles AND fragments.

Plug-in registry view doesn't show fragments now. It could show something like this:

-+ org.eclipse.some.bundle
 +- Fragments
 |+- org.eclipse.some.bundle.fragment1
 |+- org.eclipse.some.bundle.fragment2
 +- Extensions
 +- Extension Points
 +- Prerequisites

(bug found when testing patch for bug 243441)
Comment 1 Chris Aniszczyk CLA 2008-09-29 13:12:29 EDT
+1
Comment 2 Chris Aniszczyk CLA 2009-03-03 11:32:07 EST
Want to look at this one Jacek?
Comment 3 Jacek Pospychala CLA 2009-03-08 14:06:02 EDT
Created attachment 127958 [details]
show fragments in plug-in registry

Almost finished.
Need to add host bundle version checking. Now host bundle is matched only by name.
Comment 4 Chris Aniszczyk CLA 2009-03-08 21:54:34 EDT
Awesome! The tests patch doesn't apply well, can you fix that? I'd love to see this in for M6 :)
Comment 5 Chris Aniszczyk CLA 2009-03-09 10:53:54 EDT
Created attachment 128036 [details]
org.eclipse.pde.patch

An updated patch that removes some of the remote stuff in there.
Comment 6 Chris Aniszczyk CLA 2009-03-09 10:54:57 EDT
Hey Jacek, I think you left the remoting stuff in by accident.

I tried to remove the stuff in the reworked patch above. However, displaying fragments doesn't work as expected for me. I would expect them to appear in the full list of plug-ins and also as described in the original bug.
Comment 7 Jacek Pospychala CLA 2009-03-09 11:02:08 EDT
yap, I attached wrong patch and left all work at home. this one is for some other bug. what a shame :-PP
no worry, patch for fragments is short and strightforward = maybe even works :-)
Comment 8 Jacek Pospychala CLA 2009-03-10 08:21:28 EDT
Created attachment 128183 [details]
patch

this time right patch with fragments version range checks and unit tests update.
zx please review.
Comment 9 Chris Aniszczyk CLA 2009-03-10 09:54:20 EDT
done.

> 20090309

Thanks Jacek! I updated the label provider to use a special icon for fragments.

I'm going to open another bug about using styled cell label provider for the registry view to make it sexier.

Thanks for your contribution!
Comment 10 Jacek Pospychala CLA 2009-03-10 09:57:53 EDT
(In reply to comment #9)
> Thanks Jacek! I updated the label provider to use a special icon for fragments.
> 
> I'm going to open another bug about using styled cell label provider for the
> registry view to make it sexier.

To colorize "x.y.z fragment" in bundle label? I was considering adding an attribute node telling the fragment host bundle name, like it's done with bundle location

anyway, CC me plz :-)

Comment 11 Jacek Pospychala CLA 2009-03-10 10:05:22 EDT
(In reply to comment #10)
> > I'm going to open another bug about using styled cell label provider for the
> > registry view to make it sexier.

ah another use would be to bold/colorize last changed elements.