<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your site. -->

<!-- To import this information into a WordPress site follow these steps: -->
<!-- 1. Log in to that site as an administrator. -->
<!-- 2. Go to Tools: Import in the WordPress admin panel. -->
<!-- 3. Install the "WordPress" importer from the list. -->
<!-- 4. Activate & Run Importer. -->
<!-- 5. Upload this file using the form provided on that page. -->
<!-- 6. You will first be asked to map the authors in this export file to users -->
<!--    on the site. For each author, you may choose to map to an -->
<!--    existing user on the site or to create a new user. -->
<!-- 7. WordPress will then import each of the posts, pages, comments, categories, etc. -->
<!--    contained in this file into your site. -->

<!-- generator="WordPress/3.3.1" created="2012-04-11 17:18" -->
<rss version="2.0"
	xmlns:excerpt="http://wordpress.org/export/1.1/excerpt/"
	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:wp="http://wordpress.org/export/1.1/"
>

<channel>
	<title>The Three Developers</title>
	<link>http://blog.example.org</link>
	<description>Just another WordPress site</description>
	<pubDate>Wed, 11 Apr 2012 17:18:57 +0000</pubDate>
	<language>en</language>
	<wp:wxr_version>1.1</wp:wxr_version>
	<wp:base_site_url>http://blog.example.org</wp:base_site_url>
	<wp:base_blog_url>http://blog.example.org</wp:base_blog_url>

	<wp:author><wp:author_id>2</wp:author_id><wp:author_login>jg</wp:author_login><wp:author_email>naj.bar@example.de</wp:author_email><wp:author_display_name><![CDATA[jg]]></wp:author_display_name><wp:author_first_name><![CDATA[Naj]]></wp:author_first_name><wp:author_last_name><![CDATA[Bar]]></wp:author_last_name></wp:author>
	<wp:author><wp:author_id>3</wp:author_id><wp:author_login>cn</wp:author_login><wp:author_email>cn@mycrobase.de</wp:author_email><wp:author_display_name><![CDATA[cn]]></wp:author_display_name><wp:author_first_name><![CDATA[Hans]]></wp:author_first_name><wp:author_last_name><![CDATA[Peter]]></wp:author_last_name></wp:author>


	<generator>http://wordpress.org/?v=3.3.1</generator>

	<item>
		<title>Java Magic</title>
		<link>http://blog.example.org/2012/03/java-magic/</link>
		<pubDate>Fri, 16 Mar 2012 18:38:23 +0000</pubDate>
		<dc:creator>cn</dc:creator>
		<guid isPermaLink="false">http://blog.example.org/?p=21</guid>
		<description></description>
		<content:encoded><![CDATA[I will describe two uncommon Java phenomenons that hit me short time ago while diving into the fantastic <a href="http://jmonkeyengine.org/" title="JMonkeyEngine" target="_blank">JMonkeyEngine</a> and related stuff.

<h3>Local classes</h3>

You can declare classes within a method's body (or exactly anywhere in any block of Java code). They are much like nested classes but remain visible only within the surrounding scope. So if you don't want to create an anonymous inner class to provide e.g. a callback or some "closure"-like functionality but need an (helper or temporary) object structure just visible within a single method (else use a nested class) you could use a local class to implement this. <a href="http://stackoverflow.com/questions/478804/advantage-of-local-classes-java">Stackoverflow</a> has a nice overview of some advantages.

<a href="http://docstore.mik.ua/orelly/java-ent/jnut/ch03_11.htm">Java in a Nutshell</a> has more details on local classes.

<pre lang="java">
public class MyClass {
    public static void main(String[] args) {
        class LocalClass {
            public void echo(String msg) {
                System.out.println(msg);
            }
        }
        new LocalClass().echo("Hi"); // prints "Hi"
    }
    // LocalClass is an unrecognized identifier here...
}
</pre>

<h3>Constructors of anonymous inner classes</h3>

You will sooner or later encounter anonymous inner classes for example when working with Swing and having to provide an <code>ActionListener</code>:

<pre lang="java">
new JButton("Click me").addActionListener(new ActionListener() {
    @Override
    public void actionPerformed(ActionEvent e) {
        System.out.println("Oh, you clicked me!");
    }
});
</pre>

It's pretty common to override or implement some methods in such classes but did you ever specified a definition of the constructor for an anonymous inner class? As I learned from <a href="http://env3d.org/beta/node/243">here</a> a simple <code>{}</code> will take some code to be executed as the constructor of that class. This allows you to create some kind of not-so-bad looking <a href="https://en.wikipedia.org/wiki/Builder_pattern">builder</a> specifications since your constructor code can use the complete API provided by it's superclass. The advantages of not having to carry your builder instance in an explicit variable (but implicit via <code>this</code>) and the possibility of simple nesting multiple builders comes with the fact that you will possibly generate a lot of classes in your binary.

<pre lang="java">
new MyDSL() {
    {
        color("red");
        rotation(90);
        transparency(0.5f);
    }
}
</pre>

In this example <code>MyDSL</code> provides an interface to specify some rendering options of graphical primitives.
In context of <a href="http://nifty-gui.lessvoid.com/">Nifty GUI</a> this is used for creating complete graphical layouts in Java as the counterpart to their XML definitions for layouts by using several builders.]]></content:encoded>
		<excerpt:encoded><![CDATA[]]></excerpt:encoded>
		<wp:post_id>21</wp:post_id>
		<wp:post_date>2012-03-16 19:38:23</wp:post_date>
		<wp:post_date_gmt>2012-03-16 18:38:23</wp:post_date_gmt>
		<wp:comment_status>open</wp:comment_status>
		<wp:ping_status>open</wp:ping_status>
		<wp:post_name>java-magic</wp:post_name>
		<wp:status>publish</wp:status>
		<wp:post_parent>0</wp:post_parent>
		<wp:menu_order>0</wp:menu_order>
		<wp:post_type>post</wp:post_type>
		<wp:post_password></wp:post_password>
		<wp:is_sticky>0</wp:is_sticky>
		<category domain="category" nicename="java"><![CDATA[Java]]></category>
		<wp:postmeta>
			<wp:meta_key>_edit_last</wp:meta_key>
			<wp:meta_value><![CDATA[3]]></wp:meta_value>
		</wp:postmeta>
	</item>
	<item>
		<title>Hello World!</title>
		<link>http://blog.example.org/2012/03/hello-world/</link>
		<pubDate>Fri, 16 Mar 2012 18:35:06 +0000</pubDate>
		<dc:creator>cn</dc:creator>
		<guid isPermaLink="false">http://blog.example.org/?p=47</guid>
		<description></description>
		<content:encoded><![CDATA[Here three developers will be bloggin' about <em>things</em>...]]></content:encoded>
		<excerpt:encoded><![CDATA[]]></excerpt:encoded>
		<wp:post_id>47</wp:post_id>
		<wp:post_date>2012-03-16 19:35:06</wp:post_date>
		<wp:post_date_gmt>2012-03-16 18:35:06</wp:post_date_gmt>
		<wp:comment_status>open</wp:comment_status>
		<wp:ping_status>open</wp:ping_status>
		<wp:post_name>hello-world</wp:post_name>
		<wp:status>publish</wp:status>
		<wp:post_parent>0</wp:post_parent>
		<wp:menu_order>0</wp:menu_order>
		<wp:post_type>page</wp:post_type>
		<wp:post_password></wp:post_password>
		<wp:is_sticky>0</wp:is_sticky>
		<category domain="category" nicename="uncategorized"><![CDATA[Uncategorized]]></category>
		<wp:postmeta>
			<wp:meta_key>_edit_last</wp:meta_key>
			<wp:meta_value><![CDATA[3]]></wp:meta_value>
		</wp:postmeta>
	</item>
	<item>
		<title>Mylyn Redmine Connector</title>
		<link>http://blog.example.org/2012/03/mylyn-redmine-connector/</link>
		<pubDate>Fri, 16 Mar 2012 19:32:18 +0000</pubDate>
		<dc:creator>cn</dc:creator>
		<guid isPermaLink="false">http://blog.example.org/?p=65</guid>
		<description></description>
		<content:encoded><![CDATA[<a href="http://www.eclipse.org/mylyn/">Mylyn</a> ist ein Eclipse-Plugin zur Aufgabenverwaltung, dass den Benutzer unterstützen soll indem es ihm nur die zur Bewältigung einer Aufgabe wichtigen Dokumente anzeigt und beim Wechsel der aktiven Aufgabe auch das geöffnete Dokumentenset automatisch ändert. Entwickelt wird Mylyn als OpenSource Projekt von <a href="http://www.tasktop.com/mylyn/">Tasktop</a>.

Ich wollte Mylyn in Eclipse aber einfach nur als angenehmere (und schneller einzusehende) Alternative zur Web-Oberfläche von <a href="http://www.redmine.org/">Redmine</a> benutzen. Eine Aufgabenverwaltung in einem lokalen Repository kam für mich nicht infrage da ich die Synchronisierung über mehrere Rechner benötige, die nur ein Webdienst bieten kann (auch wenn es da etwas umständliche Lösungen gibt das lokale Task-Repository <a href="http://www.vogella.de/blog/2010/08/26/local-mylyn-tasks-distributed/">z.B. via git zu synchronisieren</a>).

Um verschiedene andere Task-Repositories anbinden zu können gibt es in Mylyn das Konzept der Connectoren, von denen Tasktop bereits einige anbietet (BugZilla per default installiert, sonst viele für Tasktop Produkte) - aber leider keinen für Redmine. Das <a href="http://www.redmine.org/projects/redmine/wiki/HowTo_Mylyn">Redmine-Wiki</a> listet zwei Alternativen für eine Anbindung an Mylyn: der spezialisierte <a href="http://sourceforge.net/apps/wordpress/redmin-mylyncon/">Redmine Connector</a> (<a href="http://redmin-mylyncon.sourceforge.net/update-site/N/">Update Site</a>), gehostet auf SourceForge, dessen Entwicklung in der Vergangenheit schon teilweise eingestellt war und der generische Web Repository Connector, dessen <a href="http://download.eclipse.org/mylyn/incubator/3.6">Update Site</a> für meine Mylyn-Version (3.6) anfangs schwierig zu finden war.

Nach ersten gescheiterten Versuchen mit dem Redmine Connector (die an einer zu alten Version des zugehörigen Redmine-Plugins scheiterten - dieses Plugin wird vom Connector benötigt um mit Redmine interagieren zu können), habe ich mich dem Web Repository Connector zugewendet der aber nur lesenden Zugriff über die Mylyn-Oberfläche erlaubt, das Anlegen oder Aktualisieren eines Tickets wird darüber realisiert, dass die passende Redmine Seite im internen Webbrowser von Eclipse geöffnet wird - auch keine allzu befriedigende Lösung...

Mit der aktuellen Version des Redmine Connectors (die zur Zeit aktuelle Versionen von Eclipse - 3.7 Indigo - und Redmine - 1.2 - unterstützt, bei mir funktioniert es auch mit Redmine 1.3) habe ich aber keine weiteren Probleme festgestellt, das Einrichten des Connectors, Anlegen einer Query (die sogar custom fields unterstützt) sowie Anlegen, Aktualisieren (nur Attribute, noch keine Kommentare oder Dateianhänge) und Löschen von Tickets funktionieren fehlerfrei. Die Synchronisation hat bisher keine Fehler gemacht und informiert mich bei Änderungen mit hübschen kleinen Benachrichtigungspopups.

Bei wem die Installation und Einrichtung des Connectors ebenfalls etwas hakt (der Connector "vergisst" teilweise Einstellungen, es kommen NPEs), sollte am besten zwischen allen wichtigen Schritten Eclipse beenden und neustarten, dann sollte es reibungslos vonstatten gehen.]]></content:encoded>
		<excerpt:encoded><![CDATA[]]></excerpt:encoded>
		<wp:post_id>65</wp:post_id>
		<wp:post_date>2012-03-16 20:32:18</wp:post_date>
		<wp:post_date_gmt>2012-03-16 19:32:18</wp:post_date_gmt>
		<wp:comment_status>open</wp:comment_status>
		<wp:ping_status>open</wp:ping_status>
		<wp:post_name>mylyn-redmine-connector</wp:post_name>
		<wp:status>draft</wp:status>
		<wp:post_parent>0</wp:post_parent>
		<wp:menu_order>0</wp:menu_order>
		<wp:post_type>post</wp:post_type>
		<wp:post_password></wp:post_password>
		<wp:is_sticky>0</wp:is_sticky>
		<category domain="post_tag" nicename="eclipse"><![CDATA[eclipse]]></category>
		<category domain="post_tag" nicename="mylyn"><![CDATA[mylyn]]></category>
		<category domain="post_tag" nicename="redmine"><![CDATA[redmine]]></category>
		<category domain="category" nicename="uncategorized"><![CDATA[Uncategorized]]></category>
		<wp:postmeta>
			<wp:meta_key>_edit_last</wp:meta_key>
			<wp:meta_value><![CDATA[3]]></wp:meta_value>
		</wp:postmeta>
		<wp:comment>
			<wp:comment_id>2</wp:comment_id>
			<wp:comment_author><![CDATA[harold]]></wp:comment_author>
			<wp:comment_author_email>monday8@gmail.com</wp:comment_author_email>
			<wp:comment_author_url>http://thescenarioexperience.com</wp:comment_author_url>
			<wp:comment_author_IP>46.251.237.94</wp:comment_author_IP>
			<wp:comment_date>2012-03-29 00:41:00</wp:comment_date>
			<wp:comment_date_gmt>2012-03-28 23:41:00</wp:comment_date_gmt>
			<wp:comment_content><![CDATA[What a cool blog!]]></wp:comment_content>
			<wp:comment_approved>1</wp:comment_approved>
			<wp:comment_type></wp:comment_type>
			<wp:comment_parent>0</wp:comment_parent>
			<wp:comment_user_id>0</wp:comment_user_id>
			<wp:commentmeta>
				<wp:meta_key>_wp_trash_meta_status</wp:meta_key>
				<wp:meta_value><![CDATA[0]]></wp:meta_value>
			</wp:commentmeta>
			<wp:commentmeta>
				<wp:meta_key>_wp_trash_meta_time</wp:meta_key>
				<wp:meta_value><![CDATA[1332978414]]></wp:meta_value>
			</wp:commentmeta>
		</wp:comment>
	</item>
</channel>
</rss>
