Editor does not contain a main type
I have this problem a lot with Eclipse and Scala. It helps if you clean your workspace and rebuild your Project.
Sometimes Eclipse doesn't recognize correctly which files it has to recompile :(
Edit: The Code runs fine in Eclipse
In Eclipse, make sure you add your source folder in the project properties -> java build path -> source. Otherwise, the main() function may not be included in your project.
A simpler way is to close the project and reopen it.