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 http://blog.jetbrains.com/webide/2012/03/attaching-the-sources-of-node-js-core-modules/, 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?