Mark Occurrences

The Mark Occurrences feature enables you to see where an element is referenced by simply clicking on the element in the editor.

When the Mark Occurrences feature is enabled, all occurrences of the element within the active file will be highlighted,

and indicators will be displayed in the annotations bar (to the right of the editor).

In addition, hovering over the element will cause a tooltip to be displayed with the location of all references of the element,

including occurrences of the element in other files.

Occurrences can be of 2 types -

“Write Occurrence” (for occurrences that are in a write mode) or

“Read Occurrence” (for occurrences that are in a read mode).

These will be highlighted in different colors according to the setting configured for PHP elements 'read' and 'write' occurrences

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

Here you 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 will be highlighted can be configured in the

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

By default, the following types of elements are marked:

  • Method Exit - Exit points (throws / return / end of flow) of a method will be marked

  • Break / Continue - Scope (for, foreach, while, do-while or switch structure) of a break / continue statement will be marked

  • 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 be done 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 an 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 is 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 you can do so in the

Preferences > General > Editors > Text Editors > Annotations

– look for“Occurrence annotation” and “Write occurrences”.

Eclipse Mark Occurrences的更多相关文章

  1. eclipse使用tips-Toggle Mark Occurrences 颜色更改

    Toggle Mark Occurrences这个功能非常好用,能把选中的方法/变量在本类中全部出现的地方高亮显示,是一个非常实用的功能.但是默认颜色是灰色,非常毁眼.可以通过下面的设置更改为自己喜欢 ...

  2. Eclipse 相同变量背景高亮显示设置(Occurrences)

    为了你们查看设置的简便,本次书写重点用图片说明.

  3. eclipse常用快捷键

    1. ctrl+shift+r:打开资源 这可能是所有快捷键组合中最省时间的了.这组快捷键可以让你打开你的工作区中任何一个文件,而你只需要按下文件名或mask名中的前几个字母,比如applic*.xm ...

  4. Eclipse 双击变量,其他相同变量有底色

    转载:http://blog.csdn.net/majian_1987/article/details/46691697 方便下次查找. 在Eclipse中,鼠标选中或者光标移动到Java类的变量名时 ...

  5. [No000077]打造自己的Eclipse

    下载官网的Eclipse IDE for Java EE Developers 在根目录下的eclipse.ini文件中添加"-Dfile.encoding=UTF-8", 作用: ...

  6. Eclipse设置选中高亮显示

    高亮显示选中的变量对于程序员编程很有帮助,正常情况下Eclipse选中变量时都会高亮显示,可能软件冲突导致高亮显示失效,通过如下方法可以进行恢复. 单击IDE顶部Window菜单下的Prefences ...

  7. 【转】Eclipse快捷键 10个最有用的快捷键

    转载地址:http://www.open-open.com/bbs/view/1320934157953 Eclipse中10个最有用的快捷键组合  一个Eclipse骨灰级开发者总结了他认为最有用但 ...

  8. 转:Eclipse快捷键 10个最有用的快捷键

    Eclipse快捷键 10个最有用的快捷键 Eclipse中10个最有用的快捷键组合  一个Eclipse骨灰级开发者总结了他认为最有用但又不太为人所知的快捷键组合.通过这些组合可以更加容易的浏览源代 ...

  9. Eclipse中10个最有用的快捷键组合

    Eclipse中10个最有用的快捷键组合 (转) 一个Eclipse骨灰级开发者总结了他认为最有用但又不太为人所知的快捷键组合.通过这些组合可以更加容易的浏览源代码,使得整体的开发效率和质量得到提升. ...

随机推荐

  1. alert换行警示

    alert("再次向您问好!在这里,我们向您演示" + '\n' + "如何向警告框添加折行.")

  2. 第6月第6天 opengles 三角形

    1. http://blog.csdn.net/u010963658/article/details/52691578 2.多张图 https://www.oschina.net/question/2 ...

  3. mysql percona安装

    注:此方式目前安装存在问题(弃用此方式) 1.在官方网站下载percona  XtraBackup https://www.percona.com/downloads/XtraBackup/LATES ...

  4. Tomcat不同版本所对应的Servlet/JSP规范

    上午在别人机器上做演示,写好 Servlet居然访问不了.后来回想叻下,觉得应该是Tomcat版本不一致的问题,我用的是Tomcat 7.0建的Project,他们大多数都是用的6.0的版本.回来又仔 ...

  5. liunx jdk安装

    打开https://www.oracle.com/technetwork/java/javase/downloads/index.html 选择Development版本(server为服务器版本), ...

  6. 2018-2019-2 网络对抗技术 20165301 Exp3 免杀原理与实践

    2018-2019-2 网络对抗技术 20165301 Exp3 免杀原理与实践 实验内容 任务一:正确使用msf编码器,msfvenom生成如jar之类的其他文件,veil-evasion,自己利用 ...

  7. JS模块化编程(二):require.js基本用法

    require.config() 接受一个配置对象 常用属性: paths: shim: 配置不兼容的模块 baseUrl: 引用模块的文件基目录

  8. LOJ 10127 -「一本通 4.3 练习 1」最大数

    题面 题目描述 给定一个正整数数列 $a_1, a_2, a_3, \dots , a_n$,每一个数都在 0~p-1之间.可以对这列数进行两种操作: 添加操作:向序列后添加一个数,序列长度变成 n+ ...

  9. js中的prototype原型解析

    在典型的面向对象的语言中,如java,都存在类(class)的概念,类就是对象的模板,对象就是类的实例.但是在Javascript语言体系中,是不存在类(Class)的概念的,javascript中不 ...

  10. selenium自动测试

    import requestsimport sysimport iofrom selenium import webdriverfrom selenium.webdriver.common.actio ...