John Craig

PDI Plugin Step Development: Dialog Creation

Discussion created by John Craig on Jan 3, 2018
Latest reply on Jan 4, 2018 by John Craig

Hi Folks,

I'd be grateful to hear from anyone who's got some experience creating their own plug-in steps with more than trivial dialogs for configuring the plug-in step.

 

In particular, if anyone's managed to figure out a way to use XML or what-have-you to set up the dialog rather than coding them completely by hand. But, I'm happy to see any examples anyone would be willing to share however the dialog was created.

 

We have a number of steps that are programmed as User-Defined Java Class steps whose logic is identical (they just operate on different input and output fields). I'm anxious to get these coded up as plug-ins so that the maintenance and use is simpler. In the particular case I'm focused on at the moment, the step is a UTC to Local Time Zone conversion and in addition to the step name, it needs a single dialog combo box input for the name of the Time Zone field, and then a table that gives the name of the input field in one column and the name of the new output field in another column. Ultimately, I'd like to have a 3rd column that would allow specifying the precision of the conversion (such as, to the minute, hour, or day).

 

I don't have any experience with the Eclipse SWT dialog classes & methods; it's been frustrating to get this set up because I've been unable to use Eclipse to even test my step dialog class (current Eclipse apparently uses a different version of the SWT library than does Pentaho) so I've been stuck just trying out something, building my JAR file, and then restarting Pentaho to pick up the new JAR and then edit the step to see what the dialog looks like now.

 

In short, if you have some experience with plug-in step dialog creation--and have any suggestions to improve my tedious approach, I'd be pleased to hear from you.

 

Thanks, John

Outcomes