Saturday, January 23, 2010

KDevelop/Quanta4 Css Language Support

I'm currently working on a important part of Quanta4, Css Language support. The only thing supported for now is code completion for standalone css files:


But that is the most useful feature a Web IDE can have.


Still on my todo list is:
  • validation (should be easy with the existing parser)
  • Outline navigation (should be not that hard either)
  • Support <style> tags and inline styles in html files
A few notes on how I implemented the plugin:
  • I reused WebKit's flex lexer
  • then wrote a parser using kdevelop-pg-qt based on WebKits bison grammar. A major difference is that it successfully parses incomplete Css - as it is during writing in the editor.
  • The code completion parses the file on invocation and goes through the Ast (resulting from the parser) to find the correct type to show.
  • Then, using an XML file borrowed from Aptana's code assist, the shown completion items are determined.

How to test (feedback is very welcome!)
  • install kdevelop
  • install trunk/playground/devtools/kdevelop4-extra-plugins/css
Ruan recently recently announced on kdevelop-devel that he will work on html/xml language support. There is hope for Quanta4!

14 comments:

  1. This is awesome news! Thank you so much for your efforts to make KDevelop get Quanta's capabilities. I hope it will all go well. :)

    mutlu

    ReplyDelete
  2. great news...I hope ...I hope... :)

    ReplyDelete
  3. Hey Niko, I just tried to install it from SVN and got:

    Scanning dependencies of target kdev4cssparser_automoc
    Scanning dependencies of target kdevcsslanguagesupport_automoc
    Scanning dependencies of target css-parser_automoc
    [ 0%] Generating csslanguagesupport.moc
    Built target kdev4cssparser_automoc
    make[2]: Circular parser/tokenizer.flex <- parser/tokenizer.flex dependency dropped.
    make[2]: *** No rule to make target `parser/cssparser.h', needed by `parser/tokenizer.cpp'. Stop.
    make[1]: *** [parser/CMakeFiles/kdev4cssparser.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....
    [ 0%] Built target css-parser_automoc
    Generating parsejob.moc
    Generating model.moc
    [ 0%] Built target kdevcsslanguagesupport_automoc
    make: *** [all] Error 2

    ReplyDelete
  4. Jakub, please update and try again.
    If it still, please fails post your cmake output.

    ReplyDelete
  5. Sounds like nice!

    Hmmm, i will test it (and wrote an live ebuild for gentoo).
    How i can get der sources (for quanta4)?

    Greeting from Hamburg!

    ReplyDelete
  6. @B.Schulz:
    Use KDevelop instead of Quanta; Quanta is not ready.

    ReplyDelete
  7. Hi Niko!
    KDevelop too ...
    Its not an HTML/PHP Developer-Framework. anyway, not for me.

    But i have an basic-functionaly ebuild for gentoo.
    I think thats open quanta for a lot of testing-people. :)

    ReplyDelete
  8. I have been visiting various blogs for my term papers writing research. I have found your blog to be quite useful. Keep updating your blog with valuable information... Regards

    ReplyDelete
  9. Thanks this new support tool is great.

    ReplyDelete
  10. There any news about the plugin for html / css?

    SALUDOS!!!

    ReplyDelete
  11. @bernardino:
    absolutely, milian is working during this GSoC on it, for updates read his blog: http://milianw.de/blog

    ReplyDelete
  12. hi I am an engineer and I was working on Quanta4, but I had several problems and I didn't have so much time to solve them so I quit it and tried another software, but what you have here may help me to sole those old problems, thank you!

    ReplyDelete
  13. Glad to visit your site. An awesome blog. Nice Information It's really very informative that I wanted ever, thanks for this. Obat Herbal Bali Ratih Obat Jerawat Tulisan Indah Suplemen Fitnes Murah

    ReplyDelete