INTELLIJ IDEA 4 New Features on-the-fly code Analysis (dynamic code analysis)

zhaozj2021-02-16  46

Intelligent Error Highlighting (Intelligent Highlighting Error)

All common syntax errors, as well as all other errors that would be detected during compilation, are highlighted in the source code so you do not need to compile your code in order to find all your mistakes. Each error is highlighted in the editor and has In the Right Gutter Area for easy navigation to the erroneous place, which is especially useful when working with large file.

All common syntax errors and other edited errors that can be discovered are highlighted in the source code. This means that you can find all your errors without compiler. Error highlighting the red waves underline, you can easily find it, this feature is particularly highlighted when you have a big source file.

Javadoc Error Highlighting (Javadoc errors highlight)

IDEA knows general javadoc rules, such as structure and syntax, and will detect any common inconsistencies found in your javadoc comments, eg wrong parameter references, return attributes in the field or void method comments, etc.Having found an unknown javadoc tag, IDEA will Suggests That You Add this Tag to the Known Tags List, SO That You Never Get An Error or Warning Indications About IT.

IDEA knows some rules about structure and grammar, and will find some contradictions in your Javadoc, such as inconsistent parameters, returning to local variables or notes without returning value, and more. When an unknown Javadoc TAG is found, IDEA will remind you to join this TAG into a known tag list, so you can't see the error and warning prompts about this TAG.

Detecting Deprecated Symbols (Discovery Impact Identifier)

IF Any Deprecated Code Is Used in Any Class or Interface, IDEA Will Recognize It and Highlight The Corresponding Statements Directly in The Editor.

If there is any illegal code in your Class or Interface, IDEA will find it and mark it directly in the editor.

Highlighting Unused Imports, Throws Declarations and Other Unused Symbols (highlighting IMPORT and THROW declarations that are not used, and other identifiers that are not used)

IDEA will point out all redundant import statements, throws declarations and other unused symbols (like variables and methods), and will highlight them in the editor with the corresponding links on the right gutter area for easier navigation. More information on other code analysis features can Be Found Here.Idea will point out excess import and throw declarations, as well as other excess methods and variable identifiers and will highlight them in the editor, and give appropriate suggestions, you can easily find them. You can also get more related information from the prompt opinion.

Import Assistant - Helps to Automatical INSERT IMPORT Statements While Typing Code, and Detects Non-Imported Classes Found In Pasted Blocks Of Class (Import Assistant - Helping you automatically inserting the Import declaration when editing the code, and automatically finds that you paste the code Export Class)

When you use the name of a class from anywhere in a project library, but the class has not been imported into the current file, a hint with the suggestion to import the class pops up over the text. Pressing Alt Enter inserts the import statement . moreover, when you copy a block of text from one file and paste it into another, IDEA automatically detects all the classes that are used inside the copied block but have not been imported to the destination file. It then shows a list of all such Classes and allows you to select classes you want to import into the new file.

When you use a copy of the Class in a package, and this class does not declare in the current file, there will be a prompt to suggest some of your import, some of this Class declaration, you just need to press Alt Enter Import Corresponding Package. Of course, this feature will also work when you paste the code, and he will prompt the Package that needs import. Idea will give a list to choose?

INTENTION ActionS (intent identification)

When you are typing your source code, know that IDEA is always one step ahead of you. For example, if you assign a value to a variable that represents an instance of one of its ancestors, IDEA will immediately interpret your intention as wanting either to cast the ancestor type to the variable type or to define the type of variable the same as the ancestor. A light bulb will appear suggesting that you perform one of these two operations. Also you can start using a method before it has been declared. When this occurs, IDEA's light bulb popup will appear suggesting you create a new method from its usage. if you accept the suggestion, the new method will be created in the corresponding class. More features related to automatic code generation in IDEA are described here. when When you enter the source code, Idea will know what you will do next. For example, when you declare a variable inherited in a parent class, Idea will think that it is necessary to inherit a statement of some parent classes. There is a small bulb that will prompt you to do this. This is the case when you write a method. If you accept the suggestion of "small light bulb", you need to do it automatically. (Inline, may have access, but easy to understand)

Visual Indication of Overriding / Overriden and Implementing / Implement Methods (eye-catching) Method for Override and Implement)

Special signs (and) on the left gutter area of ​​the editor indicate that the current method overrides or implements the corresponding method of an ancestor class / interface. Moving the mouse to one of these symbols will bring up a tooltip with the base method details. If you click the symbol, the corresponding class / interface will be immediately opened in the editor, with the caret automatically positioned at the base method.When icons or are shown, it means that the method is overriden or implemented in inheriting classes. Pressing the Icon Will Open a lookup list with these classes, for selecting the desired one to open at the corresponding method. The corresponding method of the current method is labeled in the left side of the code or the corresponding method of the parent class or interface. Moving the mouse to these symbols, the parent class will show a detailed detail. If you click on the mouse, the corresponding parent class implementation will appear in the editor and automatically locate it. When symbols or appears, this method requires overloading or implementation of the parent class. Clicking on the mouse will pop up the corresponding list allows you to select a method.

转载请注明原文地址:https://www.9cbs.com/read-28341.html

New Post(0)