views:

161

answers:

1

I'm writing an Eclipse plugin for the JDT.

I need a functionality that tracks certain strings or regular expressions and possibly creates markers.

I know that Eclipse already does that for //TODO comments, for example (creating task markers for them) but I'm not sure if I can use the same mechanism. I can write my own but worried it would be too inefficient and not sensitive enough to code chnanges.

+2  A: 

It shouldn't be complicated. Register yourself as either resource listener or as a builder and use AST to parse the modified text files.

G B
Is there some way to efficiently search for regexps in there?
Uri