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. 跳过复制错误——slave_skip_errors、slave_exec_mode

    这一篇写写复制错误处理相关的另两个参数slave_skip_errors.slave_exec_mode,基本环境参考<复制错误处理——sql_slave_skip_counter> 一. ...

  2. networkManger介绍

    http://www.linuxidc.com/Linux/2013-08/88809.htm

  3. 基于theano的多层感知机的实现

    1.引言 一个多层感知机(Multi-Layer Perceptron,MLP)可以看做是,在逻辑回归分类器的中间加了非线性转换的隐层,这种转换把数据映射到一个线性可分的空间.一个单隐层的MLP就可以 ...

  4. http跨域时的options请求

    1.背景 在前后端分离的项目中经常会遇到跨域请求的问题,如果没有进行跨域配置,会浏览器请求失败.我一般采用两种解决方案: 1.采用nginx进行转发,是前后端服务处于同一个域下面,从根本上避免跨域问题 ...

  5. Google-Guice入门介绍

    原地址:http://blog.csdn.net/derekjiang/article/details/7231490 一. 概述 Guice是一个轻量级的DI框架.本文对Guice的基本用法作以介绍 ...

  6. Android 拍摄(横\竖屏)视频的懒人之路

    想一想,我们聊过AudioReord,AudioTrack,MediaPlayer,那多媒体四大金刚,就剩下了MediaRecorder了(SoundPool?我这里信号不好···).其实MediaR ...

  7. Promise初探

    在JavaScript的世界中,所有代码都是单线程执行的. 由于这个“缺陷”,导致JavaScript的所有网络操作,浏览器事件,都必须是异步执行.异步执行可以用回调函数实现: function ru ...

  8. redux,react-redux、redux-thunk、redux-logger、redux-promise实例

    使用的是create-react-app脚手架 package.json增加反向代理 "proxy": { "/v4": { "target" ...

  9. [转] offsetParent 到底是哪一个?

    正文 不同情况 没有已定位的父节点,且自身position:relative的DIV元素的offsetParent为BODY 没有已定位的父节点,且自身position: absolute的DIV元素 ...

  10. Codeforces 932E Team Work 数学

    Team Work 发现网上没有我这种写法.. i ^ k我们可以理解为对于每个子集我们k个for套在一起数有多少个. 那么我们问题就变成了 任意可重复位置的k个物品属于多少个子集. 然后我们枚举k个 ...