plugin to support JavaScript library

Hello,

I would like create IDEA plugin to support qooxdoo (http://qooxdoo.org) javascript library. It's a little bit different
than other js libraries, there are packages, classes, interfaces, mixins and so on. But it's still javascript.

What I want to achieve at first:
1) packages/classes navigation and packages/classes autocompletion
E.g.
var a = new qx.ui.]]> should shows available packages or classes inside package qx.ui (but from JS angle of view "qx.ui"
is just a variable, so I need to include my support here somehow)

2) Resolve different types of js files and show appropriate icon (class, interface, mixin, like java classes and interfaces in navigator)
Each different type file starts from:
qx.Class.defin("name", { /code/});
qx.Interface.defin("name", { /code/});
qx.Mixin.defin("name", { /code/});

It's enough at first time.

I have read some docs regarding custom language support but I don't know if this is right way. As far as I understand IDEA has good support
of javascript and probably I need to extend it a little to add support as in my case but not rewrite all this stuff. Also I downloaded dev kit and
checked examples, there is a javascript lang support plugin. Should I base on this plugin to achieve what I want? I also found class GWTLanguageDialect
(don't know much about, just look through), may be I should do something in this way?

What do you think, what the best way is? From where should I start?

Thanks you very much,
Siarhei Barysiuk

2 comments
Comment actions Permalink

There is IconProvider interface but AFAIK there is no possibility to
hook into providing icons in JavaScript (except by providing patches),
as to subject I suggest to file JIRA request about about not recognized
js classes, we do such thing for Dojo, YUI, Prototype, Ext so for
another framework it will be very fast :)

Siarhei Barysiuk wrote:

Hello,

I would like create IDEA plugin to support qooxdoo (http://qooxdoo.org[/URL]) javascript library. It's a little bit different
than other js libraries, there are packages, classes, interfaces, mixins and so on. But it's still javascript.

What I want to achieve at first:
1) packages/classes navigation and packages/classes autocompletion
E.g.
var a = new qx.ui.<caret here> should shows available packages or classes inside package qx.ui (but from JS angle of view "qx.ui"
is just a variable, so I need to include my support here somehow)

2) Resolve different types of js files and show appropriate icon (class, interface, mixin, like java classes and interfaces in navigator)
Each different type file starts from:
qx.Class.defin("name", { /code/});
qx.Interface.defin("name", { /code/});
qx.Mixin.defin("name", { /code/});

It's enough at first time.

I have read some docs regarding custom language support but I don't know if this is right way. As far as I understand IDEA has good support
of javascript and probably I need to extend it a little to add support as in my case but not rewrite all this stuff. Also I downloaded dev kit and
checked examples, there is a javascript lang support plugin. Should I base on this plugin to achieve what I want? I also found class GWTLanguageDialect
(don't know much about, just look through), may be I should do something in this way?

What do you think, what the best way is? From where should I start?

Thanks you very much,
Siarhei Barysiuk



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0
Comment actions Permalink

Hello Maxim,

Thank you very much for your response. I will definitely fill enhancement request to support qooxdoo (by the way,
I didn't find any regarding other libraries).

The main problem that I don't think that JetBrains will invest own time to support all aspects of this library because
you have a lot of work to do and I understand it. Besides specified features in my first post there are a lot of cool features
in this library and it would be good to support them in separate plugin.

My main idea is to provide facet for qooxdoo like for other java libs. It is very similar to java from "ideology" point of view.
There are sdk, classes and packages, build system. It's more than just javascript library like jquery/prototype or ExtJs.

So, this facet will be able to do following:
1) class/package navigation (own and from sdk)
2) different type of files (like > Create class... or > Create interface...)
3) project wizard (will use built-in generator, http://qooxdoo.org/documentation/0.8/generator)
4) generator tasks panel (like ant targets list)
5) run different task from generator
6) easy internationalization
7) so on ...

I'm a newbie in IDEA pluing system, so I need just a point to start from. I will appreciate for any feedback on this theme.

Thank you for all your work, IDEA looks just brilliant for java developers and is becoming more and more multi-language IDE.

Best regards,
Siarhei Barysiuk

0

Please sign in to leave a comment.