Eclipse-tasks Introduction

Source: Internet
Author: User
Tags tag name

Complete procedure 1.1, new definition label

Location: Window--preferences--java--compiler--task tags--new

Description

    1. The default task label has three
      Fixme, TODO, XXX
    2. Default check case sensitive task tag names
      That is, if you change the case, the label is no longer considered

1.2. Configure label display 1.2.1, open Tasks view

Location: Window--show view--other...--general--tasks

1.2.2, configuring filters

Location: View Menu (lower triangle icon)--configure Contents


Action: New--rename


Description: The essence of the definition here is the filter, and its area functions as follows:

    • Left side configuration
      Each one corresponds to a filter, which is checked to enable the Configurator. Satisfies any of these filters, it is displayed in the Task list.
    • Scope
      It is recommended to select "on selected element and its children" for easy focus. The effect of this selection is to filter the tasks in the current element and its child elements.
    • Completed
      One of the filter properties, completed, not completed.
    • Priority
      One of the filter attributes, High, medium, and low priority
    • Description
      One of the filter properties that contains or does not contain text. This is an important property, followed by the text content, can be the name of the task label, or it can be normal character text. The rule of this property is to filter tasks by other attributes, and then filter them based on the task text of the filtered result set, and the task text includes the task label. For example, a task is defined as follows:
      // Sinobest is responsible for querying the scanned material catalog data
      The configuration text either contains "Sinobest" or contains "responsible query", which is OK.

    • Types this type of configuration task, refer to Todos filter, select Java Task and task. The sinobest tag we configured above is a Java Task.

The configuration of the task label and the configuration of the filter work together, adding the task label, which is to justify the label and incorporate it into some type of task (for example, we will sinobest as a Java task). In addition to the filter can be set types, but also provides other filtering properties, filter properties of filters is the relationship between logic and , to satisfy a filter all filter properties, is to satisfy the filter, the filter is a logical or relationship, satisfy any one filter, Can be displayed in the Task list.

1.2.3, configuring Fields

Location: View Menu (lower triangle icon)--configure Columns

The recommended fields to be displayed by configuration.

1.2.4, start-stop filter

Location: View Menu (lower triangle icon)--show

1.2.5, grouping sort

Location: View Menu (lower triangle icon)--group by | Sort by

1.3, add Task 1.3.1, comment add

In the appropriate location of the Java source file, add a line comment with the task tag name as the beginning of the comment content:

// Sinobest is responsible for querying the scanned material catalog data

Remove: Delete Comment

1.3.2, mouse add

Edit Area Right-click--add Task ...

Remove: Right-click--remove Task on the left side of the edit area

It is not recommended to do this, without modifying the source file and not implementing the share.

1.4. Effect Display

Mining

What can we do with tasks?

2.1. Define Development tasks
    1. When encoding, first set the global interface, class, coarse-grained method.
      Methods are generally public, the method body is empty, or only a return statement is included; this is a process of continuous optimization, until the structure is satisfactory, and the overall framework is now built.
    2. Define tasks, which are generally accurate to the method.
    3. Prioritize tasks by category.
      Tasks support only three priority high, Normal, and low, and this simple, general collation may not meet the need for prioritization, but it also avoids focusing too much on the interrelationships of tasks, not in itself.
    4. Tasks are performed according to priority, and the completed task is marked as completed.
      This is a looping process, and until all tasks are marked as completed, the entire task block is completed.
2.2, do Mark

Annotations are used to describe a class, Field, method, or even a line of code so that we find the corresponding code location and can quickly understand the code based on the comments. Here is a premise, we have found the code, the role of annotations is to help us understand the code.

In another scenario, you already know what code you're looking for, but you've forgotten where the code is. You may remember the approximate location, in which package ... Tasks can play this role, in fact each task comment is equivalent to a tag in that position. Since you must write a comment, you can define a set of tags and add comments.

There is a pity that the Tasks list does not provide a query function, so I recommend setting the scope of the filter to "on selected element and its children".

Other task types 3.1, structured Text3.1.1, label settings

Scope: Includes CSS, DTD, HTML, JSP, XML

Location: general--editors--structured Text editors--task Tags

Note: The Filters tab can set the enabled type

3.1.2, tagging tasks
    • Jsp
      <%-- TODO ... -- %>
    • HTML, XML, DTD
      <!-- TODO ... -
    • Css
      / * TODO ... * *

Description: Above, I have only tested HTML and JSP.

3.2, JavaScript3.2.1, label settings

Location: Javascript--validator--task Tags

3.2.2, tagging tasks

// TODO ... OR/ * TODO ... */

Supplemental Note 4.1, update on the task list
    1. Java type tasks to be updated after compilation
    2. JSP, HTML type tasks, updating after saving
    3. Other types of tasks are not tested.
4.2. About Task Markers

After testing, it is also possible to add tags in the comments of multiple lines of comments and document comments in Java, and other content is possible before the tag, but there are spaces between the tags and other text. And so on, so should other types of documents: just add a task marker to the note, and leave a space between the task marker and the text . However, the content before the tag is not displayed in the Task list, and it is recommended that you follow the rules that begin with the task marker .

Eclipse-tasks Introduction

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.