Plug-in for Closure Templates (soy files) - Integration with JavaScript?

I've been working on a plug-in to support Closure Templates in IntelliJ Idea. I've got the lexer and color/font panel working, and I will be starting on the parser soon.

Closure templates can exist as both server and client side objects, and as such a template name can exist in both Java (as a string) and JavaScript (as an object property).

I'm currently building the plug-in against the Community Edition, but I would like to know if there's a way to support/extend the JavaScript language in Ultimate so that references { i.e. PsiElement.getReference() } can be added to JavaScript PSI elements that seem likely to point to a template definition.

Any links to documentation or code examples would be most appreciated.


FAQ -- Because I'm not working on this project full-time.

  • What name will the plug-in be listed under on the IntelliJ repository? - "Non-Dairy" :)
  • Will this plug-in be open source? - Yes, but not until I get the parser implemented.
  • When will this plug-in be available in the repository? - Shortly after I it goes open source, perhaps in September.
  • Will it support ___?
    • I'm planning on supporting syntax highlighting and basic reference/resolve features.
    • Syntax highlighting will support about two dozen contextual elements.
    • HTML syntax highlighting will not be available initially. I need to learn more about composite language support in Idea
    • Other feature integrations are not planned for the initial release. If you haven't noticed, Idea supports a crap-ton of cool stuff, and if I wanted to support all that, Idea 11 will release before I get this finished.
    • I18N will be supported upon the release to open source, but initial support will be English only. If anyone is willing to contribute an appropriate resource bundle, patches are most welcome.
  • What other plug-ins have you made? -- None, this is my first Idea plug-in.
  • Feature requests and inquiries are welcome, but please understand this is a part-time project, so I will do what I can.
  • Do you have a teaser screen shot? - yep:

Closure Plugin - Color chooser panel.png

Thanks for your interest. Extra thanks (with a cherry on top) to anyone who can help me with my JavaScript integration concerns.


Please sign in to leave a comment.