When we want to viewSource codeYou don't want to view the class files one by one.
Follow these steps: press Ctrl and click the name of the method you want to view.
If you view the source information for the first timeCode...
Select the JDK source code package path and select the src.zip file.
Click OK.
It is relatively difficult to view eclipse source code
Open source in JavaProgramI have to admit that JDK and eclipse source code are the best and the best open source code, which is worth the trouble.
Eclipse source code efficiency is recognized as the fact that the following example is also a reference to the library and the creation of class PATH variables.
The following shows the source code of the jface class.
Step 1: add the SWT package to the eclipse build path (Library Reference)
Right-click Project name --- Properties
In the pop-up option port, select Java build path --- database --- add variable --- Select eclipse_home --- click Extension
Select SWT --- SWT. Jar (Other plugins --- org. Eclipse. jface_3.2.2 --- jface. Jar)
Step 2: Set the class PATH variable to view SWT source code
Write a code with SWT
For example:
Import Org. eclipse. SWT. widgets. button; </P> <p> public class testjface {</P> <p> button B1; </P> <p> Public static void main (string ARGs []) {</P> <p >}< br/>}
Hold down CTRL and click the button, which is the same as viewing the JDK source code.
The following figure shows the effect.