Geertjan's Blog

  • June 18, 2007

Extending the NetBeans API Wizards (Part 3)

Geertjan Wielenga
Product Manager
After some further 'enrichments' of the New Window Component wizard and the New File Type wizard, I am able to generate all the code needed for creating the following editor infrastructure:

So this is a Multiview Editor, with a Visual Library implementation in the Visual view and a palette in the Source view. To generate the code needed for this infrastructure, I needed to set the following options, first in the New Window component wizard:

And then in the New File Type wizard:

After completing these two wizards, my module contained all the classes below (as well as many new entries in the layer.xml and project.xml files) and I needed to perform no extra steps, no tweaking of the code, nothing at all:

The Multiview Editor that is created is not an implementation of the XML MultiView Editor API. It uses the 'old' Multiview Editor API. For XML files, the XML MultiView Editor API should be included in these wizards, with additional panels for analyzing the XML and deriving editor sections, followed by design choices and a visual library implementation for laying out the visual view... those are some of the areas to work on when extending this scenario to create a complete XML Visual Editor Generator.

Join the discussion

Comments ( 5 )
  • Tom Wheeler Monday, June 18, 2007
    I have a long TODO list of things I need to look into, and before I manage to investigate them, you seem to write a blog entry telling me exactly what I need to know. Thanks again!
  • Geertjan Monday, June 18, 2007
    Very cool! Curious to know... what part of this blog entry responded to your need to know?
  • 花卉租摆 Tuesday, June 19, 2007
    Very cool!
  • Tom Wheeler Tuesday, June 19, 2007

    Well, I looked at the pictures and headlines before thoroughly reading the articles in this series and I thought you'd found a way to add to/change the existing apisupport wizards without modifying their code. I looked into it at one time and even asked on the list, and Jesse Glick said there is not a way short of doing changing apisupport directly (or I guess coming up with a duplication of exactly what apisupport does).

    I'd really love to create some customized wizards for my developers, so that the generated code works with some custom APIs we've developed. Still, it's nice to know that someone was brave enough to modify that code and got it to work.

  • Geertjan Tuesday, June 19, 2007
    Well, if you can live with an implementation dependency on apisupport/project, you can make as many customized wizards as you want, as explained in today's blog entry. But that's a pretty big "if", as well as a "hack" and a "workaround".
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha