title: Proper way to configure IntelliJ to use source code for decompiled jar
body: <p>I have been trying to figure this one out for a bit, not coming up with the right approach.  I read through <a href="https://stackoverflow.com/questions/28243315/attach-java-file-as-source-for-jar-in-intellij">this question</a>, which I'd already tried, but it's not working quite right.. using IntelliJ EAP 142.4675.3</p>
  
  <p>What I am trying to do, is to debug a junit test using a jar (extending the Provider class) file I've placed into JAVA_HOME\jre\lib\ext. I want that jar to be debuggable as well.</p>
  
  <p>The problem is, if I attach my source directory as the source for a jar, then, in a stack trace, when I click the named file (containing a method I wish to view), IntelliJ asks me to choose between two of the same file, presumably because it knows about the source (it's in a module in my project) and it's also been told about the source via the jar source path I added.</p>
  
  <p>I tried adding the provider.jar to the project module dependencies tab, which caused intellij no end of grief.  Reverted back to having it in jre\lib\ext, and, in the Platform Settings->SDKs->1.8->Sourcepath tab, I added the module sourcepath.  This lets intellij step into the .java file for the jar, vs the .class file, but, when it does so, I now get a banner at the top of my code windows which says "Alternative source available for the class xxx" and there's a combobox at the RHS with the module name listed twice (in the latest EAP, it actually lists the module and the jar [same name as module, with .jar]).  And, as mentioned earlier, the IDE asks which which (of the very same) file I wish to edit when I click a file in the stack trace.</p>
  
  <p>Clearly, there is something not quite right.. what am I missing?  I find it odd that the ide will not open the source code when stepping into the jar until I attach the code as above, but, when I do, it sees it twice.</p>