Use MyEclipse to view the number of lines of code

The following two methods are all scraped from the Internet, and they work well after testing, so I will summarize them here.

 

1. Only view the number of lines of java code:

Select a project, right-click - "Properties -" MyEclipse, and then you can see the project's folders, packages, classes, lines of code, etc. on the right. If you view it for the first time, there will be no data in the Lines of Code item. You need to click the "update" button, and it will be displayed after a period of time. And this number does not seem to be calculated by yourself. If the first update is completed, it is 13 lines. Later, when the code is added and then opened, it will be 13 lines. You need to manually update it every time.

Note: This method only looks at the java code in the project, code like JSP, Html, xml files will not be counted.

 

2. View the number of codes in all files:

This can be done using the commonly used search, that is, Ctrl+H to calculate, and then fill in with reference to the figure below, and finally "Search".

The principle of this method is to wrap the code, so choose "Regular expression" when selecting the type. We usually find things, this option is basically not selected.

File name patterns: Which file types to look for, if you want to count the code amount of all JSP files, fill in *.jsp here, I want to count the total code of all files, so fill in *.*.

For the Scope of the last item, select the scope of the search, and select the open item here. When I usually search, I choose Workspace, that is, the entire workspace, but the search results only contain the content of "open projects", and closed projects will not be found.

Note: If the project is too large, using this method can easily cause MyEclipse to get stuck. If you want to continue statistics, don't touch it. If you don't want to do it, just close it.

 

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326640688&siteId=291194637