IDEA's open omgwtfbbqAPI

I spent the weekend working on the TestNG IDEA plugin, and I was struck, time and time again, by how abysmal the so called IDEA ‘open’ API is.

Setting aside what a cruel joke it is referring to the api as anything vaguely ‘open’, it’s astounding, nay, horrifying how difficult it is to work with.

For one thing, there is next to no documentation about it. The fact that the way to write a plugin is to find another one and copy it should be setting off many alarm bells at IDEA HQ. I’m fairly aware of the goings on in idealand, and have yet to hear of a definitive plugin quickstart that’s well known and publicised.

On the plus side, you do get the source (or at least stubs) for big chunks of the openapi package. Needless to say, this is far from comprehensive, and in most cases the sources do not contain any sort of documentation, or are simply existent. There are a ton of classes that are in the openapi package that stubbornly refuse to go anywhere near the source jar.

Figuring out how to accomplish any given thing is an worthy contender for the ‘experience most likely to cause fastest genitalia shrinkage from full arousal’ award. For all the grand ideas that one might have, invariably the implementation is either well hidden away as an IDEA internal, exposed very poorly, or plain old badly written with no thought for reuse.

Classes are often very oddly placed. For example, we have BrowseModuleValueActionListener. This is actually a fairly useful class that allows you to tie a dialog box to the browse button of a textfield. What package would such a class be in? I doubt even the most creative amongst you would choose com.intellij.execution.junit2.configuration.

Even funnier of course are the typos. The refactoring support means you can consistently have a badly named class without ever noticing. Witness the nonsensical SeachScope class.

Much of my time was spent wiping off the hot tears of rage and dismay time and time again as I struggled to find out how to get something to happen, or more often, flailed about pathetically trying to figure out why something isn’t happening. Ultimately the only surefire method seemed to be helpless flailing and random clicking until eventually Something Happens. The plugin devkit makes this far less painful than it used to be, but it still doesn’t strike me as the most efficient mode of development; click&pray. I saw enough red circles of doom to last me a few months. I cursed Russians, I wished ill on the lovely city of Prague. Most of all I wished that those guys hadn’t taken vows of stfu about the damn api.

If JetBrains is serious about attacking the eclipse plugin market, then the openapi needs a lot more love. It is currently a neglected abused child only fit for pointing and laughing at, and the occasional bout of sexually deviant behaviour instead of the tender lovemaking that one can imagine exists in this cruel cruel world of ours. It’s a terrible shame given the power than is available and the huge scope for IDE enhancements that don’t belong in the core.

18 Responses to “IDEA's open omgwtfbbqAPI”

  1. Rob Misek Says:

    first post?

  2. simonsays Says:

    “Even funnier of course are the typos.”

    Like this one: “Description: TestNG Integrtion” ?

    http://plugins.intellij.net/plugins/view/?id=TestNG-J

  3. Anonymous Bastard Says:

    You should try Eclipse.

    3 + 56 = 59 (I think…?)

  4. Rob Harwood Says:

    I think Hani secretly has a warm-and-fuzzy mushy soft spot for IDEA. You call that a bile? I expected more unmentionables and bodily excretions! Somebody should do a bile about the BileBlog. Hani needs to get his shite together!

  5. white fencepost looking for love Says:

    Yes. Let’s call out a “national bile day”

  6. Axel Says:

    6th (personal record)

  7. Corby Page Says:

    I think IDEA should rework the Open API into a Domain Specific Language. That should work out most of the kinks.

  8. flailing pathetically Says:

    “flailed about pathetically”

  9. Mark Derricutt Says:

    “Description: TestNG Integrtion” - You can blame me for that typo, not Hani. At least its not a typo in the classname of the infamous OpenAPI. Sure its a hop, skip, SHIFT-F6, and comit away from being fixed, but think of all the broken plugins!

  10. Anonymous Says:

    Cry more!

  11. Dan Hestand Says:

    Personally, I like to be able to scope my seach’s but then I used to like to write Fortran code. I have tried to write IDEA plugins, too, and gave up in frustration because of the piss poor doco and a lack of time to dig through code that is unseachable. I still use IDEA but that’s only because it’s less clumsy than Eclipse or NetBeans and slightly more capable than bare Emacs or vi.

  12. Stock Says:

    I LOVE IDEA and can’t fathom using anything as lame as Eclipse but I will never write a plugin for it the way it is right now. Mr. Harwood, I think you should use your position inside the JetBrains organization to get this shit addressed NOW. It’s truely sad that such an excellent IDE has to plagued with a virtually undocumented plugin library. You guys would probably have 3 times as many plugins available if people could figure out how to do it. Really there’s no excuse for this kind of shit. Take time after completion of version 5 and FIX THE FUCKING THING before you even have feature discussions of what’s going in version 6. Thx.

  13. Nerdcore Geeksta Rapper Says:

    Programming with IDEA to my dismay… and all I can do is click and pray… Looking to Hani to solve my troubles… but all I get is a bunch of Eclipse wankers blowing me bubbles.

  14. Serge Bureau Says:

    I would use IDEA if Swing wasn’t a total piece of shit. No wonder Java never made it to the desktop

  15. Maxim Shafirov Says:

    1. TestSeachScope (did you mean that) is no way from OpenAPI as well as whole execution.junit2 package
    2. Every class from OpenAPI (except for 2 (sic!) classes) has its source code distributed in dev package.
    3. No wonder those lack documentation and reuse ability as they’ve never been designed to be reused outside IDEA itself.

    No way I’m going to say real API is genius and carefully documented but ‘cmon Hani, you’re playing unfair game.

  16. chad pratt Says:

    I have written themmany many times about this. Eclipse is lame,imho,and IDEA could be must-have software for Java developers everywhere if they would unleash the creativity and inventiveness bottledup inside developers.

    We need a sustained campaign to get INtellij’s attention…. I hope everyone writes them about this. I sent this column to them….

  17. The Street Wraith Says:

    All your base are belong to JDeveloper

  18. yer boss Says:

    quit tinkerin with your IDEs and start writing programs please.

Leave a Reply