Eclipse (and any other IDE) can only show you source code for external libraries if that source actually is around locally.
In other words: within your project setup, you define libraries and JRE/JDK runtime environments that should be used for your project. Typically, the JARs that come with JREs/JDKs will come with "source code attached"; but if not, you have to do two things:
- Obtain the corresponding source code archive from somewhere; most of the time, they are already on your system (because they are typically part of the product you are using; either JDK or 3rd party library).
- Then you have to tell eclipse where to find that source code.
In your case: the JavaFX source code might be distributed with your JDK. You simply need to select the corresponding zip file using the standard "Attach Source" approach. So, first check if you can find the file javafx-src.zip on your local system; if not; turn here.