Eclipse Tip: Mark Occurrences


Eclipse has a feature to visually see all occurrences of a method, variable or method exit points. Use the mark occurrences icon shown on the left to toggle this feature. Once enabled select a method or variable. Eclipse will highlight all occurrences of this in the current file. Select a return type to highlight all the exit points of a method.


5 Comments

  • Leandro Paradelo |

    This feature has even more interesting options. Besides selecting the return type and marking all exit points of the method it INCLUDES marks on all method calls that throws exceptions not caught!
    And last but not least, if you select an exception (i.e. in the catch clause) it marks all function that can throw such an exception, including exceptions in the same path of the class hierarchy!
    Amazing!
    Leandro Paradelo.

  • Andrew |

    This has a key binding, ALT + SHIFT + O

    Very useful to toggle this quickly!