The source code (IDEA 11 CE sourcecode pulled from github and updated to the idea/111.69 tag) for the plugin devkit has a very strange structure.
For example, the PluginRunConfigurationEditor class:
The package is "org.jetbrains.idea.devkit.run" but the actual file sits at "/intellij-community/plugins/devkit/src/run/PluginRunConfigurationEditor.java" - that is, the physical module structure doesn't contain the "org/jetbrains/idea/devkit/run" structure that most people expect would be there (and indeed IDEA itself gets confused by this).
This is also inconsistent with most of the other modules of the IDEA source code (there may be other modules with this non-standard structure, but I couldn't be bothered finding them).
In fact, IDEA itself fails to pick up this dir structure when you add the source code for the your IDEA SDK, it just quietly skips the devkit module and doesn't add it - although it adds most of the other module sources automatically. You can't add the source manually either, if you try to add .../devkit/src IDEA just ignores you without even a warning that it couldn't understand the directory structure (which is nasty, because there's already so many directories in the list that you have to hunt around for ages just to be sure that that it didn't do what it said it did).
In the end, I finally got this working by manually creating a directory structure that mirrors the package structure and copying the source files across and then hooking up the new structure as the source.
How can I hook up the devkit source to my IDEA SDK without hacking the dir structure like this?