<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Manuel Selva's Eclipse blog</title>
	<atom:link href="http://manuelselva.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://manuelselva.wordpress.com</link>
	<description>My Eclipse Experiences</description>
	<pubDate>Wed, 21 May 2008 11:53:03 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
			<item>
		<title>Multi-instances of a ViewPart - Part 2</title>
		<link>http://manuelselva.wordpress.com/2008/05/21/multi-instances-of-a-viewpart-part-2/</link>
		<comments>http://manuelselva.wordpress.com/2008/05/21/multi-instances-of-a-viewpart-part-2/#comments</comments>
		<pubDate>Wed, 21 May 2008 11:53:03 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
		
		<category><![CDATA[Eclipse Misc]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=35</guid>
		<description><![CDATA[As discussed in a previous post I created an application with a View allowing multi instances.
An other problem I encountered with multi instances views is about Views persistence between several launches.
When the workbench is closed Eclipse automatically remember each opened view&#8217;s position. This way the next time I&#8217;ll start my workbench these opened views will [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>As discussed in a previous <a href="http://manuelselva.wordpress.com/2008/05/15/multi-instances-of-a-viewpart/">post</a> I created an application with a View allowing multi instances.</p>
<p>An other problem I encountered with multi instances views is about Views persistence between several launches.</p>
<p>When the workbench is closed Eclipse automatically remember each opened view&#8217;s position. This way the next time I&#8217;ll start my workbench these opened views will be automatically displayed.</p>
<p>In my case this behavior is not the good one since view&#8217;s content is not persistent across launches. For example if the user leaves its workbench with 6 opened instances of my view he &#8216;ll get 6 empty views at next launch &#8230;</p>
<p>To solve this problem I just added an IWorkbenchListener closing all the opened instances of my view when the workbench is closing down. Closing a view is done by the IWorkbenchPage.hideView() method.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/manuelselva.wordpress.com/35/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/manuelselva.wordpress.com/35/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/35/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/35/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/35/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&blog=2529905&post=35&subd=manuelselva&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2008/05/21/multi-instances-of-a-viewpart-part-2/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/manu38400-128.jpg" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Multi-instances of a ViewPart</title>
		<link>http://manuelselva.wordpress.com/2008/05/15/multi-instances-of-a-viewpart/</link>
		<comments>http://manuelselva.wordpress.com/2008/05/15/multi-instances-of-a-viewpart/#comments</comments>
		<pubDate>Thu, 15 May 2008 15:23:34 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
		
		<category><![CDATA[Eclipse Misc]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=34</guid>
		<description><![CDATA[I didn&#8217;t blogged for a while because I am working on a new Eclipse application. This application defines a new View. This view is created with allowMultiple = true.
This view is associated with a given file extension. Each time the user double click on such a file a new instance of the view is created [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I didn&#8217;t blogged for a while because I am working on a new Eclipse application. This application defines a new View. This view is created with <strong>allowMultiple = true</strong>.</p>
<p>This view is associated with a given file extension. Each time the user double click on such a file a new instance of the view is created using IWorkbenchPage.showView(primaryId, secondaryId).</p>
<p>I quickly got my multi instances view mechanism functional. The next step was to manage &#8220;correctly&#8221; the behavior of :</p>
<p><strong>Window -&gt; Show View -&gt; MyMultiInstanceView ??? </strong></p>
<p><strong>What happens when the user clicks other there &#8230; ???</strong></p>
<p>Launching my app in debug mode told me than my view is created (by Eclipse and not explicitily by my code) in that case with a secondaryId == null. Of course this resulted in a famous NullPointerException ;0)</p>
<p>A first and simple solution is to check the secondaryId and provide an empty view (or a view with a simple message)  when this Id is null &#8230;</p>
<p>I decided to use an other solution using the &#8220;master view&#8221; (the one displayed when the user clicks windows -&gt; show view) to display informations about all the other opened views (the ones with a secondaryId != null associated to a file).  This view just contains a ListViewer showing all the other opened views. A double click on a given element of that list gives brings the associated view to the top. When a view is closed by the user, the associated entry in the view is removed.</p>
<p>This solution help me to solve the problem of providing the user a way to open a &#8220;meaningless view&#8221; in its perspective.</p>
<p>Here I had to &#8220;search&#8221; for something to display in the master view. Since new instances can only be created programatically it could be nice in some cases for plug-ins developers to be able to tell the platform: <em>&#8220;don&#8217;t create Show View menu entry for this view&#8221; </em> &#8230;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/manuelselva.wordpress.com/34/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/manuelselva.wordpress.com/34/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&blog=2529905&post=34&subd=manuelselva&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2008/05/15/multi-instances-of-a-viewpart/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/manu38400-128.jpg" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Eclipse Selection Service Tip</title>
		<link>http://manuelselva.wordpress.com/2008/04/29/eclipse-selection-service-tip/</link>
		<comments>http://manuelselva.wordpress.com/2008/04/29/eclipse-selection-service-tip/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 20:37:11 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
		
		<category><![CDATA[Eclipse Misc]]></category>

		<category><![CDATA[Add new tag]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=31</guid>
		<description><![CDATA[As Eclipse&#8217;s plug-in developer I often ask my self: what is the current workbench selection ?? Developers may need such information for example when they want to update a given view according to an other view selection but don&#8217;t know what the provided selection exactly is or when creating a new custom Selection provider. It [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://manuelselva.files.wordpress.com/2008/04/currentselection2.png"></a>As Eclipse&#8217;s plug-in developer I often ask my self: <em>what is the current workbench selection ?? </em>Developers may need such information for example when they want to update a given view according to an other view selection but don&#8217;t know what the provided selection exactly is or when creating a new custom Selection provider. It can also be useful for simple debug purpose.</p>
<p>To answer this question I wrote a simple plug-in adding a new view to my workbench showing the content of the current selection in a simple JFace TableViewer.</p>
<p>The view is added to the PDE category :</p>
<p style="text-align:center;"><a href="http://manuelselva.files.wordpress.com/2008/04/currentselection1.png"><img class="aligncenter size-full wp-image-32" src="http://manuelselva.files.wordpress.com/2008/04/currentselection1.png?w=281&h=422" alt="Current Selection View" width="281" height="422" /></a></p>
<p>Here is what it looks like when two Java methods are selected in the outline view :</p>
<p style="text-align:center;"><a href="http://manuelselva.files.wordpress.com/2008/04/currentselection2.png"><img class="aligncenter size-medium wp-image-33" src="http://manuelselva.files.wordpress.com/2008/04/currentselection2.png?w=300&h=233" alt="Current Selection View" width="300" height="233" /></a></p>
<p style="text-align:center;"><a href="http://manuelselva.files.wordpress.com/2008/04/currentselection2.png"></a></p>
<p>May be I missed something and such information is already available somewhere in the PDE &#8230; ?? If Yes, please let me know.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/manuelselva.wordpress.com/31/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/manuelselva.wordpress.com/31/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&blog=2529905&post=31&subd=manuelselva&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2008/04/29/eclipse-selection-service-tip/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/manu38400-128.jpg" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>

		<media:content url="http://manuelselva.files.wordpress.com/2008/04/currentselection1.png" medium="image">
			<media:title type="html">Current Selection View</media:title>
		</media:content>

		<media:content url="http://manuelselva.files.wordpress.com/2008/04/currentselection2.png?w=300" medium="image">
			<media:title type="html">Current Selection View</media:title>
		</media:content>
	</item>
		<item>
		<title>If Then (If Then Else) Else (If Then Else)</title>
		<link>http://manuelselva.wordpress.com/2008/04/23/if-then-if-then-else-else-if-then-else/</link>
		<comments>http://manuelselva.wordpress.com/2008/04/23/if-then-if-then-else-else-if-then-else/#comments</comments>
		<pubDate>Wed, 23 Apr 2008 21:02:47 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
		
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=30</guid>
		<description><![CDATA[In the same series than Andy Maleh post to-if-else-or-not-to-if-else and after discussions with colleagues I am wondering how you write the following problem using Java If-Else.
 Object a;
Object b;
a == null and b == null -&#62; method1()
a == null and b != null -&#62; method2()
a != null and b != null -&#62; method3()
a != null [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In the same series than Andy Maleh post <a href="http://andymaleh.blogspot.com/2008/04/to-if-else-or-not-to-if-else.html">to-if-else-or-not-to-if-else</a> and after discussions with colleagues I am wondering how you write the following problem using Java If-Else.</p>
<p><code><span style="color:#000000;"> Object a;<br />
Object b;<br />
a == null and b == null -&gt; method1()<br />
a == null and b != null -&gt; method2()<br />
a != null and b != null -&gt; method3()<br />
a != null and b == null -&gt; method4()</span></code></p>
<p>Which method to choose taking into account performances and redability between:</p>
<p><code><span style="color:#000000;"> if (a == null &amp;&amp; b == null) {<br />
method1();<br />
} else if (a == null &amp;&amp; b != null) {<br />
method2();<br />
} else if (a != null &amp;&amp; b != null) {<br />
method3();<br />
} else {<br />
method4();<br />
}</span></code></p>
<p>Or</p>
<p><code><span style="color:#000000;"> if (a == null) {<br />
if (b == null) {<br />
method1();<br />
} else {<br />
method2();<br />
}<br />
} else {<br />
if (b != null) {<br />
method3();<br />
} else {<br />
method4();<br />
}<br />
}</span></code></p>
<p>About readability I&#8217;ll personally choose the first solution. About performances &#8230; I am not sure there is a difference after JVm&#8217;s optimizations &#8230; ??</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/manuelselva.wordpress.com/30/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/manuelselva.wordpress.com/30/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/30/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/30/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/30/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&blog=2529905&post=30&subd=manuelselva&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2008/04/23/if-then-if-then-else-else-if-then-else/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/manu38400-128.jpg" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>
	</item>
		<item>
		<title>JFace&#8217;s Viewers Performances</title>
		<link>http://manuelselva.wordpress.com/2008/04/16/jfaces-viewers-performances/</link>
		<comments>http://manuelselva.wordpress.com/2008/04/16/jfaces-viewers-performances/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 15:40:20 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
		
		<category><![CDATA[Eclipse Misc]]></category>

		<category><![CDATA[SWT]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=29</guid>
		<description><![CDATA[Last weeks I played for the first time with JFace&#8217;s viewers (TableViewer and TreeViewer). It was really easy to integrate my first viewers inside my own Eclipse views.
All was working fine when I started to encounter performances problems when setting inputs containing thousands of entries (several seconds for ~50.000 rows in a TableViewer).
A quick look [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Last weeks I played for the first time with JFace&#8217;s viewers (<code>TableViewer </code>and <code>TreeViewer</code>). It was really easy to integrate my first viewers inside my own Eclipse views.</p>
<p>All was working fine when I started to encounter performances problems when setting inputs containing thousands of entries (several seconds for ~50.000 rows in a <code>TableViewer</code>).</p>
<p>A quick look on Google pointed me to <strong><code>LAZY</code> </strong>content providers and <code><strong>SWT.VIRTUAL</strong> </code>in order to improve performances. Before going further with these content providers we have to identify bottle necks. When working with JFace&#8217;s viewers there is potentially 2 bottle necks:</p>
<ol>
<li>The retrieval of all the model objects from the viewer&#8217;s input (it&#8217;s the content provider&#8217;s job).</li>
<li>The creation of UI elements.</li>
</ol>
<p>As Tom Schindl said <a href="http://wiki.eclipse.org/JFaceSnippets">here</a> (Snippet 29): &#8220;<em>The bottle neck is often the UI and not the model</em>&#8220;.</p>
<p>I checked the time consumed in my content provider to retrieve  viewer&#8217;s entries. Only few milliseconds. My bottle neck is the UI !!</p>
<p>To solve this performances problem I just added the <code>SWT.VIRTUAL </code>style when creating my <code>TableViewer</code>. Creating the viewer this way tells JFace to create the SWT<code>'s TableItem </code> objects on an on demand basis. <code>TableItem </code> objects are created only when they become visible (when the user scroll for example). As a conclusion, all I had to do to solve my performances problem is to set this magic style: <code>SWT.VIRTUAL</code>. It&#8217;s so easy to work with Eclipse !!!!! Isn&#8217;t it ??</p>
<p>Next i tried the same solution with <code>TreeViewer</code>. Unfortunately it didn&#8217;t worked. I had to use the <code>SWT.VIRTUAL </code>style  <strong>WITH</strong> an <code>ILazyTreeContentProvider</code> in order to increase my performances  as in <code>TableViewer</code>. It&#8217;s fine but this solution has one drawback: Sorting and Filtering are no longer available when using <code>ILazyTreeContentProvider.<br />
</code></p>
<p>Someone told me on the Eclipse Platform newsgroup that the request to support <code>SWT.VIRTUAL </code>style and sorting and filtering for <code>TreeViewer</code> is already in the &#8220;pipe&#8221; but i can&#8217;t find such a request on Eclipse bugzilla. If someone can tell me more on that &#8230;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/manuelselva.wordpress.com/29/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/manuelselva.wordpress.com/29/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&blog=2529905&post=29&subd=manuelselva&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2008/04/16/jfaces-viewers-performances/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/manu38400-128.jpg" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>
	</item>
		<item>
		<title>links Directory</title>
		<link>http://manuelselva.wordpress.com/2008/04/09/links-directory/</link>
		<comments>http://manuelselva.wordpress.com/2008/04/09/links-directory/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 20:02:48 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
		
		<category><![CDATA[Eclipse Misc]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=26</guid>
		<description><![CDATA[Several months ago i discovered the Eclipse&#8217;s links directory. Today I saved again a lot of time setting up a new Eclipse installation thanks to this tip. I used Eclipse for long time before discovering this feature and that&#8217;s why i am posting about it.
Links directory allows you to tell Eclipse where to search for [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><a href="http://manuelselva.files.wordpress.com/2008/04/eclipseface.png"></a>Several months ago i discovered the Eclipse&#8217;s links directory. Today I saved again a lot of time setting up a new Eclipse installation thanks to this tip. I used Eclipse for long time before discovering this feature and that&#8217;s why i am posting about it.<a href="http://manuelselva.files.wordpress.com/2008/04/eclipseface.png"></a></p>
<p>Links directory allows you to tell Eclipse where to search for extensions when it starts. This directory just contains several .link files containing each one the path to an extension.</p>
<p>Personally I created a link directory separately from my Eclipse&#8217;s installation directory. Of course I also install my favorite plugins outside the Eclipse&#8217;installation. Each time I install a new Eclipse I just create a symbolic &#8220;link&#8221; (using ln -s , I am on a Linux workstation) in this new install pointing to my shared link directory. All my favorites plug-ins are there !!!</p>
<p>More Informations are available from the eclipse help <a href="http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/product_extension.htm"><img class="aligncenter size-thumbnail wp-image-27" src="http://manuelselva.files.wordpress.com/2008/04/eclipseface.png?w=39&h=39" alt="Eclipse Help" width="39" height="39" align="absmiddle" /></a>and from this old <a href="http://www.ibm.com/developerworks/opensource/library/os-ecfeat/">article</a>.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/manuelselva.wordpress.com/26/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/manuelselva.wordpress.com/26/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&blog=2529905&post=26&subd=manuelselva&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2008/04/09/links-directory/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/manu38400-128.jpg" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>

		<media:content url="http://manuelselva.files.wordpress.com/2008/04/eclipseface.png" medium="image">
			<media:title type="html">Eclipse Help</media:title>
		</media:content>
	</item>
		<item>
		<title>Draw2d outside Eclipse</title>
		<link>http://manuelselva.wordpress.com/2008/04/06/draw2d-outside-eclipse/</link>
		<comments>http://manuelselva.wordpress.com/2008/04/06/draw2d-outside-eclipse/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 16:55:48 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
		
		<category><![CDATA[Eclipse Misc]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=25</guid>
		<description><![CDATA[You are looking for a 2D library on top of SWT ??
The GEF project comes with a graphical library called Draw2d. This library can be used in any SWT application. Of course such applications are Eclipse&#8217;plug-ins but you can also use Draw2d in a standalone Java application with an SWT UI.
When dowloading the GEF plug-ins [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>You are looking for a 2D library on top of SWT ??</p>
<p>The GEF project comes with a graphical library called Draw2d. This library can be used in <strong>any</strong> SWT application. Of course such applications are Eclipse&#8217;plug-ins but you can also use Draw2d in a standalone Java application with an SWT UI.</p>
<p>When dowloading the GEF plug-ins you get an eclipse plug-in called: org.eclipse.draw2d. This plug-in is in fact a &#8220;classical&#8221; jar without any Eclipse&#8217;s extension and can be used in any java application as a &#8220;classical&#8221; jar.</p>
<p>Here is a <a href="http://www.eclipse.org/articles/Article-GEF-Draw2d/GEF-Draw2d.html">link</a> to an Eclipse article introducing Draw2d.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/manuelselva.wordpress.com/25/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/manuelselva.wordpress.com/25/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/25/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/25/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/25/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&blog=2529905&post=25&subd=manuelselva&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2008/04/06/draw2d-outside-eclipse/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/manu38400-128.jpg" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Eclipse and Hibernate and Class Loaders</title>
		<link>http://manuelselva.wordpress.com/2008/04/03/eclipse-and-hibernate-and-class-loaders/</link>
		<comments>http://manuelselva.wordpress.com/2008/04/03/eclipse-and-hibernate-and-class-loaders/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 18:01:30 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
		
		<category><![CDATA[Eclipse Misc]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=22</guid>
		<description><![CDATA[I spent time today to have an Hibernate  example running as Eclipse Plug-ins. Here is a trick to avoid NoClassDefFoundError when using Hibernate within Eclipse. 
I have three  Plug-ins :

com.mydomain.hibernate: Packaging of the hibernate Jar library in a Plug-in
com.mydomain.A
com.anotherdomain.B

These plugins have the following dependencies :

com.mydomain.hibernate depends on nothing (it&#8217;s a &#8220;library&#8221; Plug-in)
com.mydomain.A depends [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I spent time today to have an <a href="http://www.hibernate.org/" title="Hibernate Web Site" target="_blank">Hibernate</a> <img src="http://manuelselva.files.wordpress.com/2008/04/hibernate_icon.thumbnail.gif?w=47&h=47" alt="Hibernate Logo" align="absmiddle" border="0" height="47" width="47" /> example running as Eclipse Plug-ins. Here is a trick to avoid <code>NoClassDefFoundError </code>when using Hibernate within Eclipse. <code></code></p>
<p>I have three  Plug-ins :</p>
<ul>
<li><code>com.mydomain.hibernate</code>: Packaging of the hibernate Jar library in a Plug-in</li>
<li><code>com.mydomain.A</code><code></code><code></code></li>
<li><code>com.</code><code>anotherdomain</code><code>.B</code></li>
</ul>
<p>These plugins have the following dependencies :</p>
<ul>
<li><code>com.mydomain.hibernate</code> depends on nothing (it&#8217;s a &#8220;library&#8221; Plug-in)</li>
<li><code>com.mydomain.A </code>depends on<code> B </code>and on <code>com.mydomain.hibernate</code><code></code><code></code></li>
<li><code>com.anotherdomain.B </code>depends on nothing</li>
</ul>
<p>The <code>NoClassDefFoundError(org.hibernate.proxy.HibernateProxy) </code>was fired when trying to map  (in a database using hibernate of course) <code></code><code></code>a class of <code>com.</code><code>anotherdomain</code><code>.B </code><code></code>in <code></code><code> com.mydomain.A </code>code.</p>
<p>The Eclipse <code>ClassLoader </code>mechanisms and the injection of new code from Hibernate in the <code>com.anotherdomain.B </code>are responsible for this error .</p>
<p>Here is THE <a href="http://www.eclipsezone.com/articles/eclipse-vms/" target="_blank">article</a> that helped me to understand what was happening here and to solve my problem using <code>Eclipse-BuddyPolicy.</code></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/manuelselva.wordpress.com/22/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/manuelselva.wordpress.com/22/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/22/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/22/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/22/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&blog=2529905&post=22&subd=manuelselva&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2008/04/03/eclipse-and-hibernate-and-class-loaders/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/manu38400-128.jpg" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>

		<media:content url="http://manuelselva.files.wordpress.com/2008/04/hibernate_icon.thumbnail.gif" medium="image">
			<media:title type="html">Hibernate Logo</media:title>
		</media:content>
	</item>
		<item>
		<title>Eclipse Feature Tip - Help About Dialog</title>
		<link>http://manuelselva.wordpress.com/2008/03/05/eclipse-feature-tip-help-about-dialog/</link>
		<comments>http://manuelselva.wordpress.com/2008/03/05/eclipse-feature-tip-help-about-dialog/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 07:57:12 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
		
		<category><![CDATA[Eclipse Misc]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=21</guid>
		<description><![CDATA[Last week i was working on an Eclipse feature for the first time. I created my feature, added plug-ins into it, deployed it and it worked perfectly at the first time. All my plug-ins where there and available !!!!
Nice, then I just checked that my feature was present in the Help -&#62; About-&#62; Feature Details [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Last week i was working on an Eclipse feature for the first time. I created my feature, added plug-ins into it, deployed it and it worked perfectly at the first time. All my plug-ins where there and available !!!!</p>
<p>Nice, then I just checked that my feature was present in the <b>Help -&gt; About-&gt; Feature Details</b> dialog &#8230; and here comes the bad news : my feature was not visible. After long investigations and discussions (available <a href="http://www.eclipse.org/newsportal/article.php?id=73011&amp;group=eclipse.platform#73011">here,</a> you need to login) on the eclipse platform news group and thanks to Ed Merks and Nick Boldt I have the solution to my problem.</p>
<p>To have a feature displayed in the <b>Help -&gt; About-&gt; Feature Details </b>you need to define a Branding plug-in for that feature in the feature.xml file. If no Branding plug-in is specified Eclipse will look for a Branding plug-in with the same ID than the feature&#8217;s ID.</p>
<p>In this plug-in there must be a about.ini, about.properties and about.mapping files. For more informations on these files and there content you can look the Eclipse Help <a href="http://help.eclipse.org/help33/topic/org.eclipse.platform.doc.isv/guide/product_configfeature.htm?resultof=%22%61%62%6f%75%74%2e%69%6e%69%22%20">here.</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/manuelselva.wordpress.com/21/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/manuelselva.wordpress.com/21/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/21/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/21/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/21/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&blog=2529905&post=21&subd=manuelselva&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2008/03/05/eclipse-feature-tip-help-about-dialog/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/manu38400-128.jpg" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Unhandled event loop exception</title>
		<link>http://manuelselva.wordpress.com/2008/02/21/unhandled-event-loop-exception/</link>
		<comments>http://manuelselva.wordpress.com/2008/02/21/unhandled-event-loop-exception/#comments</comments>
		<pubDate>Thu, 21 Feb 2008 14:50:15 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
		
		<category><![CDATA[Eclipse Misc]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=20</guid>
		<description><![CDATA[Lot of people wonder what the famous Unhandled event loop exception is !!!???
This is no more than an uncaught Exception occurring with in the Eclipse workbench Main thread (or the UI thread, it&#8217;s the same).
When writing  Eclipse plugins  we often write code that will be executed within the Main thread. For example when [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Lot of people wonder what the famous <b>Unhandled event loop exception is</b> !!!???</p>
<p>This is no more than an uncaught <code>Exception</code> occurring with in the Eclipse workbench Main thread (or the UI thread, it&#8217;s the same).</p>
<p>When writing  Eclipse plugins  we often write code that will be executed within the Main thread. For example when contributing a new hello world button within the main Eclipse toolbar we must implement a given interface with a <code>run()</code> method.</p>
<p>In this method we write the code responsible to display to the user the &#8220;Hello world message&#8221;. If this code throws a new <code>Exception</code> without catching it then the <code>Exception</code> is forwarded to the caller. This caller is the Eclipse code but not our !!!!</p>
<p>In this Eclipse code the <code>Exception</code> is forwarded up to the <code>Workbench.runEventLoop(IExceptionHandler, Display)</code> method that catch it and log a new <b>Unhandled event loop exception</b> Error message. This message also contains our source <code>Exception</code>  displayed as Reason :</p>
<p>When you see an <b>Unhandled event loop exception</b> , don&#8217;t worry and just look for the reason, it&#8217;s often a silly mistake :o)</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/manuelselva.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/manuelselva.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&blog=2529905&post=20&subd=manuelselva&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2008/02/21/unhandled-event-loop-exception/feed/</wfw:commentRss>
	
		<media:content url="http://a.wordpress.com/avatar/manu38400-128.jpg" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>
	</item>
	</channel>
</rss>