I’m neit­her very fa­mi­li­ar with Ru­by, nor with Rails. Howe­ver, I li­ke Open Source soft­ware and think it’s im­portant to con­tri­bu­te to pro­jects which are part of your dai­ly work­flow. That’s why I con­tri­bu­te to Red­mi­ne any­ways. It’s a gre­at 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.

Be­cau­se I know Ru­by on Rails very litt­le I won’t wri­te blog posts about crea­ting Red­mi­ne plug­ins, de­spi­te ha­ving writ­ten or for­ked several of them, but will in­s­te­ad sha­re 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 fetch and run la­test Red­mi­ne Trunk ver­si­on in a lo­cal de­ve­lop­ment en­vi­ron­ment:

Sin­ce I don’t li­ke SVN very much I’m using a clo­ne of the un­of­fi­ci­al Red­mi­ne Git­Hub Mir­ror and pull chan­ges from over the­re.

Plea­se not that you al­re­ady need Red­mi­ne 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 plug­in de­ve­lop­ment. If you mis­sed part 1, read it he­re or check out the code on Git­Hub.


Part 2 of this tu­to­ri­al is about the EditorChangeListener and how we can use it to en­ab­le or dis­able our custom but­ton on dif­fe­rent file ty­pes. The code can be found in step2 branch in the Git­Hub re­po.

Let’s say, our custom but­ton should on­ly be active/enabled/clickable when the­re is an XML file ope­ned in the cur­rent oXy­gen edi­tor tab.

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

checkCurrentEditorAndChangeButtonStatus() is a new me­thod to check the cur­rent edi­tor on any chan­ge in the oXy­gen edi­tor pa­nes. Ever­y­ti­me we chan­ge the cur­rent tab in oXy­gen, clo­se a file or open a new one, the checkCurrentEditorAndChangeButtonStatus() is cal­led to check the cur­rent file URL:

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

Se­cond, we re­trei­ve the file URL of the cur­rent edi­tor with currentEditor.getEditorLocation() and then check the file ex­ten­si­on for .xml en­ding.

Ba­sed on the­se checks we eit­her en­ab­le or dis­able the plug­in de­mo but­ton.

There’s al­so so­me other foo we have to chan­ge in or­der to get the­se chan­ges to work. Check out the who­le file CustomButtonPluginExtension.java in the Git­Hub re­po in branch step2.


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

In the next coup­le of weeks I’d li­ke to wri­te so­me blog­posts and tu­to­ri­als about plug­in de­ve­lop­ment for the awe­so­me oXy­gen XML Edi­tor. I’d li­ke to sha­re my ex­pe­ri­en­ces in plug­in 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­wing how to add a custom tool­bar with a simp­le 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 Web­site. Crea­te a new Ja­va Pro­ject in your fa­vo­ri­te IDE (I’m using Eclip­se), place the oxygen.jar li­bra­ry from the SDK down­load in your lib/ fol­der and add it to the build path. Al­so add the Ja­va­doc, 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 with plug­in de­ve­lop­ment, read the oXy­gen ma­nu­el chap­ter about plug­in 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 Ac­cess Plug­in“. A plug­in al­ways con­sists of the fol­lo­wing sources:

YourDemoPlugin.java
YourDemoPluginExtension.java
plugin.xml

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

The <toolbar> ele­ment de­fi­nes our custom tool­bar with its id at­tri­bu­te.

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

And fi­nal­ly, YourDemoPluginExtension.java is the Ex­ten­si­on its­elf. Your Plug­i­n­Ex­ten­si­on class al­ways needs to im­ple­ment the plug­in ty­pe in­ter­face, li­ke in our ca­se, the WorkspaceAccessPluginExtension with it’s me­thods applicationStarted() and applicationClosing(). We will use applicationStarted() to add our tool­bar and but­ton to the oXy­gen main win­dow at start­up time. Ta­ke a look at the fol­lo­wing:

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

For de­mo re­a­sons I ad­ded a messageDialog with the na­me of our tool­bar. Feel free to do wha­te­ver you want with the JBut­ton…

Howe­ver, don’t for­get to add your fresh­ly crea­ted GUI com­pon­ents to the tool­bar with toolbarInfo.setComponents() and na­me your tool­bar with toolbarInfo.setTitle().

To load the plug­in in oXy­gen ex­port your Ja­va Pro­ject 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 plug­in fol­der DemoButton/. Place the plugin.xml file in­si­de, crea­te a fol­der lib/ in­si­de and place the jar file in it. Re­start oXy­gen.

That’s it… 🙂

paginaEPUBChecker_markupforumAuf dem letz­ten Mar­kupfo­rum in Stutt­gart (Nov. 2013) ha­be ich ei­nen Kurz­vor­trag über den pa­gi­na EPUB-Checker ge­hal­ten, den ich seit ca. 2–3 Jah­ren als Free­ware ent­wick­le (der EPUB-Checker ist ei­ne gra­phi­sche Be­nut­zer­ober­flä­che um EPUB-E-Books zu va­li­die­ren).

Von mei­nem ehe­ma­li­gen HdM-Professor Mar­ko Hed­ler wur­de ich (und je­der an­de­re Re­fe­rent) nach dem Vor­trag kurz in­ter­viewt. Sehr spon­tan, muss ich er­wäh­nen, um mein Stot­tern zu recht­fer­ti­gen 😉

Oder wie ein Kol­le­ge so nett mein­te: „Du bist im In­ter­net und kommst da nie wie­der raus.“ 😉

Die dies­jäh­ri­ge Eu­ro­pean Out­door Film Tour war mal wie­der ham­mer­mä­ßi­ge Outdoor-Action! Ab­so­lut se­hens­wert und in­spi­rie­rend!

Auf ei­ni­ge Fil­me 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 Do­ku „The Road From Ka­ra­kol“ von Kyle Demps­ter der im Som­mer 2011 mit dem Fahr­rad al­lei­ne quer durch Kir­gi­stan ge­ra­delt ist. Den ge­sam­ten 25-Minuten-Film kann man sich üb­ri­gens auch auf You­tube an­schau­en:

Sound­track: Exit­mu­sic – The Mo­dern Age und Le­molo­mu­sic – Open Air

Und des­wei­te­ren der Canyoning-Film „The Be­gin­ning“ wel­cher mich als Canyoning-Begeisterten be­son­ders ge­flasht hat. Zu­mal ich in ei­ner der Tessiner-Schluchten („Bog­ge­ra“) im Som­mer selbst erst war. Den Trai­ler gibts hier, den ge­sam­ten Film kann man ab 4 € als VOD über die Web­site kau­fen.

War­ren Ver­boom und sein Team ha­ben den wohl ers­ten Canyoning-Film über­haupt ge­dreht und ich kann euch die Voll­ver­si­on nur wärms­tens emp­feh­len. Ab­so­lut kras­ser Shiet 😉