RSS
 

Eclipse Tip: Mark Occurrences

03 May


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.

Related posts:

  1. Eclipse vs Netbeans: Mark Occurrences
  2. Eclipse tip: Semantic highlighting
  3. Eclipse Tip: Local rename
  4. Eclipse Tip: Auto-generate compilation units by pasting snippets
  5. Eclipse Tip: Show source for selected items only

 
5 Comments

Posted in Eclipse, Java

 
  1. Jonathan Aquino

    May 4, 2005 at 2:52 AM

    One of my favourite Eclipse features. And they even spelled "occurrences" correctly!

     
  2. Leandro Paradelo

    May 10, 2005 at 11:03 PM

    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.

     
  3. Vasanth

    May 11, 2005 at 4:18 AM

    Leandro Paradelo,

    Thanks for the additional information. It is a neat feature.

     
  4. Andrew

    June 30, 2005 at 2:24 AM

    This has a key binding, ALT + SHIFT + O

    Very useful to toggle this quickly!

     
  5. Vasanth

    June 30, 2005 at 5:22 AM

    Thanks for the tip Andrew.