<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Commentaires sur : Retrouver le bundle auquel appartient une classeGiven a class, how to retrieve its bundle?</title>
	<atom:link href="http://blog.benjamin-cabe.com/2009/07/16/given-a-class-how-to-retrieve-its-bundle/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.benjamin-cabe.com/2009/07/16/given-a-class-how-to-retrieve-its-bundle</link>
	<description>[:fr]Eclipse, les oiseaux et ta mère[:en]Eclipse, the birds and yo momma</description>
	<lastBuildDate>Thu, 19 Nov 2009 13:57:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Par : Peter Friese</title>
		<link>http://blog.benjamin-cabe.com/2009/07/16/given-a-class-how-to-retrieve-its-bundle/comment-page-1#comment-803</link>
		<dc:creator>Peter Friese</dc:creator>
		<pubDate>Sun, 19 Jul 2009 17:49:41 +0000</pubDate>
		<guid isPermaLink="false">http://blog.benjamin-cabe.com/2009/05/13/osgi-retrouver-le-bundle-auquel-appartient-une-classe#comment-803</guid>
		<description>Wow - finally, we can retrieve the bundle a class belongs to, after years of &quot;you can&#039;t touch this&quot; (see http://wiki.eclipse.org/FAQ_How_do_I_locate_the_owner_plug-in_from_a_given_class%3F). Is hell freezing over?

At any rate, this is great news and I assume many people will be glad to exploit this feature. Let&#039;s hope they use it wisely.</description>
		<content:encoded><![CDATA[<p>Wow &#8211; finally, we can retrieve the bundle a class belongs to, after years of &laquo;&nbsp;you can&#8217;t touch this&nbsp;&raquo; (see <a href="http://wiki.eclipse.org/FAQ_How_do_I_locate_the_owner_plug-in_from_a_given_class%3F)" rel="nofollow">http://wiki.eclipse.org/FAQ_How_do_I_locate_the_owner_plug-in_from_a_given_class%3F)</a>. Is hell freezing over?</p>
<p>At any rate, this is great news and I assume many people will be glad to exploit this feature. Let&#8217;s hope they use it wisely.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Lars Vogel</title>
		<link>http://blog.benjamin-cabe.com/2009/07/16/given-a-class-how-to-retrieve-its-bundle/comment-page-1#comment-800</link>
		<dc:creator>Lars Vogel</dc:creator>
		<pubDate>Fri, 17 Jul 2009 08:14:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.benjamin-cabe.com/2009/05/13/osgi-retrouver-le-bundle-auquel-appartient-une-classe#comment-800</guid>
		<description>Thank you Benjamin.</description>
		<content:encoded><![CDATA[<p>Thank you Benjamin.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Benjamin Cabé</title>
		<link>http://blog.benjamin-cabe.com/2009/07/16/given-a-class-how-to-retrieve-its-bundle/comment-page-1#comment-799</link>
		<dc:creator>Benjamin Cabé</dc:creator>
		<pubDate>Fri, 17 Jul 2009 08:01:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.benjamin-cabe.com/2009/05/13/osgi-retrouver-le-bundle-auquel-appartient-une-classe#comment-799</guid>
		<description>@Philip

&lt;em&gt;&gt; Yeah the 3d-cloud plugin here is very cool. Is the source for it available?&lt;/em&gt;

If you download the &quot;Developer version&quot; there, http://wordpress.org/extend/plugins/wp-cumulus/download/ you&#039;ll get the sources! :-)</description>
		<content:encoded><![CDATA[<p>@Philip</p>
<p><em>&gt; Yeah the 3d-cloud plugin here is very cool. Is the source for it available?</em></p>
<p>If you download the &laquo;&nbsp;Developer version&nbsp;&raquo; there, <a href="http://wordpress.org/extend/plugins/wp-cumulus/download/" rel="nofollow">http://wordpress.org/extend/plugins/wp-cumulus/download/</a> you&#8217;ll get the sources! <img src='http://blog.benjamin-cabe.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Benjamin Cabé</title>
		<link>http://blog.benjamin-cabe.com/2009/07/16/given-a-class-how-to-retrieve-its-bundle/comment-page-1#comment-798</link>
		<dc:creator>Benjamin Cabé</dc:creator>
		<pubDate>Fri, 17 Jul 2009 07:51:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.benjamin-cabe.com/2009/05/13/osgi-retrouver-le-bundle-auquel-appartient-une-classe#comment-798</guid>
		<description>@Lars

&lt;em&gt;&gt; Do you know how to get the information which packages are exported by the bundle?&lt;/em&gt;

You need to use the PackageAdmin service. Get a &lt;code&gt;PackageAdmin&lt;/code&gt; service reference the way you like most (using a ServiceTracker, Declarative Services, or whatever) and you will then be able to call &lt;code&gt;PackageAdmin#getExportedPackages(Bundle)&lt;/code&gt;!

&lt;em&gt;&gt; Is there also a method to get the corresponding bundle for a selected project?&lt;/em&gt;
You need to use PDE core API, and call &lt;code&gt;o.e.pde.core.plugin.PluginRegistry#findModel(IProject)&lt;/code&gt;.</description>
		<content:encoded><![CDATA[<p>@Lars</p>
<p><em>> Do you know how to get the information which packages are exported by the bundle?</em></p>
<p>You need to use the PackageAdmin service. Get a <code>PackageAdmin</code> service reference the way you like most (using a ServiceTracker, Declarative Services, or whatever) and you will then be able to call <code>PackageAdmin#getExportedPackages(Bundle)</code>!</p>
<p><em>> Is there also a method to get the corresponding bundle for a selected project?</em><br />
You need to use PDE core API, and call <code>o.e.pde.core.plugin.PluginRegistry#findModel(IProject)</code>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Philipp Kursawe</title>
		<link>http://blog.benjamin-cabe.com/2009/07/16/given-a-class-how-to-retrieve-its-bundle/comment-page-1#comment-797</link>
		<dc:creator>Philipp Kursawe</dc:creator>
		<pubDate>Fri, 17 Jul 2009 07:07:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.benjamin-cabe.com/2009/05/13/osgi-retrouver-le-bundle-auquel-appartient-une-classe#comment-797</guid>
		<description>Yeah the 3d-cloud plugin here is very cool. Is the source for it available? Would be nice to have it in my Eclipse app :)</description>
		<content:encoded><![CDATA[<p>Yeah the 3d-cloud plugin here is very cool. Is the source for it available? Would be nice to have it in my Eclipse app <img src='http://blog.benjamin-cabe.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Philipp Kursawe</title>
		<link>http://blog.benjamin-cabe.com/2009/07/16/given-a-class-how-to-retrieve-its-bundle/comment-page-1#comment-796</link>
		<dc:creator>Philipp Kursawe</dc:creator>
		<pubDate>Fri, 17 Jul 2009 07:06:46 +0000</pubDate>
		<guid isPermaLink="false">http://blog.benjamin-cabe.com/2009/05/13/osgi-retrouver-le-bundle-auquel-appartient-une-classe#comment-796</guid>
		<description>I have used ((BundleReference)getClass().getClassLoader()) directly until now. Thanks to inform us, that there is a framework method to do that now.

I have also adjusted my code assist templates like:
bundle
${imp:import(org.osgi.framework.FrameworkUtil)}
FrameworkUtil.getBundle(getClass())${cursor}

For bundle and bc (bundleContext) import the templates from here:
http://pastebin.com/m3b4a1ef1</description>
		<content:encoded><![CDATA[<p>I have used ((BundleReference)getClass().getClassLoader()) directly until now. Thanks to inform us, that there is a framework method to do that now.</p>
<p>I have also adjusted my code assist templates like:<br />
bundle<br />
${imp:import(org.osgi.framework.FrameworkUtil)}<br />
FrameworkUtil.getBundle(getClass())${cursor}</p>
<p>For bundle and bc (bundleContext) import the templates from here:<br />
<a href="http://pastebin.com/m3b4a1ef1" rel="nofollow">http://pastebin.com/m3b4a1ef1</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Lars Vogel</title>
		<link>http://blog.benjamin-cabe.com/2009/07/16/given-a-class-how-to-retrieve-its-bundle/comment-page-1#comment-794</link>
		<dc:creator>Lars Vogel</dc:creator>
		<pubDate>Thu, 16 Jul 2009 20:58:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.benjamin-cabe.com/2009/05/13/osgi-retrouver-le-bundle-auquel-appartient-une-classe#comment-794</guid>
		<description>Very nice tip.

Do you know how to get the information which packages are exported by the bundle? Is there also a method to get the corresponding bundle for a selected project?

By the way the WP-Cumulus plug-in is cool!</description>
		<content:encoded><![CDATA[<p>Very nice tip.</p>
<p>Do you know how to get the information which packages are exported by the bundle? Is there also a method to get the corresponding bundle for a selected project?</p>
<p>By the way the WP-Cumulus plug-in is cool!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Benjamin Cabé</title>
		<link>http://blog.benjamin-cabe.com/2009/07/16/given-a-class-how-to-retrieve-its-bundle/comment-page-1#comment-793</link>
		<dc:creator>Benjamin Cabé</dc:creator>
		<pubDate>Thu, 16 Jul 2009 16:59:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.benjamin-cabe.com/2009/05/13/osgi-retrouver-le-bundle-auquel-appartient-une-classe#comment-793</guid>
		<description>Yup of course but in 3.5 I find it more direct to use this new thing ;-)</description>
		<content:encoded><![CDATA[<p>Yup of course but in 3.5 I find it more direct to use this new thing <img src='http://blog.benjamin-cabe.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Par : Chris Aniszczyk</title>
		<link>http://blog.benjamin-cabe.com/2009/07/16/given-a-class-how-to-retrieve-its-bundle/comment-page-1#comment-792</link>
		<dc:creator>Chris Aniszczyk</dc:creator>
		<pubDate>Thu, 16 Jul 2009 16:46:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.benjamin-cabe.com/2009/05/13/osgi-retrouver-le-bundle-auquel-appartient-une-classe#comment-792</guid>
		<description>You can use the PackageAdmin too! :)</description>
		<content:encoded><![CDATA[<p>You can use the PackageAdmin too! <img src='http://blog.benjamin-cabe.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
