Implementing Download Sources for a new Language

For my Elixir plugin, I want to automatically prompt to download the standard library sources tarball from Github, so Go To Definition can work on standard library Modules.  I suppose I want it to work like this blog post on Node.js support, but since that's in the closed source I don't have anything to look at.

From intellij-community, I think I need to implement  com.intellij.codeInsight.AttachsourcesProvider, but I'm not sure how to connect the downloaded tarball with a given SDK and have projects using that SDK use that tarball.  Do I have to unpack the tarball?  How do I attach the Download Sources prompt to an unresolved Module the way the Node.js does it for unresolved requires?

1 comment
Comment actions Permalink

AttachSourcesProvider works only for java *.class files, so it won't help in your case. You can look at AttachSourcesNotificationProvider sources to see how it's implemented and write something similar for your case.


Please sign in to leave a comment.