The problem is that the class file is preferred over the java (by default), here is how you can change that for Eclipse (tested on NEON 2):
- Right-click on the Project in the Project-Explorer, click Properties
- On the new window select: Run/Debug Settings
- Create a new configuration (or duplicate another one)
- Select the new config and click Edit...
- Go to the tab Source
- Select the Default and Remove
- Create a new path with Add..., select Java Library, then JRE System Library
- Create a new path with Add..., select the location where the sourcecode is by Workspace folder (if it is a project in the same workspace) or File System directory (it it is not)