0

I am working on an Eclipse plug in. One feature I'd like to add is context information based on imports, so that when you hover above a macro call, you can see some of its definition. For this, when I see an import statement, I want to find that file and scan all the macros defined within.

If I was working with Java files, I could do so as described in this question, with findType.

What I'd like to is reuse the code and search index built when you (the Eclipse user) opens the "Open Resource" dialog. I looked at what I think is the code for this dialog, but couldn't find a public API that I can use.

If there's nothing better, I can scan all the files in the workspace, as described in this question, but I feel like there's probably a better way.

Community
  • 1
  • 1
Eyal
  • 3,412
  • 1
  • 44
  • 60
  • First tell us which programming language you are developing the plugin for. – greg-449 Dec 27 '14 at 21:35
  • For Pig (the plugin's page is linked in the question). Does it matteR? Shouldn't all the languages without their own Project type be the same? – Eyal Dec 28 '14 at 07:27
  • Well an 'import' statement in Java would require looking at the Java AST (Abstract Syntax Tree) to find the correct file to open, an 'import' in another language would require something different. – greg-449 Dec 28 '14 at 09:15
  • So there's no "standard" method for another language? What if I was looking for an xml file, or something language-agnostic? – Eyal Jan 01 '15 at 18:55

0 Answers0