Plugin & versions of IDEA

Hi everyone,

I'm trying to improve the SpellCheckPlugin by adding some features. The first developments i've done seem to work properly with IDEA 4.0, but not with 4.0.3. I have change hardly anything about the interface between the plugin and Idea, which mainly uses the Psi package, and I have no idea where to track the bug.

Does anyone know what differences are there between these versions which can have consequences on plugins ?

Thx.

4 comments
Comment actions Permalink

Ok, I have found what has changed, but I am really surprised by the answer...

I had made some test under 4.0 to discover that javadoc PsiElement was instances of the class com.intellij.psi.impl.source.e.j, and I was testing this using and instanceof. Under 4.0.3, this test allways returned false. So it seems the name of the class representing javadocs has changed

Is there a smart way to do this kind of tests, without trying to guess the name of the class ?

sorry if this is a 'newbie question'...

0
Comment actions Permalink

Hi Luc,

com.intellij.psi.impl.source.e.j is an obfuscated class, and, considering the nature of obfuscation, its name may very well change between releases. If you want the plugin to be compatible with multiple releases of IntelliJ, rely only upon the classes published via the OpenAPI, and check out Class.isAssignableFrom(Class cls) - it may be a viable alternative to instanceof.

Hope this helps.

Cheers,

-Daniel

0
Comment actions Permalink

Ok Thanx.

Actually all that I known about the api was what I had found in the 'idea.jar' which was included in the plugin project, which is not the best way to understand how to use it...

I've now discover the openapi javadoc in $IDEA/doc/openapi/javadoc, it will become easier to code, even if it looks not very well documented...

0
Comment actions Permalink


"Mercier" <no_mail@jetbrains.com> wrote in message
news:1627968.1090251165069.JavaMail.itn@is.intellij.net...

Ok Thanx.

>

Actually all that I known about the api was what I had found in the

'idea.jar' which was included in the plugin project, which is not the best
way to understand how to use it...
>

I've now discover the openapi javadoc in $IDEA/doc/openapi/javadoc, it

will become easier to code, even if it looks not very well documented...
>


0

Please sign in to leave a comment.