I’m neit­her very fa­mi­li­ar wi­th Ruby, nor wi­th Rails. However, I li­ke Open Source soft­ware and think it’s im­port­ant to cont­ri­bu­te to pro­jects which are part of your dai­ly work­flow. That’s why I cont­ri­bu­te to Redmine any­ways. It’s a great Open Source pro­ject ma­nage­ment web ap­p­li­ca­ti­on and our de­ve­lop­ment team at pa­gi­na GmbH re­li­es hea­vi­ly on it.

Because I know Ruby on Rails very litt­le I won’t wri­te blog posts about crea­ting Redmine plug­ins, de­s­pi­te ha­ving writ­ten or for­ked se­ver­al of them, but will in­s­tead share so­me scripts from my de­ve­lop­ment pipeline—local and on ser­ver. May so­me of them be of in­te­rest for so­meo­ne…


A ti­ny script to fet­ch and run la­test Redmine Trunk ver­si­on in a lo­cal de­ve­lop­ment en­vi­ron­ment:

Since I don’t li­ke SVN very much I’m using a clo­ne of the un­of­fi­ci­al Redmine GitHub Mirror and pull chan­ges from over the­re.

Please not that you al­re­a­dy need Redmine to be in­stal­led be­fo­re using this…

This is part 2 of my tu­to­ri­al se­ries on oxy­gen plugin de­ve­lop­ment. If you mis­sed part 1, re­ad it here or check out the code on GitHub.


Part 2 of this tu­to­ri­al is about the EditorChangeListener and how we can use it to enable or disa­ble our cust­om but­ton on dif­fe­rent fi­le ty­pes. The code can be found in step2 bran­ch in the GitHub re­po.

Let’s say, our cust­om but­ton should on­ly be active/enabled/clickable when the­re is an XML fi­le opened in the cur­rent oXy­gen edi­tor tab.

First, we add an EditorChangeListener wi­th a new func­tion in all it’s chan­ge me­thods:

check­Cur­ren­tE­di­to­rAnd­Ch­an­ge­But­ton­Sta­tus() is a new me­thod to check the cur­rent edi­tor on any chan­ge in the oXy­gen edi­tor pa­nes. Everytime we chan­ge the cur­rent tab in oXy­gen, clo­se a fi­le or open a new one, the check­Cur­ren­tE­di­to­rAnd­Ch­an­ge­But­ton­Sta­tus() is cal­led to check the cur­rent fi­le URL:

First, we re­trei­ve the cur­rent edi­tor wi­th the me­thod pluginWorkspaceAccess.getCurrentEditorAccess(PluginWorkspace.MAIN_EDITING_AREA) and check whe­ther we ha­ve an edi­tor opened or not.

Second, we re­trei­ve the fi­le URL of the cur­rent edi­tor wi­th currentEditor.getEditorLocation() and then check the fi­le ex­ten­si­on for .xml en­ding.

Based on the­se checks we eit­her enable or disa­ble the plugin de­mo but­ton.

There’s al­so so­me other foo we ha­ve to chan­ge in or­der to get the­se chan­ges to work. Check out the who­le fi­le CustomButtonPluginExtension.java in the GitHub re­po in bran­ch step2.


In part 3 we will learn how to check whe­ther the fi­le is opened in author- or text-mode. Stay tu­n­ed…

In the next cou­ple of weeks I’d li­ke to wri­te so­me blog­posts and tu­to­ri­als about plugin de­ve­lop­ment for the awe­so­me oXy­gen XML Editor. I’d li­ke to share my ex­pe­ri­en­ces in plugin de­ve­lop­ment sin­ce tu­to­ri­als and re­sour­ces for this to­pic are ra­re…

I’ll start off by sho­w­ing how to add a cust­om tool­bar wi­th a sim­ple but­ton to the oXy­gen main win­dow.

First of all, we need to down­load the oXy­gen plug­ins SDK from the oXy­gen Website. Create a new Java Project in your fa­vo­ri­te IDE (I’m using Eclipse), pla­ce the oxygen.jar li­bra­ry from the SDK down­load in your lib/ fol­der and add it to the build pa­th. Also add the Javadoc, that’s qui­te hel­pful. You can al­so ac­cess the the do­cu­men­ta­ti­on on­line.

To start off wi­th plugin de­ve­lop­ment, re­ad the oXy­gen ma­nu­el chap­ter about plugin de­ve­lop­ment. Their blog al­so of­fers so­me help.

For ex­ten­ding the oXy­gen main win­dow we need to crea­te a „Workspace Access Plugin“. A plugin al­ways con­sists of the fol­lo­wing sour­ces:

YourDemoPlugin.java
YourDemoPluginExtension.java
plugin.xml

plugin.xml is the plugin de­scrip­tor and you can set it up as fol­lows:

The <tool­bar> ele­ment de­fi­nes our cust­om tool­bar wi­th its id at­tri­bu­te.

Next, we need YourDemoPlugin.ja­va which is for con­ve­ni­en­ce and can re­turn an in­stan­ce of our plugin. Haven’t found out what el­se you can use it for…

And fi­nal­ly, YourDemoPluginExtension.ja­va is the Extension its­elf. Your PluginExtension class al­ways nee­ds to im­ple­ment the plugin ty­pe in­ter­face, li­ke in our ca­se, the WorkspaceAccessPluginExtension wi­th it’s me­thods ap­p­li­ca­ti­on­S­tar­ted() and ap­p­li­ca­tionClo­sing(). We will use ap­p­li­ca­ti­on­S­tar­ted() to add our tool­bar and but­ton to the oXy­gen main win­dow at star­tup ti­me. Take a look at the fol­lo­wing:

We add a ToolbarComponentsCustomizer and add a cust­om JButton if the cur­rent­ly pro­ces­sed tool­bar equals our tool­bar ID in plugin.xml.

For de­mo re­a­sons I ad­ded a mes­sa­ge­Dia­log wi­th the na­me of our tool­bar. Feel free to do wha­te­ver you want wi­th the JButton…

However, don’t for­get to add your fresh­ly crea­ted GUI com­po­n­ents to the tool­bar wi­th toolbarInfo.setComponents() and na­me your tool­bar wi­th toolbarInfo.setTitle().

To load the plugin in oXy­gen ex­port your Java Project as a JAR li­bra­ry and go to the oXy­gen in­stal­la­ti­on di­rec­to­ry. Open the fol­der plugins/ and crea­te your own plugin fol­der DemoButton/. Place the plugin.xml fi­le in­si­de, crea­te a fol­der lib/ in­si­de and pla­ce the jar fi­le in it. Restart oXy­gen.

That’s it… 🙂

paginaEPUBChecker_markupforumAuf dem letz­ten Markupforum in Stuttgart (Nov. 2013) ha­be ich ei­nen Kurzvortrag über den pa­gi­na EPUB-Checker ge­hal­ten, den ich seit ca. 2-3 Jahren als Freeware ent­wick­le (der EPUB-Checker ist ei­ne gra­phi­sche Benutzeroberfläche um EPUB-E-Books zu va­li­die­ren).

Von mei­nem ehe­ma­li­gen HdM-Professor Marko Hedler wur­de ich (und je­der an­de­re Referent) nach dem Vortrag kurz in­ter­viewt. Sehr spon­tan, muss ich er­wäh­nen, um mein Stottern zu recht­fer­ti­gen 😉

Oder wie ein Kollege so nett mein­te: „Du bist im Internet und kommst da nie wie­der raus.“ 😉

Die dies­jäh­ri­ge European Outdoor Film Tour war mal wie­der ham­mer­mä­ßi­ge Outdoor-Action! Absolut se­hens­wert und in­spi­rie­rend!

Auf ei­ni­ge Filme mir be­son­ders gut ge­fal­len ha­ben möch­te ich hier kurz hin­wei­sen.

Das wä­re zum ei­nen die Doku „The Road From Karakol“ von Kyle Dempster der im Sommer 2011 mit dem Fahrrad al­lei­ne quer durch Kirgistan ge­ra­delt ist. Den ge­sam­ten 25-Minuten-Film kann man si­ch üb­ri­gens auch auf Youtube an­schau­en:

Soundtrack: Exitmusic – The Modern Age und Lemolomusic – Open Air

Und des­wei­te­ren der Canyoning-Film „The Beginning“ wel­cher mi­ch als Canyoning-Begeisterten be­son­ders ge­flasht hat. Zumal ich in ei­ner der Tessiner-Schluchten („Boggera“) im Sommer selbst er­st war. Den Trailer gibts hier, den ge­sam­ten Film kann man ab 4 € als VOD über die Website kau­fen.

Warren Verboom und sein Team ha­ben den wohl ers­ten Canyoning-Film über­haupt ge­dreht und ich kann eu­ch die Vollversion nur wärms­tens emp­feh­len. Absolut kras­ser Shiet 😉