Search code examples
eclipseeclipse-neon

Add titled marker in eclipse


To find specific program parts easier I would like to add named markers to my code (like bookmarks). Problem with bookmarks is, that they stay at the same line number and not at the same codeline resulting in missplaced marker after almost any change in the source code.
So markers that stay at a specific code line would be breakpoints. As they are having another usage in debugging and cannot be titled, they are likely not an option.

My question is: Is there a way to set markers and "name" them and then later go to them from a list?
A plugin for that would be ok as well, but I could not find anything (maybe because it is to obvious)...


Solution

  • Bookmarks will move with the code lines, as noted in the comments above.

    An alternative is to use Task Tags, custom versions of the TODO comment markers. In the Preferences navigate to Java > Compiler > Task Tags and define a custom one as shown here:

    enter image description here

    Then you can insert comments in your code that will produce Task markers, which are visible in the Tasks view.

    enter image description here