I’m neit­her very fa­mi­liar with Ruby, nor with Rails. However, I like Open Source soft­ware and think it’s im­portant to cont­ri­bute to pro­jects which are part of your daily work­flow. That’s why I cont­ri­bute to Redmine any­ways. It’s a great Open Source pro­ject ma­nage­ment web ap­p­li­ca­tion and our de­ve­lop­ment team at pa­gina GmbH re­lies hea­vily on it.

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

A tiny script to fetch and run la­test Redmine Trunk ver­sion in a lo­cal de­ve­lop­ment en­vi­ron­ment:

Since I don’t like SVN very much I’m using a clone of the un­of­fi­cial Redmine GitHub Mirror and pull chan­ges from over there.

Please not that you al­re­ady need Redmine to be in­stal­led be­fore using this…

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

Part 2 of this tu­to­rial is about the EditorChangeListener and how we can use it to enable or disa­ble our custom but­ton on dif­fe­rent file ty­pes. The code can be found in step2 branch in the GitHub repo.

Let’s say, our custom but­ton should only be active/enabled/clickable when there is an XML file opened in the cur­rent oXy­gen edi­tor tab.

First, we add an EditorChangeListener with a new func­tion in all it’s change 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 change in the oXy­gen edi­tor pa­nes. Everytime we change the cur­rent tab in oXy­gen, close a file 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 file URL:

First, we re­treive the cur­rent edi­tor with the me­thod pluginWorkspaceAccess.getCurrentEditorAccess(PluginWorkspace.MAIN_EDITING_AREA) and check whe­ther we have an edi­tor opened or not.

Second, we re­treive the file URL of the cur­rent edi­tor with currentEditor.getEditorLocation() and then check the file ex­ten­sion for .xml en­ding.

Based on these checks we eit­her enable or disa­ble the plugin demo but­ton.

There’s also some other foo we have to change in or­der to get these chan­ges to work. Check out the whole file CustomButtonPluginExtension.java in the GitHub repo in branch step2.

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

In the next couple of weeks I’d like to write some blog­posts and tu­to­ri­als about plugin de­ve­lop­ment for the awe­some oXy­gen XML Editor. I’d like to share my ex­pe­ri­en­ces in plugin de­ve­lop­ment since tu­to­ri­als and re­sour­ces for this to­pic are rare…

I’ll start off by sho­w­ing how to add a custom tool­bar with a simple 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­rite IDE (I’m using Eclipse), place the oxygen.jar li­brary from the SDK down­load in your lib/ fol­der and add it to the build path. Also add the Javadoc, that’s quite hel­pful. You can also ac­cess the the do­cu­men­ta­tion on­line.

To start off with plugin de­ve­lop­ment, read the oXy­gen ma­nuel chap­ter about plugin de­ve­lop­ment. Their blog also of­fers some help.

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


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 custom tool­bar with its id at­tri­bute.

Next, we need YourDemoPlugin.java which is for con­ve­ni­ence and can re­turn an in­stance of our plugin. Haven’t found out what else you can use it for…

And fi­nally, YourDemoPluginExtension.java is the Extension its­elf. Your PluginExtension class al­ways needs to im­ple­ment the plugin type in­ter­face, like in our case, the WorkspaceAccessPluginExtension with 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 time. Take a look at the fol­lo­wing:

We add a ToolbarComponentsCustomizer and add a custom JButton if the cur­rently pro­ces­sed tool­bar equals our tool­bar ID in plugin.xml.

For demo re­a­sons I ad­ded a mes­sa­ge­Dia­log with the name of our tool­bar. Feel free to do wha­te­ver you want with the JButton…

However, don’t for­get to add your freshly crea­ted GUI com­po­n­ents to the tool­bar with toolbarInfo.setComponents() and name your tool­bar with toolbarInfo.setTitle().

To load the plugin in oXy­gen ex­port your Java Project as a JAR li­brary and go to the oXy­gen in­stal­la­tion di­rec­tory. Open the fol­der plugins/ and create your own plugin fol­der DemoButton/. Place the plugin.xml file in­side, create a fol­der lib/ in­side and place the jar file in it. Restart oXy­gen.

That’s it… 🙂

paginaEPUBChecker_markupforumAuf dem letz­ten Markupforum in Stuttgart (Nov. 2013) habe ich ei­nen Kurzvortrag über den pa­gina EPUB-Checker ge­hal­ten, den ich seit ca. 2-3 Jahren als Freeware ent­wickle (der EPUB-Checker ist eine 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 wurde ich (und je­der an­dere 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 meinte: „Du bist im Internet und kommst da nie wie­der raus.“ 😉

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

Auf ei­nige Filme mir be­son­ders gut ge­fal­len ha­ben möchte 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­leine quer durch Kirgistan ge­ra­delt ist. Den ge­sam­ten 25-Minuten-Film kann man sich üb­ri­gens auch auf Youtube an­schauen:

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

Und des­wei­te­ren der Canyoning-Film „The Beginning“ wel­cher mich als Canyoning-Begeisterten be­son­ders ge­flasht hat. Zumal ich in ei­ner der Tessiner-Schluchten („Boggera“) im Sommer selbst erst 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 euch die Vollversion nur wärms­tens emp­feh­len. Absolut kras­ser Shiet 😉