What part of the problem do you have a question about?
You'll need a parser to parse the JavaScript code. There are several parser generators available for
Java, for example
ANTLR and
JavaCC.
If you want to know how to develop an Eclipse plug-in, then Google for "Eclipse plugin development", or look on the
Eclipse website. There are also a number of books available about developing plug-ins for Eclipse.