JBIDE-14972 Use preferences in code snippets from Palette wizards.

Test is added.