Make sure that your new built-in does not have the same name as an already existing one. You will find example built-ins in the directory
interfaces/development/Code Examples
This directory contains a ready-to-use Eclipse project which includes some examples.