Use of Todo in eclipse and netbeans

Source: Internet
Author: User
Tags add numbers netbeans

How to Use todo when I learned Java these two days. At first, I thought that netbeans's "waiting for task" was quite good. I can use todo to identify what to do later, for example: to add instructions for the key API calls of this class, an interface is implemented for a method, but the method is not completed. But later, netbeans's "waiting for task" found that the filter can also set "Priority" and "file name", which is a good configuration.

My first thought was that Todo certainly had other descriptors to define the priority. So I searched sun and csdn for a large number, and the results were futile. In the todo list, the levels of all tasks are "medium ". On the contrary, da11393 on csdn prompts me to go through the help documents of eclipse and netbeans (I thought todo was a standard annotation at first, and eclipse and netbeans didn't carry the javaapi annotation, so I didn't check it ), finally, we found the use of todo. The following is a summary:

Eclipse 3.1.1 Chinese version has three priorities by default.

// Todo normalization 1 -- no icon is displayed
// Todo normalization 2 -- no icon is displayed
// XXX low -- the icon is a blue downward arrow
// Fixme height -- the icon is a red exclamation point

You can add custom task labels to eclipse. Use [preference]-[Java]-[compiler]-[task tag] to set the settings. The Chinese version of netbeans 5.5 has five priorities.

// @ Todo -- Priority: Medium
// Todo -- Priority: Medium
// Fixme -- Priority: Medium
// XXX -- Priority: Medium
// <-- Priority: High

You can also customize tags in netbeans 5.5. Click [Options]-[edit]-[set the task to be executed. However, you can set five priorities on netbeans: High, Medium, medium, medium, and low. However, the problem is that the top-level todo is still displayed on the netbeans task list. I don't know if it is a bug (maybe my installation is a bit problematic ). In this case, it is better to use the da11393 method!

============

Da11393 adds some ID after todo, for example:

// The todo method has not been completed yet!
// Todo does not add API instructions.

As for the priority, the da11393 method is to add numbers, such:

In this way, the Tasks window will see the following arrangement:
Todo 1 does not add API instructions.
Todo 2 is not finished yet!

However, da11393 must be unified in the project. Otherwise, the Code may be changed without instructions. In this case, we recommend that you:

// Todo high
// Todo normal
// Todo low
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.