Example for a simple IJ2 / Fiji Plugin

Wonder how to write a IJ2 / Fiji Plugin (Command) that can run nicely from within Eclipse and Fiji or ImageJ2?

There are several answer Google gives you, and most of them go the old IJ (1) way. If you want to use ops or any of the IJ2 services you will appreciate this:


Or this one (which also uses ops to work on images):