When writing Eclipse JDT plugins, is there a way to track appearace of certain strings in code?
-
06-07-2019 - |
Question
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.
Solution
It shouldn't be complicated. Register yourself as either resource listener or as a builder and use AST to parse the modified text files.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow