<?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>Vincent Zurczak&#039;s Blog &#187; Eclipse</title>
	<atom:link href="http://vzurczak.wordpress.com/category/eclipse/feed/" rel="self" type="application/rss+xml" />
	<link>http://vzurczak.wordpress.com</link>
	<description>My technical blog</description>
	<lastBuildDate>Wed, 15 May 2013 14:57:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='vzurczak.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Vincent Zurczak&#039;s Blog &#187; Eclipse</title>
		<link>http://vzurczak.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://vzurczak.wordpress.com/osd.xml" title="Vincent Zurczak&#039;s Blog" />
	<atom:link rel='hub' href='http://vzurczak.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Updating Copyright Mentions with Eclipse</title>
		<link>http://vzurczak.wordpress.com/2013/04/30/updating-copyright-mentions-with-eclipse/</link>
		<comments>http://vzurczak.wordpress.com/2013/04/30/updating-copyright-mentions-with-eclipse/#comments</comments>
		<pubDate>Tue, 30 Apr 2013 16:37:00 +0000</pubDate>
		<dc:creator>vzurczak</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[copyright]]></category>

		<guid isPermaLink="false">http://vzurczak.wordpress.com/?p=390</guid>
		<description><![CDATA[There is one thing I try to take care of every year: update the copyright mentions in the source code of my open source projects. I could do this just when I modify a source file. But I never think about checking it, and this is painful. The best solution is to update these mentions [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vzurczak.wordpress.com&#038;blog=10081016&#038;post=390&#038;subd=vzurczak&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>There is one thing I try to take care of every year: update the copyright mentions in the source code of my open source projects.</p>
<p>I could do this just when I modify a source file.<br />
But I never think about checking it, and this is painful. The best solution is to update these mentions at the beginning of every year, in all the files, in a single row. And to perform this bulk task, I use my favorite IDE: Eclipse.</p>
<p>There are 2 kinds of mentions to update.<br />
But the path is the same. It starts by checking out all the projects in the workspace, followed by <strong>Search &gt; File&#8230;</strong></p>
<p>&nbsp;</p>
<h2>Last Year Mentions</h2>
<p>The first kind of mention is quite simple, as an example:</p>
<blockquote><p>Copyright (c) 2012, Linagora</p></blockquote>
<p>It means the file was created in 2012.<br />
The search options are quite trivial here. Disable the <strong>Regular expression</strong> checkbox. Search any file (*, the star symbol). Type in the search text and click <strong>Replace&#8230;</strong> Once the search has been performed, type in the replacement text in the shown dialog.</p>
<blockquote><p>Copyright (c) 2012-2013, Linagora</p></blockquote>
<p>&nbsp;</p>
<h2>Multi-Year Mentions</h2>
<p>The second kind of mention covers several years, e.g.</p>
<blockquote><p>Copyright (c) 2009-2012, Linagora</p></blockquote>
<p>We are going to replace all the occurrences once again. But the search box will rely on more advanced options. Make sure <strong>Regular expression</strong> is checked and search for&#8230;</p>
<blockquote><p>Copyright \(c\) 20(\d\d)-2012, Linagora</p></blockquote>
<p>Remember to click <strong>Replace&#8230;</strong> and not <strong>Search&#8230;</strong></p>
<p><a href="http://vzurczak.files.wordpress.com/2013/04/copyright-update.jpg"><img src="http://vzurczak.files.wordpress.com/2013/04/copyright-update.jpg?w=300&#038;h=198" alt="copyright-update" width="300" height="198" class="aligncenter size-medium wp-image-391" /></a></p>
<p>Then, add the following replacement text.</p>
<blockquote><p>Copyright (c) 20$1-2013, Linagora</p></blockquote>
<p>And voilà! All your copyright mentions have been updated. And you can save them in a single commit.<br />
Coupled to build rules (e.g. with Sonar) and the right template files for your source code, you will not have to think about copyright mentions before next year.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vzurczak.wordpress.com/390/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vzurczak.wordpress.com/390/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vzurczak.wordpress.com&#038;blog=10081016&#038;post=390&#038;subd=vzurczak&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vzurczak.wordpress.com/2013/04/30/updating-copyright-mentions-with-eclipse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/45cf3bb2253fd4285acb0cfeba915a18?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vzurczak</media:title>
		</media:content>

		<media:content url="http://vzurczak.files.wordpress.com/2013/04/copyright-update.jpg?w=300" medium="image">
			<media:title type="html">copyright-update</media:title>
		</media:content>
	</item>
		<item>
		<title>Using SWT and JFace with Maven in non-OSGi projects</title>
		<link>http://vzurczak.wordpress.com/2012/08/23/using-swt-and-jface-with-maven-in-non-osgi-projects/</link>
		<comments>http://vzurczak.wordpress.com/2012/08/23/using-swt-and-jface-with-maven-in-non-osgi-projects/#comments</comments>
		<pubDate>Thu, 23 Aug 2012 07:55:27 +0000</pubDate>
		<dc:creator>vzurczak</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Java tips]]></category>
		<category><![CDATA[JFace]]></category>
		<category><![CDATA[Maven]]></category>
		<category><![CDATA[SWT]]></category>

		<guid isPermaLink="false">http://vzurczak.wordpress.com/?p=359</guid>
		<description><![CDATA[There is no problem in using SWT and JFace in Eclipse applications. These libraries were designed for it. Eclipse building solutions handle them well (p2, Tycho&#8230;). SWT and JFace can also be used outside Eclipse. However, they are not usable as libraries with Maven. Only as bundles with Tycho. This is because Eclipse releases are [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vzurczak.wordpress.com&#038;blog=10081016&#038;post=359&#038;subd=vzurczak&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>There is no problem in using SWT and JFace in Eclipse applications.<br />
These libraries were designed for it. Eclipse building solutions handle them well (p2, Tycho&#8230;).</p>
<p>SWT and JFace can also be used outside Eclipse.<br />
However, they are not usable as libraries with Maven. Only as bundles with Tycho. This is because Eclipse releases are not hosted on Maven repositories but on p2 repositories. The Maven plugin called Tycho allows Maven, among other things, to rely on p2 repositories. But it is intended to build OSGi applications.</p>
<p>Hopefully, there is now a regular Maven repository that hosts SWT and JFace bundles as libraries.<br />
Thus, they can be used with Maven, in non-Osgi projects. This repository is available at this address: <a href="http://swt-repo.googlecode.com/svn/repo/">http://swt-repo.googlecode.com/svn/repo/</a></p>
<p>To use these libraries in a non-Osgi project, add the repository to your POM.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;repositories&gt;
   &lt;repository&gt;
      &lt;id&gt;swt-repo&lt;/id&gt;
      &lt;url&gt;https://swt-repo.googlecode.com/svn/repo/&lt;/url&gt;
   &lt;/repository&gt;
&lt;/repositories&gt;
</pre>
<p>If you only want to use SWT, add the SWT library that fits your operating system.<br />
As an example, for Windows x64.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;dependencies&gt;
   &lt;!-- SWT --&gt;
   &lt;dependency&gt;
      &lt;groupId&gt;org.eclipse.swt&lt;/groupId&gt;
      &lt;artifactId&gt;org.eclipse.swt.win32.win32.x86_64&lt;/artifactId&gt;
      &lt;version&gt;3.7.2&lt;/version&gt;
   &lt;/dependency&gt;
&lt;/dependencies&gt;
</pre>
<p>If in addition you want to use JFace and Eclipse extensions for JFace (ListDialog, ListeSelectionDialog&#8230;), add the following dependency. This will add JFace by transitivity.</p>
<pre class="brush: xml; title: ; notranslate">
&lt;dependencies&gt;
   &lt;!-- JFace + Eclipse's JFace extensions --&gt;
   &lt;dependency&gt;
      &lt;groupId&gt;org.eclipse.ui&lt;/groupId&gt;
      &lt;artifactId&gt;org.eclipse.ui.workbench&lt;/artifactId&gt;
      &lt;version&gt;3.7.1.v20120104-1859&lt;/version&gt;
   &lt;/dependency&gt;
&lt;/dependencies&gt;
</pre>
<p>If you need JFace but not its Eclipse extensions, add instead&#8230;</p>
<pre class="brush: xml; title: ; notranslate">
&lt;dependencies&gt;
   &lt;!-- JFace dependencies --&gt;
   &lt;dependency&gt;
      &lt;groupId&gt;org.eclipse.jface&lt;/groupId&gt;
      &lt;artifactId&gt;org.eclipse.jface&lt;/artifactId&gt;
      &lt;version&gt;3.7.0.v20110928-1505&lt;/version&gt;
   &lt;/dependency&gt;
&lt;/dependencies&gt;
</pre>
<p>Other versions of SWT and JFace should be added to the repository.<br />
Another solution could be based on Tycho. But so far, I have not found any solution. I started a thread about this on the <a href="http://dev.eclipse.org/mhonarc/lists/tycho-user/msg03160.html">Tycho-user mailing list</a>.</p>
<p>Anyway, the solution described above will fit all the Maven versions.<br />
A Tycho-based solution would only work with Maven3 (but would avoid duplicating the libraries).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vzurczak.wordpress.com/359/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vzurczak.wordpress.com/359/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vzurczak.wordpress.com&#038;blog=10081016&#038;post=359&#038;subd=vzurczak&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vzurczak.wordpress.com/2012/08/23/using-swt-and-jface-with-maven-in-non-osgi-projects/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/45cf3bb2253fd4285acb0cfeba915a18?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vzurczak</media:title>
		</media:content>
	</item>
		<item>
		<title>Git, Patches and new Contributors</title>
		<link>http://vzurczak.wordpress.com/2012/01/05/git-patches-new-contributors/</link>
		<comments>http://vzurczak.wordpress.com/2012/01/05/git-patches-new-contributors/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 21:51:41 +0000</pubDate>
		<dc:creator>vzurczak</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[Diff files]]></category>
		<category><![CDATA[Eclipse contributions]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Paches]]></category>

		<guid isPermaLink="false">http://vzurczak.wordpress.com/?p=325</guid>
		<description><![CDATA[I have recently committed in the Eclipse BPEL Designer some patches that were contributed in our Bugzilla. This fact itself is not important. However, I used the Git command apply and kept the author name in the commit. I had never used this feature before, but it is extremely powerful. And very convenient to track [&#8230;]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vzurczak.wordpress.com&#038;blog=10081016&#038;post=325&#038;subd=vzurczak&#038;ref=&#038;feed=1" width="1" height="1" />]]></description>
				<content:encoded><![CDATA[<p>I have recently committed in the Eclipse BPEL Designer some patches that were contributed in our Bugzilla. This fact itself is not important. However, I used the Git command <strong>apply</strong> and kept the author name in the commit. I had never used this feature before, but it is extremely powerful. And very convenient to <strong>track activities and propose new committers on a project</strong>.</p>
<p>I let some traces in this article (as an example and for me, for later).<br />
Notice that the <strong>apply</strong> command did not work with EGit, I had to use the command line. I guess it will be fixed in a future version.</p>
<ul>
<li>First, we need a patch, given as a diff file, e.g. in <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=357512">a bug entry</a>.</li>
<li>As a committer, you should apply and check this patch. So, you first need to copy the patch in your (cloned) Git repository.</li>
<li>Get some stats about the patch :
<pre><em>git apply --stat myPatchFile</em></pre>
</li>
</ul>
<ul>
<li>Make sure the patch can be applied :
<pre><em>git apply --check myPatchFile</em></pre>
</li>
</ul>
<ul>
<li>Apply the patch :
<pre><em>git apply myPatchFile</em></pre>
</li>
</ul>
<ul>
<li>Delete the patch file.</li>
</ul>
<p>Then, you can check that the patch works and then commit it, before pushing the modification.<br />
One important thing is to keep the author&#8217;s name in the commit. The author and the committer are different. And both can be kept in the commit and in the history. Here is an example in the command line:</p>
<blockquote>
<pre>git commit -a --author="authorUsername &lt;author.mail.address@sth.com&gt;"</pre>
</blockquote>
<p>After the push, both the author and commiter names will appear in the repository.</p>
<p><a href="http://vzurczak.files.wordpress.com/2012/01/git-patches.jpg"><img class="alignnone size-medium wp-image-326" title="Git-Patches" src="http://vzurczak.files.wordpress.com/2012/01/git-patches.jpg?w=300&#038;h=61" alt="The author and committer names appear in the history" width="300" height="61" /></a></p>
<p>I don&#8217;t know if everyone in Eclipse projects uses this feature, but from the community perspective, this is very interesting (IMO).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/vzurczak.wordpress.com/325/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/vzurczak.wordpress.com/325/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=vzurczak.wordpress.com&#038;blog=10081016&#038;post=325&#038;subd=vzurczak&#038;ref=&#038;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://vzurczak.wordpress.com/2012/01/05/git-patches-new-contributors/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/45cf3bb2253fd4285acb0cfeba915a18?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">vzurczak</media:title>
		</media:content>

		<media:content url="http://vzurczak.files.wordpress.com/2012/01/git-patches.jpg?w=300" medium="image">
			<media:title type="html">Git-Patches</media:title>
		</media:content>
	</item>
	</channel>
</rss>
