Cannot highlight all occurrences of a selected word in Eclipse

后端 未结 12 1344
执念已碎
执念已碎 2020-12-13 05:43

I tried using the Toggle mark occurrences (Alt + Shift + O) button and also in Preferences -> General -> Editors -> Text Editor -> Annotations

相关标签:
12条回答
  • 2020-12-13 05:52

    Go

    Java> Editor > Mark Occurrences

    Uncheck "Keep Marks when the section changes" then click Ok

    Restart Eclipse.

    This work for me.

    0 讨论(0)
  • 2020-12-13 06:00

    You can try to activate Toggle Mark Occurrences with icon on Toolbar: Eclipse Toolbar

    0 讨论(0)
  • 2020-12-13 06:00

    The standard "Mark Occurrences" functionality included in Eclipse that everyone recommends only highlights identifiers in editors of whatever language. For example, it won't highlight int in C editors, and it won't help at all in the Console pane.

    So if you want to highlight ALL occurrences on ANY word in ANY Eclipse pane (kinda like Notepad++ does), try the Glance plug-in for Eclipse.

    As of November 2017 Glance works for Eclipse Neon and Oxygen. There was a period of time in which Neon was unsupported, and a fork appeared, but it seems unnecessary now (and abandoned).

    0 讨论(0)
  • 2020-12-13 06:01

    Check out options that are checked in Preferences -> Java -> Editor -> Mark occurrences. Then restart Eclipse.

    0 讨论(0)
  • 2020-12-13 06:02

    There are two ways to highlight all occurences. First is using Eclipse options, which is not very reliable, because in many versions of Eclipse it is not supported. Second is using a plugin called Glance which is available in Eclipse marketplace. This is supereasy and effective.

    First Method

    In the toolbar, there is button for Toggling Mark Occurrences. So, once you selected the text/word whose occurences you wish to highlight, then click this toggle button.

    Let's say this step doesn't work for you. Then, Follow this step: Goto: Window ==> Preferences ==> General ==> Editors ==> Text Editors ==> Annotations ==> On right Annotations types box: Occurrences ==> Select all check boxes.

    You can also go to Window ==> Preferences ==> Java ==> Editor==> Mark Occurrences ==> Check all the checkboxes.

    Restart Eclipse and check if highlighting works. If still doesn't work, then Go to Second Method

    Second Method From Eclipse marketplace, install Glance. Once installed, restart Eclipse. Now select any word in your eclipse editor

    1. Move focus to component where you want to search
    2. Open Glance using Ctrl + Cmd + F shortcut on Mac or Ctrl + Alt + F on other platforms
    3. Enter text you want to search
    4. Use Enter or **Shift + Enter** to find next/previous match
    5. Close search box using Esc You can also customize Glance from Window ==> Preferences ==> Glance
    0 讨论(0)
  • 2020-12-13 06:07

    In General > Editors > Text Editors > Annotations

    enter image description here

    0 讨论(0)
提交回复
热议问题