JavaScript plugin

Milian Wolff mail at milianw.de
Wed Oct 31 10:48:27 UTC 2012


On Tuesday 30 October 2012 11:49:38 Przemek wrote:
> Hello,
> I would like to also help improvements for kdevelop, so if I can help
> somehow, catch me on the irc or via email. I'd like to create a lot of
> useful tools for this ;)

The next steps required are basically these:

- make Language of ParseSession's document public, use that in the parse job 
to create a language-specific builder. Also make ParseSession::languageString 
take a Language parameter, or make it non-static.
- the language specific builders could be done for now by copying 
duchain/*builder.{h,cpp} into duchain/js/ and duchain/qml/ 
- then start with implementing the actual builder behavior. essentially, use 
the qml-parser on an input file of the language you want to work on to figure 
out the correct AST node where a context or declaration should be created. Add 
the correct overloads of the corresponding visititor methods to the 
context/type/declaration builder. See also debug visitor for how this is done 
there e.g.
- for more information on the builder, our DUChain etc., take a look at either 
of our language plugins, e.g. PHP, Ruby, Python. Or, of course, ask here or on 
IRC.

Oh, and a *very* important aspect is that you write unit tests while 
implementing new features, i.e. adding stuff to the builders.

Cheers

> 2012/10/28 Niko Sams <niko.sams at gmail.com>:
> > wow, that's a long list!
> > I would be very interested in having basically all points you metioned.
> > 
> > I would suggest you start in small steps and start sending patches to
> > reviewboard.
> > If you have any questions just ask here :D
> > 
> > regarding JS support: don't implement your own parser. Aleix started a
> > QML plugin with
> > also javascript support.
> > You'll find it here: scratch/apol/kdev-qmljs.git
> > it reuses the QtCreator parser (local copy) from which we can get the
> > AST direclty.
> > So that's probably the easiest way to go.
> > 
> > cheers,
> > Niko
> > 
> > On Fri, Oct 26, 2012 at 11:47 PM, Tatsh <ddrtist at gmail.com> wrote:
> >> Yes. I have limited time during the week (but generally free on
> >> weekends). I am very interested in improving my IDE and hopefully this
> >> will result in increased productivity both at work and at home.
> >> 
> >> I have some other goals too:
> >> - Complete PHP 5.4 support (including parsing namespaces, `use`
> >> statements, etc) - Symfony 2 support (this is a special project type
> >> with a lot of
> >> special needs that don't necessarily fit into the PHP project)
> >> - Twig template support (this is similar to Django templating, so if
> >> that's already done...)
> >> - Sass, SCSS, etc with built-in integration with Compass (gem install
> >> compass) (this one might be a bit far fetched)
> >> - CSS auto-completion
> >> - Node.js integration with JavaScript support (for debugging and unit
> >> testing) - JavaScript Minification (with Closure Compiler, UglifyJS)
> >> support (this is similar to compiling C/C++ and parsing the GCC output)
> >> 
> >> The end goal really is to make KDevelop a lot more friendly to web
> >> development. Without JavaScript support and full PHP 5.4, a lot of the
> >> features (namely auto-completion) are lost.
> >> 
> >> Andrew
> >> 
> >> On 26 October 2012 12:49, Friedrich W. H. Kossebau <kossebau at kde.org> 
wrote:
> >>> Am Mittwoch, 24. Oktober 2012, 18:14:40 schrieb Tatsh:
> >>>> I started a project but it's basically the PHP grammar file partially
> >>>> fixed
> >>>> for JavaScript.
> >>>> 
> >>>> https://github.com/Tatsh/kdev-js
> >>> 
> >>> Thanks for the pointer.
> >>> 
> >>> I will have a look in the next weeks on it, so far my most promising bet
> >>> on
> >>> getting javascript support in KDevelop. :)
> >>> 
> >>> Are you interested in pushing your work some more the rest of this year?
> >>> I
> >>> surely would like to work on it, and four hands (?) hopefully would
> >>> speed up things.
> >>> 
> >>> Cheers
> >>> Friedrich
> >>> 
> >>>> On Oct 24, 2012, at 10:19, "Friedrich W. H. Kossebau"
> >>>> <kossebau at kde.org>
> >>> 
> >>> wrote:
> >>>> > Hi Andrew,
> >>>> > 
> >>>> > Am Dienstag, 17. April 2012, 20:58:54 schrieb Tatsh:
> >>>> >> I am looking into the KDevelop PHP plugin for ideas on how to
> >>>> >> properly
> >>>> >> begin a plugin. I'd like to implement JavaScript support, including
> >>>> >> code
> >>>> >> completion, type detection (via annotations and literal/new
> >>>> >> notation),
> >>>> >> 'this' detection, etc.
> >>>> > 
> >>>> > I am currently also driven by the needs for better Javascript support
> >>>> > in
> >>>> > KDevelop and found this thread.
> >>>> > 
> >>>> > Was any code created after these emails? Where can it be found?
> >>>> > 
> >>>> > I would happily join this subproject, if it exists.
> >>>> > If not, sigh, would create one for it myself. :)
> >>>> > 
> >>>> > Cheers
> >>>> > Friedrich
> >> 
> >> --
> >> KDevelop-devel mailing list
> >> KDevelop-devel at kdevelop.org
> >> https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
> > 
> > --
> > KDevelop-devel mailing list
> > KDevelop-devel at kdevelop.org
> > https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-devel
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20121031/737305a9/attachment.sig>


More information about the KDevelop-devel mailing list