Difficulty migrating plugin to IDEA 13

Hello, I'm trying to migrate my existing plugin to IDEA 13, and currently have two issues:

1) RunConfiguration has an incompatible change to the interface -

  SettingsEditor<ConfigurationPerRunnerSettings> getRunnerSettingsEditor(ProgramRunner runner);

When I import my existing code into IDEA 13, the Make process complains that my SettingsEditor<JDOMExternalizable> getRunnerSettingsEditor(...) is incompatible.  If I remove it, the RunConfiguration will run fine in IDEA 13, but not in IDEA 12 - it complains that it's an abstract class.  How do I properly implement RunConfiguration so it runs in both IDEA 13 and earlier?

(side note: When I build my plugin with IDEA 12, the RunConfiguration runs fine in IDEA 13).

2) In IDEA 13, I am unable to set Icon's on JRadioButtons for any plugin forms.  It does work for a simple Swing App, but I can not get it to work within a plugin form at all.  In the designer, it resizes the radiobutton to the size of my icon image, but visually it stays as the default radio button.  If I click Preview, the radio button images appear as expected, but that's the only place.

UPDATE: I just noticed that the images on JRadioButtons issue seems to only be affecting Windows and Linux, it's working as expected on Mac.  Will file an issue on this one.

Eric

7 comments
Comment actions Permalink

The same happens for the golang plugin. It's very hard to support IDEA 12 and 13 at the same time due to some incompatible changes like this.
Anyone from JetBrains that could shed some light please?


Thank you.

0
Comment actions Permalink

Yeah, in general it's very difficult, although to be fair it's getting easier, there's far less API breakage between releases than there used to be.

I deal with this by explicitly maintaining two branches in my repo, and releasing two versions of my plugin with different valid version ranges (one valid for 12, one valid for 13). Merging between the branches is generally trivial unless there's been API breakage like this. One thing I'm not sure of is how to release two versions to the Jetbrains plugin repo, I'm using my own repo. I believe users will only see plugin versions valid for the IntelliJ version they're using, so I'm guessing you could release two and append .12 and .13 to your version numbers, or something like that.

0
Comment actions Permalink

In your plugin.xml you can specify the since/until build attributes

    <idea-version since-build="107.105" until-build="..."/>

Note - I haven't had to test this out before, but I believe it works :)

0
Comment actions Permalink

Right, that's what I mean - in my plugin for 12 I initially specify the whole range for 12.x plugins, and then if there's some API changes in a 12 release (it happens from time to time, for example 12.1) then I update the from version. I do the same with 13 but ended up changing the from version much more frequently while it was in EAP.

0
Comment actions Permalink

So far it hasn't been a show stopper for me.  I am able to produce a build that works for both 12 and 13 by using 12 to prepare the plugin.  Not an ideal solution, as it locks me to the older version of Idea, but for the time being it works.  I'd hate to have to maintain two branches/versions for the sake of one method signature change, but that might be the only solution moving forward.

Florin, did you run into any other breaking changes besides the RunConfiguration?

(the radiobutton thing I worked around by adding a JButton with a changelistener to the form and moved the graphics to it to simulate the jradiobutton icons).

0
Comment actions Permalink

Besides the 'run' issue I don't have any others (fortunately).
Keeping two branches can be a bit annoying but hopefuly everyone will migrate to IDEA13 sooner or later.


Regards,
Florin

0

Please sign in to leave a comment.