Use JBuilder to develop Java programs efficiently

Source: Internet
Author: User
"I only use and use NotePad to develop Java programs," said Niu Ren ". However, we believe that if you can use NotePad to create a helloworld program, you do not have to use NotePad to create your application in future development. This will only cause you a lot of trouble. Using advanced editing tools will greatly improve the efficiency of program writing. JBuilder provides codeinsight and "program code template" to improve Java program writing efficiency.

  Functions provided by codeinsight:

Memberinsight: (CTRL + H) provides currently available Member methods. When you press a sentence after an object name, The JBuilder codeinsight function will display a pop-up window, contains the attributes and methods defined by this object, which we call memberinsight. In the following example, after system. Out. Is output, the memberinsight function displays all methods.

Classinsight (CTRL + ALT + H provides all types that can be accessed under the current category path). You can type the name of the class to be used in the search for field, all matched search results are displayed in the matching list.

The dialog box provides three options:

Insert short class name with explicit Import

Insert a brief category name and an import statement containing the complete package name and category name.

For example, if the borderlayout class is inserted, the classinsight function will automatically Insert the import java. AWT. borderlayout; statement.

Insert short class name with package Import

Insert a brief category name and the Import Statement of the package to which the category belongs.

For example, if the borderlayout class is inserted, the classinsight function will automatically Insert the import java. AWT. *; statement.

Insert fully qualified class name

Insert the complete category name without adding any import statement.

Paramete4rinsight is similar to memberinsight.
Program code template:

When creating a program, we often use some common code snippets. We can use shortcuts to insert them into the program to shorten the programming time.

The method is as follows:

Press Ctrl + J. All the program code templates will appear in the program code template list. You can select them from the program code templates provided by the system, you can also define the program code template by yourself.

The method for adding a program code template is as follows:

Select Tools | editor options to open the editor Options dialog box. Switch to the templates tab, as shown below:

Click the Add button. The following dialog box is displayed. let's complete the Template Name and description.

We often design a helloworld program after installing the system to check whether the system works normally. We often start with helloworld when learning Java program design, design helloworld as a program template. You can call it directly next time. The entire process is shown in:


 Sync Edit)

In the freejava era, I once paid a great deal to modify an extremely simple program, first of all because I was stupid at that time, the second reason is that there are too many methods with the same name in that not long program that need to be modified. The jbuilder9 editor now provides a synchronous editing function, which greatly simplifies the complexity of code modification.

Select all the code to be edited, and a button will appear on the left side of the editor. In this case, you can change to the synchronous editing status in three ways:

. Click Edit | Sync Edit

. Press Ctrl + Shift + J.

. Click

The following status will appear:

The same text in the area will be marked with a blue box, so that we can modify the same attributes, methods, and other content at the same time. For example, when I change system to system2, all the same text is modified.

After editing, you can cancel synchronization and editing with the same shortcut key.

  Errorinsight

This part does not need to be described too much. You only need to know that it provides us with the error correction wizard and can make full use of this wizard. If your ide does not enable errorinsignt by default, you can open it in edit | errorinsight. The following is an example of erroinsight.

  Javadocinsight wizard

To standardize your project, we need to build a complete description file. The javadocinsight wizard provides powerful functions. After you type the javadoc pre-marking @ in the editor, JBuilder will automatically generate the javadoc volume tag to help us complete the standardization documentation.

With some of the content described in this article, we can optimize our development environment and use the features provided by the integrated development environment to efficiently write programs.

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.