Application.runProcessWithProgressSynchronously does not support in IDEA6.0

What happens with Application.runProcessWithProgressSynchronously() method in IDEA 6.0 (build 5581)? I created plugin that uses this method, but in IDEA 6.0 it was moved to ProgressManager class.

How can I run my plugin under IntelliJ IDEA 5.1 and 6.0 now?

Thanks,
Vladimir

2 comments
Comment actions Permalink

You have three possibilities:

1) You split the code base of your plugin into two distinct branches, one for IDEA 5.x and one for 6.x.

2) You invent an abstraction layer which is hiding the runProcessWith... method. Then you implement this layer in two different classes, one for IDEA 5.x and one for 6.x. At runtime you decide based on the current build number which implementation to load.

3) You call the runProcecessWith... method through reflection, either on the Application or on the ProgressManager class.

If the location of this method is the only incompatibility between the two versions, then I recommend you to use reflection (3). It's an ugly hack, but simple to implement. Inventing an abstraction layer (2) is the cleaner approach, but you've got some more work to do. And finally splitting the two versions completely (1) seems to be quite some overkill to me.

0
Comment actions Permalink

Thank you very much.

Vladimir

0

Please sign in to leave a comment.