I have a java project (maven project) with different packages which compiles fine and all works expect the following message is shown when right clicking a directory in the package explorer and go to Source->Format
"The selection contains no compilation unit"
However, going one hierarchy depper (the package within the package), the Source->Format
works. It's not on all packages but on a few and I don't know why.
How can I solve this?