IntelliJ IDEA plugin development: Get classes VirtualFile (or paths) for a specific source VirtualFi

Posted by Ran Biron on Stack Overflow See other posts from Stack Overflow or by Ran Biron
Published on 2010-06-13T07:37:47Z Indexed on 2010/06/13 7:42 UTC
Read the original article Hit count: 409

Filed under:
|

Hi all.

This is a cross-post from http://www.jetbrains.net/devnet/message/5264436#5264436 - I failed to get any answer on that forum for two weeks now, so I'm re-asking it here (please don't flame).

This question refers to plugin development for the IntelliJ IDEA IDE, specifically targeting java development:

Is there any API to get the list of .class files for given source file?

I'm trying to write a plugin that creates a binary patch jar based on a changelist. I've managed to get the changelist and, from it, a list of source files (VirtualFile). Now I'm trying to get the compiled class files for these source files (I don't mind preforming a "make" or relying on the previous compile output).

I've played a bit with ProjectFileIndex but could only find the classes root. I'd hate to do a "dumb" path-based search because inner classes (and inner anonymous classes) would make it difficult to get correctly.

Is there such an API? Or am I doomed to parse the paths?

Thanks, Ran.

© Stack Overflow or respective owner

Related posts about plugins

Related posts about intellij-idea