Custom plugin & IDEA license issue

Hi folks,

I am trying to create a plugin that uses PSI interface,
to be more specific - com.intellij.psi.PsiClass interface. As I can see, implementation of it by hand looks like a challenging job, it contains lots of stuff.
So, there is a question, can I extend my class from IDEA's implementation of this interface - PsiClassImpl, is there any license issues related to using of IDEA's proprietary classes in the plugin development?
My plugin is intended to be distributed under LGPL licence.

Thanks in advance!

8 comments

Hello Serge,

S> I am trying to create a plugin that uses PSI interface,
S>
S> to be more specific - com.intellij.psi.PsiClass interface. As I can
S> see, implementation of it by hand looks like a challenging job, it
S> contains lots of stuff.
S>
S> So, there is a question, can I extend my class from IDEA's
S> implementation of this interface - PsiClassImpl, is there any license
S> issues related to using of IDEA's proprietary classes in the plugin
S> development?
S>
S> My plugin is intended to be distributed under LGPL licence.

There are no license restrictions that prohibit you from doing that. However,
we do not provide any support for using non-OpenAPI classes, and the likelihood
of your plugin continuing to work in future versions of IDEA is pretty low.

Could you please explain why exactly you need to inherit from PsiClassImpl?
Maybe we can suggest a better solution based on OpenAPI classes.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Thanks Dmitry for quick response.

Actually, we are working on aspectj plugin impl. and now we have got stuck on PsiAspect interface implementation (I mean com.intellij.aspects.psi package). It inherits _PsiAspect with a few methods and PsiClass with many-many methods.
If there is another way to get PsiClass stuff implemented, it will be great.

Thank you.

0

Hello Serge,

S> Thanks Dmitry for quick response.
S>
S> Actually, we are working on aspectj plugin impl. and now we have got
S> stuck on PsiAspect interface implementation (I mean
S> com.intellij.aspects.psi package). It inherits _PsiAspect with a few
S> methods and PsiClass with many-many methods. If there is another way
S> to get PsiClass stuff implemented, it will be great.

The com.intellij.aspects.psi package has been completely removed in Demetra.
If you are working on AspectJ, I very strongly recommend you to build your
own PSI (possibly based on the custom language API) and not use any pieces
of our incomplete support which are still available in 5.0/5.1.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

OK, the recommendation is clear enough, how about PsiClass base implementation, is there anything ready for using?
Thanks.

0

Hi Serge!

Could you do me a favor and explain a bit more about your project. If
you prefer to keep it private you can drop email instead of using
newsgroup.

Alex Tkachman
Marketing Director
JetBrains

Serge wrote:

Thanks Dmitry for quick response.

Actually, we are working on aspectj plugin impl. and now we have got stuck on PsiAspect interface implementation (I mean com.intellij.aspects.psi package). It inherits _PsiAspect with a few methods and PsiClass with many-many methods.
If there is another way to get PsiClass stuff implemented, it will be great.

Thank you.

0

Hi Alex,

Here's where we stand on plugin:
we have a grammar for AspectJ language for ANTL that was written by me. The generated parser can parse aspect definitions samples that are packaged with AspectJ 1.5 distribution package. Also it can parse Java 1.3 source files, actually AspectJ grammar extends Java grammar that is bundled with ANTL 2.7.3. To integrate ANTL generated parser with IDEA's one we use adapter that works on patched generated parser by ANTLR.
So, now we have a plugin that has a syntax highlighting on lexer and parser levels with very primitive error message on grammar incorrectness. Also we have implemented very little piece of PSI that relates to package/import statement support.

Our plans:
-implement PSI support that make possible autocompletion, find usage, etc
-support for specific AspectJ tasks like viewer for joint points, wizard for joint point creating, etc, in short words the stuff that very close to AspectJ plugin for Eclipse;
-introduce grammar for Java 1.5

for now, that's all

0

Hello Serge,

S> OK, the recommendation is clear enough, how about PsiClass base
S> implementation, is there anything ready for using?

Deriving from PsiClassImpl is probably not the best idea because it depends
on the internal IDEA indexes, and it will be hard for you to get your non-standard
classes into those indexes properly. So it would be better for you to reimplement
PsiClass by yourself. There is a (non-OpenAPI) class PsiClassImplUtil which
contains many static methods that will be useful for you in creating your
implementation.

(I don't really want to discourage you from working on the plugin, but still
I have to warn that it's quite likely that you'll run into some limitations
in the IDEA code that will make some functionality of your plugin impossible
to implement, because the relevant parts of IDEA core are not sufficiently
open and pluggable.)

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Hi Serge,

I was looking at the documentation for plugin creation today (Since I never created a plugin) to see if it would be possible to have an AspectJ plugin. It is probably not so simple. If you want, I can help you out. I know very little of AspectJ, I really want to start using it only if IDEA has proper support for it. However, I know a lot about java, so I can probably help with the visualizer and all that related stuff that would not need a thourough understanding of AspectJ.

regards,

Wim

0

Please sign in to leave a comment.