Play Framework Plugin for NetBeans IDE (Part 1)

The start of minimal support for the Play Framework in NetBeans IDE 7.3 Beta would constitute (1) recognizing Play projects, (2) an action to run a Play project, and (3) classpath support.

Well, most of that I've created already, as can be seen, e.g., below you can see logical views in the Projects window for Play projects (i.e., I can open all the samples that come with the Play distribution). Right-clicking a Play project lets you run it and, if the embedded browser is selected in the Options window, you can see the result in the IDE. Make a change to your code and refresh the browser, which immediately shows you your changes:

What needs to be done, among other things:

  • A wizard for creating new Play projects, i.e., it would use the Play command line to create the application and then open it in the IDE.
  • Integration of everything available on the Play command line.
  • Maybe the logical view, i.e., what is shown in the Projects window, should be changed. Right now, only the folders "app" and "test" are shown there, with everything else accessible in the Files window, as can be seen in the screenshot above.
  • More work on the classpath, i.e., I've hardcoded a few things just to get things to work correctly.
  • Options window extension to register the Play executable, instead of the current hardcoded solution.
  • Scala integrations, i.e., investigate if/how the NetBeans Scala plugin is helpful and, if not, create different/additional solutions. E.g., the HTML templates are partly in Scala, i.e., need to embed Scala support into HTML.
  • Hyperlinking in the "routes" file, as well as special support for the "application.conf" file.

Anyone interested, especially if you're a Play fan (a "playboy"?), in joining me in working on this NetBeans plugin? I'll be uploading the sources to a repository soon. It will be here, once it has been made publicly accessible:

Kind of cool detail is that the NetBeans plugin is based on Maven, which means that you could use any Maven-supporting IDE to work on this plugin.


It is really what I've wait for. I love play 2 a lot, but forced to use ugly Eclipse.
Anyway, it will be great pleasure to join you in this project.

Posted by guest on October 22, 2012 at 04:14 AM PDT #

Great idea!

Posted by guest on October 24, 2012 at 01:35 AM PDT #

Hi Geertjan,

I recently gave a try to the play framework and really liked it.
As I use (and love) NetBeans, I am very interested in this plugin.

I downloaded the sources of your plugin and started to "play" with it.

I am a very beguinner in programing the NetBeans platform so I mostly used NetBeans tutorials (actually it's my first NetBeans Platform related development) but I managed to do a the few things:

* Added the wizard to create a new play project (java app, scala app, empty app). It does not use the play command but sample projects ("NetBeans Project Type Module Tutorial" -> "Registering the Project Type as Project Sample"). Because of this there is a small issue: the project/Build.scala file references a wrong app name and app version but it does not prevent to use the project. Also the created project need to be built (with the command line as the action is not yet implemented) before being able to run it in NetBeans.
* Added an Options panel to be able to configure the play home path (here again, thanks to NetBeans tutorials).
* Modified the PlayRunAction class to use the configured play home path.
* Modified the PlayProjectActionProvider class to pass an ActionEvent (instead of null) to the action (met a NullPointerException).
* Added the LIBRARIES_BADGE icon into a nplay package and references it instead of the groovy/grailsproject module one.

So that's it, no crazy stuff but I'd be glad if it could help a bit. Tell me if you'd like I send it to you.

Posted by Yann on October 26, 2012 at 03:55 PM PDT #


It's been a while since I've checked out your blog, and just looking around for good Scala/Play support other than IntelliJ (which I'm using, but still love the more intuitive Netbeans Platform), and just upgraded to 7.3 to my suprise it now has Scala!
And after browsing for Play 2 support, I bump into your post, no wonder as you're always on the edge of development, it's like you read my mind and already 2 steps ahead of me.
It's awesome you're building Play 2 support, hope that this gets integrated into the next Netbeans release, as well as having Scala support now by default as part of the Netbeans package instead of just as plugins.

Love your work, keep it up!

Posted by Raul Guerrero on May 03, 2013 at 08:36 AM PDT #

relation with java,oracle and .net

Posted by guest on May 23, 2013 at 03:29 AM PDT #

Thanks a lot for this initiative.

But I had some problens with thrunk version. :(

When I open/create a play project a NullPointerException occurs.

The bugzila ID created in netbeans is 235418.

Best wishes

Posted by Kann on September 02, 2013 at 08:36 AM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« April 2014