How can I view the source code of an any Java class in Eclipse without using the combination Ctrl + Left Mouse Click at the already declared class field in the new java project?
For example, if I only need to view the sources of
FileInputStream class, I need to create new java project, create new class, declare new class field
FileInputStream fis;, import
java.io.* and only then I can press Ctrl + Left Mouse Click at the field
FileInputStream. Is there any shorter way to reach the same result without creating the new java project?
There is a shortcut Ctrl+Shift+T (on macOS: Cmd+Shift+T; menu: Navigation > Open Type...) to search for all types that is in your classpath, check the details here
Nice thing about it is that you can search with first letters of each word in uppercase, for example to find
FileInputStream, you can use
FIS. I love doing so =)