X

Geertjan's Blog

  • January 21, 2015

How to Implement Yeoman in NetBeans IDE

Geertjan Wielenga
Product Manager

I've been looking into what it would take to support Yeoman in NetBeans IDE. My initial idea was to use the dynamic actions mechanism (see it on YouTube here), to create something like the "External Tools" functionality in IntelliJ IDEA, where you can register Yeoman configurations as external tools, which means each configuration gets a keyboard shortcut, menu item, and toolbar button for invoking the configuration.

I showed the above approach to Ralph Ruijs yesterday and his immediate reaction was along the lines of: "That's just weird. If I want to create a new project via Yeoman, I'd expect to be able to go to the New Project wizard and have access to all the available Yeoman commands via a Yeoman category." Of course, it's a pity I can't use the dynamic actions approach but I agree that it doesn't apply so well in this context. So then I spent some time working on "dynamic project templates" instead of "dynamic actions", which is doable, but even more difficult.

And then... I thought about how Maven archetypes are suppored in NetBeans IDE:

When you want to create a Maven project from an archetype from the on-line Maven repository, you go to the above project template in the New Project wizard. When you click Next above, you see this dialog:

What that means for Yeoman (and for JBoss Forge, I believe) is that, assuming one wants to be consistent with the existing NetBeans IDE approaches, is to create an entry point like this:

When Next is clicked above, a dialog should appear similar to the second step of the Maven archetype wizard. At that point, "yo -- help" should be run (same as is done for grails and griffon in NetBeans IDE), which will then give access to the available generators, which should be made available in a drop-down list, which the user can then select, at which stage the generators are executed.

In other words, that means (1) no dynamic actions are needed and (2) no dynamic project templates are needed. Instead, a much simpler solution based on an existing NetBeans pattern is applicable here and, as you can see above, will provide a very clear entrypoint into Yeoman from within NetBeans IDE.

Join the discussion

Comments ( 3 )
  • guest Monday, March 16, 2015

    How to add Yeoman plug-in into IDE. There is no steps mention anywhere. Please help me out.

    Please note I am very much new in NetBeans.


  • Fabrizio Thursday, April 30, 2015

    How to add Yeoman plug-in into IDE. There is no steps mention anywhere. Please help me out.


  • Geertjan Thursday, April 30, 2015

    Read the blog entry again. This is not a completed plugin yet, it is under development. You are welcome to clone and develop it further yourself: https://github.com/GeertjanWielenga/YoNetBeans


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.