Ported 'GenerateSwitchLabelsAction'.
Fixed coding style.
Merge pull request #412 from TheCommieDuck/generate-switch

Ported 'GenerateSwitchLabelsAction'.