Writing an IDE plugin is usually a nightmare. We've created one for
eclipse since it's the most used IDE.
But having a plugin for IntelliJ would be very nice. If you need any
help on the Play side just ask.
Thank you!
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
--
Guillaume Bort, http://guillaume.bort.fr
For anything work-related, use g...@zenexity.fr; for everything else,
write guillau...@gmail.com
IntelliJ 10 Community Edition here as well.
I started working on the custom language part of a plugin for IDEA for
Play a while ago after talking with Steve, but haven't been able to
continue to work on it recently due to -- you guessed it -- lack of
time.
The IDEA language plugin is not too well documented, I got some help
on the forums, but it's still quite a maze plus you have to implement
the lexer and parser and post-processor by hand using the IDEA API (in
comparison to eclipse where you can just throw in a extended BNF
grammar et voilà, you have a shiny editor).
If there's anyone out here who already implemented a custom language
plugin in IDEA please ping me.
Or if you know a language plugin for IDEA that also mixes different
languages in one view (e.g. Play! mixes HTML, Play! markup and groovy)
AND has its source code available, that would also help a lot.
Unfortunately the examples of e.g. FreeMarker and Velocity support
aren't open-source so no way to look at the source there.
Cheers!
Manuel
quick reply as I am quite loaded -- I meant to reply on your post on
the IntellIJ forum as well, but no time yet.
- I am probably not going to vote on the JetBrains issue because that
would be somewhat self-defeating :) Also, from the JetBrains
perspective, if there's guys like us that start developing a plugin,
they probably won't start to write their own (unless we are terribly
slow) if they can get that for free from us and by providing some help
here and there. Personally I started looking into this because I
really want to have tooling for refactoring, lookups, etc. for IDEA,
and I want it yesterday.
- thanks to Dominik I got in touch with the JetBrain guys, esp. with
Peter who developed the Grails plugin. The Play templating engine
language and GSP is very, very similar - I think about everything but
#{some.Tag some:value} can be seen as a groovy expression (and even
there it really is only the "some.Tag" part that is Play-specific). In
practice this means there's not much work to do with Play templating
"language" lexing & parsing. However, the hard part is to glue
together all the languages (HTML, Groovy, Play) which does involve
writing a two-step lexer and a parser. Actually I'm quite ok with the
lexing and parsing, the "only" problem is that the "gluing" part
involves quite some unknown / undocumented APIs and this will probably
make it time-consuming (I haven't started with that yet).
- I know there's quite a number of alternative templating engines to
the default groovy one, yet I will focus on developing support for
that one because this is the one I use / need support for, and also
because it looks like the more stable to me (in terms of maintenance,
documentation, support, ...) - that being said I only very quickly
looked at alternatives so I don't really know what else there is.
However, I would suggest that we try to have one plugin that supports
several templating engines instead of multiple ones, because ideally
the IDEA plugin should also provide support for common functionality
such as importing Play! projects (resolving the classpath etc.) --
e.g. "play idealize" is broken for scala and does not look too easy to
fix (we talked about it with Julien), and this is annoying.
- what I have written until now is at
https://github.com/manuelbernhardt/play-idea under Apache 2 (mind you,
it's a stub). Steve also imported what he started at
https://github.com/schaloner/IdeaPlay, that is I have the feeling that
I am somewhat further now in terms of setting up the language support.
Before we each start making different repositories I suggest we settle
for one, I will selfishly propose to use mine here to whomever would
like to contribute.
- again, I am quite loaded, so I can't promise to do anything fast.
I'll do my best to move forward with the language part, maybe someone
else wants to give a shot to the other things such as Play facet
implementation / Play SDK support, project import etc. ?
Cheers!
Manuel
On Fri, May 6, 2011 at 9:25 PM, v6ak <v6...@volny.cz> wrote:
> I'm not sure that 'play idealize' is broken for Scala, although some
> small workarounds are needed.
what I meant with broken is that you won't get the scala libraries
(the scala library of the current scala version, the play-scala
library, and the scala module src/ directory if I am not mistaken)
appended in the generated IML file. I agree that it is not that much
work to do it by hand, but it breaks the nice flow of "type one simple
command and get started right away" feeling that makes Play so nice to
use.
First of all thanks for starting the work on the Intellij plugin -
it's a great initiative.
1) Regarding the plugin itself: I tried it but I failed to compile it
(in the import "com.intellij.extapi.psi.PsiFileBase;" it doesn't find
"com.intellij.extapi"). Do I need to install a specific Intellij
plugin?
2) For play idealize: it's fixed in play-scala's trunk, you can
replace the commands.py file on your local copy to fix it.
https://github.com/playframework/play-scala/blob/master/commands.py
> --
> You received this message because you are subscribed to the Google Groups "play-framework" group.
> To post to this group, send email to play-fr...@googlegroups.com.
> To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.
>
>
--
Erwan Loisant
> 1) Regarding the plugin itself: I tried it but I failed to compile it
> (in the import "com.intellij.extapi.psi.PsiFileBase;" it doesn't find
> "com.intellij.extapi"). Do I need to install a specific Intellij
> plugin?
You need to have the JFlex plugin installed, in order to compile the
lexer. But this error looks more like you don't have the correct
libraries, i.e. you need to have the IDEA source code locally checked
out and linked from the project / configured as SDK. I suggest you
follow http://confluence.jetbrains.net/display/IDEADEV/Getting+Started+with+Plugin+Development
and more specifically
http://www.jetbrains.org/pages/viewpage.action?pageId=983225
Note that the plugin is for IDEA X and so far I only have experience
with it using the ultimate edition.
> 2) For play idealize: it's fixed in play-scala's trunk, you can
> replace the commands.py file on your local copy to fix it.
> https://github.com/playframework/play-scala/blob/master/commands.py
Good to know, I'll check that out!
Manuel
--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/e8F9BV57WvUJ.