Eclipse Mark Occurrences

Source: Internet
Author: User
Tags html tags

Mark occurrences

The Mark occurrences feature enables where an element was referenced by simply clicking on the element in the ED Itor.

When the Mark occurrences feature was enabled, all occurrences of the element within the active file would be highlighted,

And indicators'll is displayed in the annotations bar (to the right of the editor).

In addition, hovering over the element would cause a ToolTip to being displayed with the location of all references of the ele ment,

Including occurrences of the element in other files.

Occurrences can be of 2 types-

"Write occurrence" (for occurrences that is in a write mode) or

"Read occurrence" (for occurrences that is in a read mode).

These'll be highlighted in different colors according to the setting configured for PHP elements ' read ' and ' write ' OCCU Rrences

In the Annotations Preferences page (Window | Preferences | General | Editors | Text Editors | Preferences).

Here's can also configure the indicators used in the vertical ruler/marker bar (to the left of the editor)

and the Annnotations bar (to the right of the editor).

The types of elements whose occurrences'll be highlighted can is configured in the

Mark Occurrences Preferences page (Window | Preferences | PHP | Editor | Mark occurrences).

By default, the following types of elements is marked:

    • Method Exit-exit points (Throws/return/end of flow) of a method would be marked

    • Break/continue-scope (for, foreach, while, do-while or switch structure) of a break/continue statement would be Marke D

    • Local variables

    • Global variables

    • Parameters

    • Functions

    • Methods

    • Fields

    • Class Constants

    • Constants (defined)

    • Class/interface

    • HTML Tags

You'll want to change the "occurrences" and "Write occurrences" colors.

This can do in the Annotations menu, which is located-

As Colin said-in the Preferences menu under the path

General > Editors > Text Editors > Annotations

If you have a occurrence marked in the overview ruler (the column to the right of the scrollbar),

You can open the Annotations menu directly by right-clicking on the occurrence and selecting Preferences from the context Menu.

The color of "occurrences" is used for instances where the variable are being read, but not modified,

In the code (e.g. k in if(k > 1) ).

The color of "write occurrences" is used where the variable gets modified/written to

In the code (e.g. k in k = k + 1 ).

If you want to change the default highlight colours the

Preferences > General > Editors > Text Editors > Annotations

–look for"Occurrence annotation" and "Write occurrences".

Eclipse Mark Occurrences

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.