Select the class name.
Refactor > Move or press F6
Refactor > Move
F6
Select "Move inner class Foo to upper level"