<?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:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Manuel Selva&#039;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>
	<lastBuildDate>Sat, 28 Jan 2012 22:58:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='manuelselva.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://0.gravatar.com/blavatar/60cb836544be073a7a6b22db9662a9d0?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Manuel Selva&#039;s Eclipse blog</title>
		<link>http://manuelselva.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://manuelselva.wordpress.com/osd.xml" title="Manuel Selva&#039;s Eclipse blog" />
	<atom:link rel='hub' href='http://manuelselva.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Ubuntu 11.10 Eclipse Packages</title>
		<link>http://manuelselva.wordpress.com/2011/12/13/ubuntu-11-10-eclipse-packages/</link>
		<comments>http://manuelselva.wordpress.com/2011/12/13/ubuntu-11-10-eclipse-packages/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 07:33:49 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
				<category><![CDATA[Eclipse Misc]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=433</guid>
		<description><![CDATA[It&#8217;s been a long since I didn&#8217;t post here. The main reason is that I didn&#8217;t have the opportunity to use Eclipse in the last month. Yes I have a new really cool &#8220;Job&#8221; called PhD: These times I am reading a lot. Today I decided to fix that and to install an Eclipse SDK [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=433&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a long since I didn&#8217;t post here. The main reason is that I didn&#8217;t have the opportunity to use Eclipse in the last month. Yes I have a new really cool &#8220;Job&#8221; called PhD: These times I am reading a lot.</p>
<p>Today I decided to fix that and to install an Eclipse SDK on my Ubuntu 11.10 laptop using <em>apt</em> configured on the default Ubuntu repositories. Here is the list of packages related to Eclipse:</p>
<p><a href="http://manuelselva.files.wordpress.com/2011/12/ubuntu-eclipse-packages.png"><img class="aligncenter size-full wp-image-434" title="Ubuntu-Eclipse-Packages" src="http://manuelselva.files.wordpress.com/2011/12/ubuntu-eclipse-packages.png?w=450&#038;h=489" alt="" width="450" height="489" /></a></p>
<p>As you can see (or not) there is no Eclipse standard SDK package, the one I was used to start with. There is an eclipse-pde package: it should be the same but unfortunately it doesn&#8217;t work as expected: no PDE perspective available.</p>
<p>I finally went to http://www.eclipse.org/downloads/  in order to find my favourite package.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/manuelselva.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/manuelselva.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/manuelselva.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/manuelselva.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/433/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=433&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2011/12/13/ubuntu-11-10-eclipse-packages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/4aae0706706516adf2151816c4a65f20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>

		<media:content url="http://manuelselva.files.wordpress.com/2011/12/ubuntu-eclipse-packages.png" medium="image">
			<media:title type="html">Ubuntu-Eclipse-Packages</media:title>
		</media:content>
	</item>
		<item>
		<title>Let&#8217;s move !</title>
		<link>http://manuelselva.wordpress.com/2011/10/17/lets-move/</link>
		<comments>http://manuelselva.wordpress.com/2011/10/17/lets-move/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 19:28:21 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
				<category><![CDATA[Eclipse Misc]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=430</guid>
		<description><![CDATA[After 6 years working as Eclipse plug-ins developer I decided to take a new big challenge: start a PhD. I will still blog about Eclipse (but certainly less often) here because my PhD subject is about SOA and I&#8217;m sure that Eclipse is somewhere linked to it because Eclipse is everywhere, isn&#8217;t it ? I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=430&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After 6 years working as Eclipse plug-ins developer I decided to take a new big challenge: start a PhD. I will still blog about Eclipse (but certainly less often) here because my PhD subject is about SOA and I&#8217;m sure that Eclipse is somewhere linked to it because Eclipse is everywhere, isn&#8217;t it ?</p>
<p>I would like also to take the opportunity of this post to THANK publicly Jerome  for his help during these 6 years: &#8220;thanks&#8221;.</p>
<p>Stay tuned for this new story</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/manuelselva.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/manuelselva.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/manuelselva.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/manuelselva.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/430/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/430/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/430/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=430&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2011/10/17/lets-move/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/4aae0706706516adf2151816c4a65f20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Object instances reuse and Eclipse API</title>
		<link>http://manuelselva.wordpress.com/2011/10/03/object-instances-reuse-and-eclipse-api/</link>
		<comments>http://manuelselva.wordpress.com/2011/10/03/object-instances-reuse-and-eclipse-api/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 11:31:37 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
				<category><![CDATA[Eclipse Misc]]></category>
		<category><![CDATA[SWT]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=419</guid>
		<description><![CDATA[Reading one of my colleague&#8217;s code I saw this: Personally I always create a new layout for each one of my GUI component. It is in my opinion more easy to read that the piece of code above and because there is a small number of such objects (having a UI with thousands of GUI [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=419&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Reading one of my colleague&#8217;s code I saw this:</p>
<p><pre class="brush: java;">
GridLayout gl = new GridLayout();
gl .numColumns = 1;
gl .verticalSpacing = 0;
gl .marginHeight = 0;
gl .marginWidth = 0;

Composite c1 = new Composite(parent);
Composite c2 = new Composite(parent);
c1.setLayout(gl);
c2.setLayout(gl);
</pre></p>
<p>Personally I always create a new layout for each one of my GUI component. It is in my opinion more easy to read that the piece of code above and because there is a small number of such objects (having a UI with thousands of GUI component needing a layout is bad idea I think <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ), creating a new one for each component doesn&#8217;t impact performances.</p>
<p>To go further in the probleme, reading this code lead me to the following question:</p>
<p><strong>How do I know if a given class instance can be &#8220;shared&#8221; in several contexts ?</strong></p>
<p>In the particular case of the GridLayout above, I was not able to find the answer in the Javadoc here: <a href="http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/layout/GridLayout.html">http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/layout/GridLayout.htm</a>l. After looking at the source code of GridLayout it seems that there is no internal state saved anywhere, and thus it&#8217;s possible to use the same layout instance for several components.</p>
<p>May be I missed something or maybe it should be interesting to indicate this information in the Javadoc. For sure, I&#8217;ll take care of that when writing the documentation for my own libraries.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/manuelselva.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/manuelselva.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/manuelselva.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/manuelselva.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/419/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/419/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/419/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=419&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2011/10/03/object-instances-reuse-and-eclipse-api/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/4aae0706706516adf2151816c4a65f20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Increase memory of Eclipse Ant Runner</title>
		<link>http://manuelselva.wordpress.com/2011/09/20/increase-memory-of-eclipse-ant-runner/</link>
		<comments>http://manuelselva.wordpress.com/2011/09/20/increase-memory-of-eclipse-ant-runner/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 13:43:17 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
				<category><![CDATA[Eclipse Tools]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[OutOfMemoryError]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=408</guid>
		<description><![CDATA[I am running the Eclipse ant runner from command line in the following way: I am facing OutOfMemory errors in the heap space. Adding -vmargs -Xmx512m to the command line or and changing the properties of my eclipse installation eclipse.ini file didn&#8217;t fixed the issue. In order to be sure that the vmargs are taken into [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=408&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I am running the Eclipse ant runner from command line in the following way:</p>
<p><pre class="brush: bash;">
set LAUNCHER=xx\xx\org.eclipse.equinox.launcher_1.1.3.0.jar
xx\xx\java.exe -jar %LAUNCHER% -application org.eclipse.ant.core.antRunner -buildfile build.xml
</pre></p>
<p>I am facing <strong>OutOfMemory</strong> errors in the heap space. Adding -vmargs -Xmx512m to the command line or and changing the properties of my eclipse installation eclipse.ini file didn&#8217;t fixed the issue.</p>
<p>In order to be sure that the vmargs are taken into account I simply wrote the folowing task:</p>
<p><pre class="brush: java;">
public class DisplayTask extends Task {
@Override
public void execute() throws BuildException {
System.out.println(Runtime.getRuntime().maxMemory() / 1000000);
}
}
</pre></p>
<p>and just launch it in my build.xml (using taskedf to define the task). The output is always 66 whatever I put in -vmargs -Xmx &#8230;.<br />
After several tests I got the solution by adding -Xmx512m  only (without -vmargs) option <strong>just after</strong> the java.exe as folowing:</p>
<p><pre class="brush: bash;">
xx\xx\java.exe -Xmx512m -jar %LAUNCHER% -application org.eclipse.ant.core.antRunner -buildfile build.xml
</pre></p>
<p><strong><span style="text-decoration:underline;">Conclusion:</span></strong> the ant runner application doesn&#8217;t read neither the -vmargs command line options nor the eclipse.ini file options. Thus the only solution to increase memory for it is to directly pass the option to the Java virtual machine.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/manuelselva.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/manuelselva.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/manuelselva.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/manuelselva.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/408/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=408&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2011/09/20/increase-memory-of-eclipse-ant-runner/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<georss:point>0.000000 0.000000</georss:point>
		<geo:lat>0.000000</geo:lat>
		<geo:long>0.000000</geo:long>
		<media:content url="http://0.gravatar.com/avatar/4aae0706706516adf2151816c4a65f20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Sequential Jobs</title>
		<link>http://manuelselva.wordpress.com/2011/09/08/sequential-jobs/</link>
		<comments>http://manuelselva.wordpress.com/2011/09/08/sequential-jobs/#comments</comments>
		<pubDate>Thu, 08 Sep 2011 08:18:24 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
				<category><![CDATA[Eclipse Misc]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=402</guid>
		<description><![CDATA[Following this post about RCP application progress report  we have the following use case: User Action Start first Job (unknown length) Wait for first Job to finish and start second Job (known length) Wait for second Job to finish and start third Job (known length) We want to show this to the user in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=402&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<div>
<p>Following <a href="http://manuelselva.wordpress.com/2011/02/18/how-do-you-report-progress-in-your-software/">this post about RCP application progress report</a>  we have the following use case:</p>
<ol>
<li>User Action</li>
<li>Start first Job (unknown length)</li>
<li>Wait for first Job to finish and start second Job (known length)</li>
<li>Wait for second Job to finish and start third Job (known length)</li>
</ol>
<p>We want to show this to the user in the following way:</p>
<ol>
<li>Have a main &#8220;User Action&#8221; dialog without global progress bar (because of the 1st job length is unknown and really variable upon executions length I can&#8217;t get an accurate total length) or with an &#8220;unknown&#8221; length</li>
<li>In this dialog have 3 sub parts one for each job with one progress bar for each one of this jobs and off course with <code>IProgressMonitor.UNKNOWN</code> style for the first job.</li>
<li>In this dialog the progress bars will be updated sequentially as the underlying jobs.</li>
</ol>
<p>This will allow the end user to immediately see that its action is divided into 3 sub-tasks (the sub-tasks are meaningful for end users) and each time a new sub-task is started he can see the length of this sub-task (unknown for the first).</p>
<p>After many searches we were not able to implement that using the Eclipse Job API,  and today we are reporting these 3 sub-tasks as 3 individual successive dialogs with the drawback that the end user may initially thinks that his action will be completed at the end of the first unknown sub-task.</p>
<p>How does the Eclipse workbench&#8217;s team and YOU handle such situations ?</p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/manuelselva.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/manuelselva.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/manuelselva.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/manuelselva.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/402/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/402/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/402/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=402&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2011/09/08/sequential-jobs/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4aae0706706516adf2151816c4a65f20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>
	</item>
		<item>
		<title>Build command line tools on top of Eclipse</title>
		<link>http://manuelselva.wordpress.com/2011/07/08/build-command-line-tools-on-top-of-eclipse/</link>
		<comments>http://manuelselva.wordpress.com/2011/07/08/build-command-line-tools-on-top-of-eclipse/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 09:24:13 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
				<category><![CDATA[Eclipse Misc]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=395</guid>
		<description><![CDATA[Eclipse is great! Isn&#8217;t it ? Recently some of my RCP application customers asked me to have a command line version of the application. This application parses some binary trace files and provides analyses of it which results are displayed in several Eclipse views. The point here was to output &#8220;CSV versions&#8221; of this views [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=395&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Eclipse is great! Isn&#8217;t it ?</p>
<p>Recently some of my RCP application customers asked me to have a command line version of the application. This application parses some binary trace files and provides analyses of it which results are displayed in several Eclipse views. The point here was to output &#8220;CSV versions&#8221; of this views through a command line tool.</p>
<p>Thanks to the modularity of Eclipse it was really easy to add in the following architecture:</p>
<p><a href="http://manuelselva.files.wordpress.com/2011/07/arch.png"><img class="aligncenter size-full wp-image-396" title="Arch" src="http://manuelselva.files.wordpress.com/2011/07/arch.png?w=450" alt=""   /></a>a new Command Line tool plugin contributing a <strong>command line application</strong> through the <a href="http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_core_runtime_applications.html?resultof=%22%61%70%70%6c%69%63%61%74%69%6f%6e%22%20%22%61%70%70%6c%69%63%22%20%22%65%78%74%65%6e%73%69%6f%6e%22%20%22%65%78%74%65%6e%73%22%20%22%70%6f%69%6e%74%22%20">org.eclipse.core.runtime.applications</a> extension point.</p>
<p><a href="http://manuelselva.files.wordpress.com/2011/07/arch2.png"><img class="aligncenter size-full wp-image-397" title="Arch2" src="http://manuelselva.files.wordpress.com/2011/07/arch2.png?w=450" alt=""   /></a>Yes it is as simple as it looks like excepted may be the following tips to remember:</p>
<ol>
<li>Always remove <a href="http://manuelselva.wordpress.com/2008/10/15/useless-plugins-dependencies/">useless dependencies</a> in all your plugins</li>
<li>Ensure that Activators of plugins not contributing to the workbench extends AbstractPlugin and not AbstractUIPlugin</li>
<li>Always isolate UI code in a dedicated plugin, otherwise it&#8217;ll be a nightmare to have a command line tool.</li>
<li>Keep in mind that almost everything can be done with Eclipse <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ol>
<p>Manu</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/manuelselva.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/manuelselva.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/manuelselva.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/manuelselva.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/395/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/395/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/395/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=395&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2011/07/08/build-command-line-tools-on-top-of-eclipse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4aae0706706516adf2151816c4a65f20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>

		<media:content url="http://manuelselva.files.wordpress.com/2011/07/arch.png" medium="image">
			<media:title type="html">Arch</media:title>
		</media:content>

		<media:content url="http://manuelselva.files.wordpress.com/2011/07/arch2.png" medium="image">
			<media:title type="html">Arch2</media:title>
		</media:content>
	</item>
		<item>
		<title>Analogical Computer</title>
		<link>http://manuelselva.wordpress.com/2011/04/04/analogical-computer/</link>
		<comments>http://manuelselva.wordpress.com/2011/04/04/analogical-computer/#comments</comments>
		<pubDate>Mon, 04 Apr 2011 21:43:43 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
				<category><![CDATA[Fun]]></category>

		<guid isPermaLink="false">https://manuelselva.wordpress.com/2011/04/04/analogical-computer/</guid>
		<description><![CDATA[Today looking at my desktop books I decided to build the first analogical embeded computer system of the world: from the hardware to the top level user interface software. What do you think about it ?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=392&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today looking at my desktop books I decided to build the first analogical embeded computer system of the world: from the hardware to the top level user interface software.</p>
<p>What do you think about it ?</p>
<p><a href="http://manuelselva.files.wordpress.com/2011/04/20110404-113758.jpg"><img src="http://manuelselva.files.wordpress.com/2011/04/20110404-113758.jpg?w=450" alt="20110404-113758.jpg" class="alignnone size-full" /></a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/manuelselva.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/manuelselva.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/manuelselva.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/manuelselva.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/392/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/392/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/392/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=392&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2011/04/04/analogical-computer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4aae0706706516adf2151816c4a65f20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>

		<media:content url="http://manuelselva.files.wordpress.com/2011/04/20110404-113758.jpg" medium="image">
			<media:title type="html">20110404-113758.jpg</media:title>
		</media:content>
	</item>
		<item>
		<title>Unit Testing RCP Applications</title>
		<link>http://manuelselva.wordpress.com/2011/03/15/unit-testing-rcp-applications/</link>
		<comments>http://manuelselva.wordpress.com/2011/03/15/unit-testing-rcp-applications/#comments</comments>
		<pubDate>Tue, 15 Mar 2011 07:25:13 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
				<category><![CDATA[Eclipse Misc]]></category>
		<category><![CDATA[Eclipse Technical Tips]]></category>
		<category><![CDATA[Eclipse Tools]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[junit]]></category>
		<category><![CDATA[rcp]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=384</guid>
		<description><![CDATA[Include Unit tests launching and stop in case of failure in a continuous integration process is a MUST. In the case of an Eclipse RCP application continuous environment process (based on ANT and PDE build scripts) set up we have to decide &#8220;how to install and launch unit tests&#8220;. Solution: After building the RCP product, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=384&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Include Unit tests launching and stop in case of failure in a continuous integration process is a MUST. In the case of an Eclipse RCP application continuous environment process (based on ANT and PDE build scripts) set up we have to decide &#8220;<strong>how to install and launch unit tests</strong>&#8220;.<strong><span style="text-decoration:underline;"> </span></strong></p>
<p><strong><span style="text-decoration:underline;">Solution</span>: </strong>After building the RCP product, install the product using P2 director command line in the Eclipse SDK that has been used to build the product with a specific configuration. Then just launch the PDE unit test application as following:</p>
<p><pre class="brush: xml;">
 &lt;java dir=&quot;./plugins&quot; classname=&quot;org.eclipse.equinox.launcher.Main&quot; fork=&quot;yes&quot; classpathref=&quot;equinox.launcher.class.path&quot; maxmemory=&quot;512m&quot;&gt;
 &lt;arg line=&quot;-application org.eclipse.pde.junit.runtime.uitestapplication -port ${port} -testpluginname ${plugin} -classnames ${classes} ${config}&quot; /&gt;
 &lt;/java&gt;
</pre></p>
<p>This solution is great but has a main drawback: We are not running the unit tests in the &#8220;final&#8221; environment but in an SDK environment that has been enhanced with our RCP product.  A better solution to my eye will be to enhance the RCP product with the few plugins required by PDE unit test application in order to be closest to the final environment when launching the tests.</p>
<p>I&#8217;am investigating on that &#8230;.. next episode coming soon !</p>
<p>Note: feel free to comment this post to bring your point of view and experiences about RCP unit testing.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/manuelselva.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/manuelselva.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/manuelselva.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/manuelselva.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/384/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/384/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/384/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=384&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2011/03/15/unit-testing-rcp-applications/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4aae0706706516adf2151816c4a65f20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>
	</item>
		<item>
		<title>How do you report progress in your software ??</title>
		<link>http://manuelselva.wordpress.com/2011/02/18/how-do-you-report-progress-in-your-software/</link>
		<comments>http://manuelselva.wordpress.com/2011/02/18/how-do-you-report-progress-in-your-software/#comments</comments>
		<pubDate>Fri, 18 Feb 2011 12:49:21 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
				<category><![CDATA[Eclipse Misc]]></category>
		<category><![CDATA[Eclipse Technical Tips]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=379</guid>
		<description><![CDATA[In order to improve usability of my RCP application I decided to manage all the &#8220;long&#8221; operations  using Jobs. This post will introduce several solutions to handle &#8220;composite&#8221; tasks progress reporting across a concrete example I faced this morning. Having already used the Job API I felt confident on the time needed to implement this. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=379&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In order to improve usability of my RCP application I decided to manage all the &#8220;long&#8221; operations  using <a href="http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/jobs/Job.html" target="_blank">Job</a>s. This post will introduce several solutions to handle &#8220;composite&#8221; tasks progress reporting across a concrete example I faced this morning.</p>
<div id="attachment_380" class="wp-caption aligncenter" style="width: 460px"><a href="http://manuelselva.files.wordpress.com/2011/02/progress.png"><img class="size-full wp-image-380" title="progress" src="http://manuelselva.files.wordpress.com/2011/02/progress.png?w=450&#038;h=217" alt="Image just to bring your eyes to my post and encourage you to read it, is it working ??" width="450" height="217" /></a><p class="wp-caption-text">Image just to bring your eyes to my post and encourage you to read it, is it working ?? <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p></div>
<p>Having already used the Job API I felt confident on the time needed to implement this. I was right about the time needed to use the Job&#8217;s API but I was wrong about the way to organize several related operations into several (or one ??) job(s).</p>
<p>Lets describe the context. The user is performing a<em> &#8220;File-&gt;Open&#8221;</em> action and want report on the progress of this action. Progress report is needed because opened files are big and a lot of computation has to be done on these files. This <em>&#8220;File-&gt;Open&#8221;</em> action is composed of 3 <strong>sequential </strong>&#8220;subtasks&#8221;: parsing, analyse and display. I am able to easily report accurate progress for each one of these tasks, but unfortunately I am not able then to have an accurate estimation of each task time in the global process composed of the 3 tasks.</p>
<p>Today I have 2 solutions in order to report <del>what is happening behind the scene</del> how many time is happening behind the scene (this IS really what the user cares !!!).</p>
<p><span style="text-decoration:underline;"><strong>First solution:</strong></span> Use 3 distincts Jobs.</p>
<p>This solution can be easily implemented using <a href="http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/jobs/IJobManager.html" target="_blank">IJobChangeListener</a>s. A first Job is created for the parsing tasks. This Job is scheduled and thanks to Job listeners I am able to be notified when it&#8217;s completed in order to create and schedule the analyze Job. The same process is apply between the analyze Job and the display Job. This solution present the 3 tasks to the user with an accurate estimation time for <strong>EACH ONE</strong> of these tasks. As I mentioned before, this is the best I can do because I am not able to estimate each task time in the global process.  Here the new user may think that the global <em>&#8220;File Open&#8221;</em> action will be completed at the end of the first Job &#8230;.??!!!  Another drawback of this solution is that the user is prompted with 3 UI progress dialogs (all my Jobs are user Jobs so there is successively: &#8220;Parsing File dialog&#8221;, &#8220;Analyze File dialog&#8221; and &#8220;Display Dialog&#8221; ) for only one <em>&#8220;File-&gt;Open&#8221;</em> action.</p>
<p><span style="text-decoration:underline;"><strong>Second solution:</strong></span> Use one main Job and 3 <a href="http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/SubMonitor.html" target="_blank">Submonitor</a>s inside this Job.</p>
<p>I came to this solution in order to try to fix the second drawback of the first one (3 UI dialogs for oen action). I&#8217;ll not step into implementation detail here but lets analyze the result. Why ? We have a unique UI progress dialog NOT accurate: we can clearly distinct the 3 stages stepping each one at a different speed. What is better: only one UI dialog not accurate or 2 &#8220;surprise&#8221; dialogs that appear after the first accurate one ?</p>
<p>An other solution would be (I didn&#8217;t find anyway to implement it for now):</p>
<p><span style="text-decoration:underline;"><strong>Third solution (not sure this can be done .. any ideas ??):</strong></span> Have one Job with 3 <a href="http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/api/org/eclipse/core/runtime/SubMonitor.html" target="_blank">Submonitor</a>s inside this Job <strong>but </strong>reporting the 3 Submonitors as 3 X 100 %. What I mean here is to have only one UI progress dialog called &#8220;Opening File&#8221; that will be &#8220;filled in from 0% to 100%&#8221; three times (one for each sub-task). This solution is the same as the first one but it will fix the problem of having 3 separated UI dialogs.</p>
<p>In all of these solution the end user &#8220;will&#8221; have <strong>on the first usage a &#8220;wrong&#8221; first estimation time</strong> &#8230;. Thus I would be interested to know how you handle such situations, so feel free to leave comments on this topic.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/manuelselva.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/manuelselva.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/manuelselva.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/manuelselva.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/379/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/379/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/379/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=379&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2011/02/18/how-do-you-report-progress-in-your-software/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4aae0706706516adf2151816c4a65f20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>

		<media:content url="http://manuelselva.files.wordpress.com/2011/02/progress.png" medium="image">
			<media:title type="html">progress</media:title>
		</media:content>
	</item>
		<item>
		<title>How drop GEF editors figures in the outside world</title>
		<link>http://manuelselva.wordpress.com/2011/02/07/how-drop-gef-editors-figures-in-the-outside-world/</link>
		<comments>http://manuelselva.wordpress.com/2011/02/07/how-drop-gef-editors-figures-in-the-outside-world/#comments</comments>
		<pubDate>Mon, 07 Feb 2011 09:27:05 +0000</pubDate>
		<dc:creator>Manuel</dc:creator>
				<category><![CDATA[Eclipse Misc]]></category>
		<category><![CDATA[Eclipse Tools]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[gef]]></category>

		<guid isPermaLink="false">http://manuelselva.wordpress.com/?p=376</guid>
		<description><![CDATA[In a Gef editor I want to let the users drag and drop figures (== model objects) to an other custom view available in my tool&#8217;s perspective. Adding a DragSource with my own drag transfer on my GEF editor figure canvas allows that. But as a side effect, and I don&#8217;t want this side effect, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=376&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In a Gef editor I want to let the users drag and drop figures  (== model objects) to an other custom view available  in my tool&#8217;s perspective.</p>
<p>Adding a DragSource with my own drag transfer on my GEF editor figure  canvas allows that. But as a side effect, and I don&#8217;t want this side  effect, this disable the possibility to move the figures INSIDE the  editor using drag and drop.</p>
<p>After investigations I found this <a rel="nofollow" href="http://www.eclipse.org/forums/index.php?t=tree&amp;goto=210598&amp;S=4f8538b21a7b45ef81bbcbb6675b8c08#page_top">post on eclipse forums</a>. The solution is acceptable but not perfect.  Thus I investigated deeper  and came to the following pure SWT snippet that explains why we have this behavior: MouseMove  events (the ones used by gef to support dragging INSIDE the editor) are  no more fired once a drag source has been added:</p>
<p><pre class="brush: java;">
import org.eclipse.swt.dnd.DND;
import org.eclipse.swt.dnd.DragSource;
import org.eclipse.swt.dnd.DragSourceEvent;
import org.eclipse.swt.dnd.DragSourceListener;
import org.eclipse.swt.dnd.FileTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseListener;
import org.eclipse.swt.events.MouseMoveListener;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

public class SwtTest {
public static void main(String[] args) {
final Display display = new Display();
final Shell shell = new Shell(display);

shell.addMouseMoveListener(new MouseMoveListener() {

@Override
public void mouseMove(MouseEvent e) {
System.out.println(&quot;Mouse move&quot;);
}
});
DragSourceListener dragListener = new DragSourceListener() {

public void dragFinished(DragSourceEvent event) {
System.out.println(&quot;dragFinished&quot;);

}

public void dragSetData(DragSourceEvent event) {
System.out.println(&quot;dragSetData&quot;);

}

public void dragStart(DragSourceEvent event) {
System.out.println(&quot;dragStart&quot;);
}
};

DragSource dragSource = new DragSource(shell, DND.DROP_COPY | DND.DROP_MOVE);
dragSource.addDragListener(dragListener);
dragSource.setTransfer(new Transfer[] { FileTransfer.getInstance() });

shell.pack();
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
}
</pre></p>
<p>I guess this is the normal behavior fro man SWT point of view.</p>
<p>As a side note I would be interested for a solution to this issue other that  the one proposed on Eclipse forum consisting in activating my  DragSource only if a given condition is met such as Shift is pressed  (this is done in a DragSourceListener.dragStart method by setting  event.doit to false.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/manuelselva.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/manuelselva.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/manuelselva.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/manuelselva.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/manuelselva.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/manuelselva.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/manuelselva.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/manuelselva.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/manuelselva.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/manuelselva.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/manuelselva.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/manuelselva.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/manuelselva.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/manuelselva.wordpress.com/376/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=manuelselva.wordpress.com&amp;blog=2529905&amp;post=376&amp;subd=manuelselva&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://manuelselva.wordpress.com/2011/02/07/how-drop-gef-editors-figures-in-the-outside-world/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/4aae0706706516adf2151816c4a65f20?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Manuel</media:title>
		</media:content>
	</item>
	</channel>
</rss>
