The path of Eclipse advanced

Source: Internet
Author: User

Initially learning Java, you can write code directly in the Notepad, command line under the use of Javac,java and other compiled Java programs, with the depth of learning, command line can provide the limitations of the function gradually reflected. Eclipse is an excellent Java IDE tool, and as I learn more and more, various features and features of Eclipse are gradually applied in practice. Here I will continue to record my experience in using the eclipse process.

0.eclipse Basic Knowledge

Slightly. There is time to sum up.

I. Parameter settings

Two. Plugin Chapter

1.metrics

Because OO classes need to count the cyclomatic complexity of the code, start using metrics. The installation method is similar to the installation of the general Eclipse plugins, which can be referenced in the Metrics Project site http://metrics.sourceforge.net/Tutorial (Installation procedure), the basic process: installation (install), active (enable), display (show view).

1.1 Lap Complexity Introduction

First introduce the concept of cyclomatic complexity. Cyclomatic complexity, also known as cyclic complexity and conditional complexity, represents the number of linear independent paths in a program. Generated in the field of software testing, the test program of each linear independent path, the number of tests in this case is the program's cyclic complexity. Application objects include subroutines, modules, classes, methods, and so on. Here is a brief introduction to its computational ideas:

First, the cyclomatic complexity is calculated using the program's Process Control diagram, and the program's control flow includes sequential execution, loop (for | While), condition (if | case) and so on. Branches occur at points where the process changes (no longer executed in a simple order), and the points and program execution paths can be converted to a graph to be explored.

1) for only one entrance, multiple exits of the program (method), the complexity of the formula is v-x+2, where V is the number of decision points (if,while, etc.), X is the program exit (return); available, for only one exit program, the complexity is the number of decision points +1;

2) More general calculation method: m=e-n+2p, where E is the number of edges, N is the number of nodes, p is connected graph (connected components), and in a single program/sub-Program/method, P=1;

1.2metrics in action

After finishing the above foundation, we begin to introduce the use of metrics.

The path of Eclipse advanced

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.