Over a million developers have joined DZone.

Get Started Writing Hints for the NetBeans Java Editor

DZone's Guide to

Get Started Writing Hints for the NetBeans Java Editor

· Java Zone
Free Resource

Microservices! They are everywhere, or at least, the term is. When should you use a microservice architecture? What factors should be considered when making that decision? Do the benefits outweigh the costs? Why is everyone so excited about them, anyway?  Brought to you in partnership with IBM.

I've blogged about hints before and about how cool it would be for users out there to create hints so as to increase (even further) the power of the NetBeans Java Editor. But now it's a simplified process.


Install that plugin.

Here's where you'll find the new template, once you've installed the above plugin:

Here are the instructions for using the above new template: 

  1. Create a module project.
  2. Use the new Java Hint template that you see above.
  3. Inspect the generated Java class and tweak as needed.
  4. Look at the layer.xml file and see what's going on there.
  5. Expand the layer.xml file and see how the hint is registered within the existing hints.
  6. Right-click the project, choose Properties, go to the Libraries panel, and edit "Editor Hints (Experimental)", "Java Editor", and "Java Hints", such that you end up using their Implementation Versions. Close the Properties dialog.
  7. Install the plugin, making sure to do a restart.
  8. Have a look at Tools > Options > Java Code > Hints and make sure that your hint is registered. Read the description and see if you like it. If not, go back and change it in the plugin.
  9. Do whatever you need to do to cause the hint to appear. By default, it will appear if a method name is "showMessageDialog", as in "JOptionPane.showMessageDialog":

    By default, the label equals the class prefix you filled in in the 2nd step of the Java Hint wizard. Simply change it in the generated Java class as needed.

  10. The generated hint is not a fixable hint. That's possible to create too: Fixable Hint.
  11. Upload your plugin in the Plugin Portal so others can use it.


Discover how the Watson team is further developing SDKs in Java, Node.js, Python, iOS, and Android to access these services and make programming easy. Brought to you in partnership with IBM.


Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}