Attach sources to jars the easy way

It should really be easier to attach sources to a library.
Traditionally usability is valued a lot by both IDEA users and developers.
However I suspect that this single issue has been around for so long, that all of us mostly have gotten used to it, but it hinders usability so much and especially for new users it's just a bad experience with the product:

Usually you notice you need to add source when you stare at a decompiled class stub.

Now it should be as easy as this:
- IDEA display a prominent note "No sources attach to library" plus a button "Attach sources" (maybe at the top of the file like the vcs outdated warning)
- Click on "Attach sources"
- A file chooser opens, I select the source directory/zip
- IDEA replaces the stub with the real source

Currently it goes like this
- "Huh? Where is the source code gone?
...
Oh right, the class is in a jar, so probably I need to tell IDEA where the sources are. How do I do that?
...
Probably somewhere in the settings."
- Open the settings dialog
- Open project Settings
- Hunt down the library:

  • look in global libraries

  • look in project libraries

  • look in the module's dependencies

- click on edit
- click on attach sources
- select the source directory/zip
- close the settings
- "Huh? I still see no sources.
...
Hm, maybe click "Refresh". Hm, no luck.
...
Hm, maybe close the editor and open it again.
...
Close the editor.
...
Gosh, what was the class name again?
WHAT WAS I TRYING TO DO ANYWAY?
Oh yeah, while debugging I stepped into the class. So let's see, how can I make IDEA open the class for the current stackframe?
...
Ah, I see there's small button in the debugger toolbar.
"
- Tada! Task accomplished.

Please vote in Jira: http://www.jetbrains.net/jira/browse/IDEADEV-21980

Please sign in to leave a comment.