Develop Java programs with JBuilder high efficiency

xiaoxiao2021-03-06  119

The cattle will always say: "Develop Java Programs I only use, Notepad." However, we believe that if you can use Notepad to create a HelloWorld program, you can make your best to create your application in the future development, which can only bring you a lot of trouble. Using advanced editing tools will greatly improve the efficiency of program writing. The JBuilder provides CodeInsight and "Program Code Template" to enhance the Java program.

The features provided by CodeInsight:

MemberInsight: (Ctrl H) Provides the currently available member method to press the sentence after a target name, the JBuilder's codeInsight function will display a pop-up window, which contains the properties and methods defined by the object, we call it MEMBERINSIGHT. The following example is output system.out. After the MemberInsight function displays all methods.

ClassInsight (Ctrl Alt H provides all categories that can be accessed under the current category path), we can type the class name that will be used in the Search for field, all matches List are displayed in matching list.

Three options in the dialog box:

INSERT SHORT CLASS Name with explicit import

Insert a short category name and contain the IMPORT statement containing the full package name with the category name.

For example, insert the BorderLayout class, the ClassInsight function will automatically insert the import java.awt.borderlayout; statement.

INSERT SHORT CLASS NAME with PACKAGE IMPORT

Insert a short category name, and the IMPORT statement of the Package in this category.

For example, insert the BorderLayout class, the ClassInsight function will automatically insert the import java.awt. *; Statement.

INSERT FULLY Qualified Class Name

Insert a complete class name, but do not add any IMPORT statement.

Paramete4rInsight is similar to MemberInsight.

Program Code Template: We often use some common code snippets for creating programs, we can use shortcuts to insert them into procedures to shorten our programming time.

Methods as below:

Press: CTRL J key, all program code templates will appear in the program code template list, we can choose in the program code template provided by the system, or we will define the program code template.

The new program code template is:

Select Tools | Editor Options to open the Editor Options dialog. Switch to the Templates page, as shown below:

Click the Add button to make the following dialog box, let's complete the Template Name and Description.

We often design a HelloWorld program after installing the system to detect whether the system works normally. We often start from HelloWorld when you begin school Java program, you may wish to design the HelloWorld as a program template. Call directly in the next time you use it. The whole process is shown below:

Synchronous editing (SYNC Edit)

I have once in the FreeJava era, in order to modify an extremely simple program, the first thing is the first thing because I am very stupid, and the second is because there is too much way to have too many the same name in that short program. I need me to modify. The current JBuilder9 editor provides a synchronous editing feature that can greatly simplify the complexity of the program code modification.

Select the code that needs to be edited, a button will appear on the left side of the editor, and we can take three ways to enter the synchronization editing status:. Click Edit | Sync Edit

Use Ctrl Shift J Shortcut

Click button

The following status will appear:

The same text in the area will be marked with a blue box. At this time we can modify the same properties, methods, etc. For example, the following screenshots are modified when I modified SYSTEM to System2.

After editing, you can take the same shortcut to cancel the synchronous editing state.

Errorinsight

This part doesn't have to do too much introduction, just know that he provides us with the error correction guide, and can make full use of this orientation, if your IDE does not open ErrorInsignt, then open in Edit | ErrorInsight. The following is a display of Erroinsight.

Javadocinsight Wizard

Build a complete program document that needs to be completed, in addition to the necessary code, in order to standardize your Project, we need to build a complete explanation file. The Javadocinsight Wizard provides a powerful feature, as long as you type a Javadoc volume pre-symbol @, JBuilder will automatically generate a JavadoC volume label to help us standardize the document description.

With some of this article, we can optimize our development environment and use the characteristics of the integrated development environment.

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

New Post(0)