4

In some cases I need to mark (several) lines of code in Eclipse. For example when reviewing, or when testing. Is there a feature or plug-in in Eclipse which can help me to that?

For now I'm just putting #REVIEWED or #TOBEREVIEWED on lines or around blocks. But that is a lot of work.

Any ideas?

  • EDIT: I'm aware of the Bookmark feature, but that seems to cover only 1 line.
  • EDIT2: I'm also aware of Task tags like TODO and FIXME, thanks E-Riz
Paul Verest
  • 60,022
  • 51
  • 208
  • 332
hsmit
  • 3,906
  • 7
  • 34
  • 46
  • There is bookmarking, which might help. [link](http://stackoverflow.com/questions/9925193/highlighting-lines-in-eclipse-like-with-a-textmarker) – Bitcoin M Oct 11 '14 at 20:48

3 Answers3

0

You can use custom task tags in comments (the default is //TODO), which are automatically added to the Markers or Problems views in Eclipse. for example, you could create a custom task tag like //TO-REVIEW.

It's not exactly marking blocks of code, since it's essentially a marker for one line, but it is a convenient way to track and locate them. See the Eclipse Help page for more details.

E-Riz
  • 31,431
  • 9
  • 97
  • 134
  • Thanks E-Riz, but I'm really looking for multi-line highlighting, without editing source-code itself. – hsmit May 08 '14 at 07:33
  • There's no such built-in capability. Have you tried searching the Eclipse Marketplace for something third-party? – E-Riz May 08 '14 at 13:31
0

Why not use some code review features of external server like GitHub?

I mean it could be nice to comment and discuss code blocks just within Eclipse,
but it is much overhead to develop and maintain comparing to web-based solution (that would be universal).

Then possibly such server has similar feature support as Eclipse plugin.

For example

  • if you use git, you can check GitHub and Eclipse EGit and Eclipse Mylyn tasks.
  • For perforce there is job concept (similar to issues).

So it leads to understanding that what you actually need is issue-tracker integrated into Eclipse that can conveniently point to code blocks. Again depends on your SCM.

Paul Verest
  • 60,022
  • 51
  • 208
  • 332
0

You can us Eclipse plugin like Jupiter for code review. It will help to identify issues (if any) in code blocks with review comments without touching actual code. The code review comments get stored in jupiter files in your respective project. Developer can see those issues, fix and comment on them.

Bipul Sinha
  • 266
  • 2
  • 9