Geertjan's Blog

  • March 27, 2008

Java Hint Generator for NetBeans IDE 6.1 Beta

Geertjan Wielenga
Product Manager
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 and read the accompanying instructions.

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

Join the discussion

Comments ( 7 )
  • Kunal Modi Monday, March 31, 2008

    hi geertjan,

    I tried your "java_hint_generator_for_netbeans" plugin for NetBeans6.1Beta. Its a good idea. It has quite a few days since I have been investigating in the Hints & Java editor modules and the corresponding XML layer of NetBeans. And then i suddenly found your plugin.

    However i am facing a problem building the module using the plugin template.

    When i try to compile and install in the target platform, the Build fails. the reason it gives is that there are no public packages in "org-netbeans-modules-java-editor.jar"

    I investigated the Manifest file of this jar and found that there were on public packages available(and i have read-only permission on this jar :( ). I have the source code of NetBeans. I opened this particular module and made the packages of the module "java editor" public(API versioning), however the build failed again(may be i don't have the adequate dependencies)

    Could you guide me to sort out this problem?

    The exact error is as follows:-

    C:\\Program Files\\NetBeans 6.1 Beta\\harness\\build.xml:97: The module C:\\Program Files\\NetBeans 6.1 Beta\\java2\\modules\\org-netbeans-modules-java-editor.jar has no public packages and so cannot be compiled against

  • Geertjan Monday, March 31, 2008

    Please follow the instructions on this page, Kunal. In your case, you didn't do step 6:


  • Kunal Modi Monday, March 31, 2008

    Thank you, Geertjan. It worked now.

  • Geertjan Monday, March 31, 2008

    Excellent! Let me know how you get on with the hint! We will definitely be interested in including new hints in the NetBeans sources, if they are useful to NetBeans IDE.

  • Kunal Saturday, April 5, 2008

    hi,I am working on a review tool called Sticky Notes which is one of the modules for my Final Year computer engineering project(something similar to rohan's review tool mentioned at http://blogs.sun.com/geertjan/entry/creating_error_annotations_in_netbeans1 ). I have followed your tutorial and managed to make a custom annotation. I attach them at runtime to a java file at predefined line nos.in the java editor using the skeleton you provided in the Java Hint Generator plugin. However,I want to dynamically retrieve the particular line numbers from the Run-time information which hold this particular annotation, i.e. my custom annotation.

    I tried the following code in the Java Hint Generator Plugin's skeleton class.

    org.netbeans.modules.editor.hints.AnnotationHolder ah = org.netbeans.modules.editor.hints.AnnotationHolder.getInstance(info.getFileObject());

    List<org.openide.text.Annotation>an = ah.getAnnotations();


    org.openide.text.Annotation a = an.iterator().next();


    However this ignores my custom annotation.. which i later found out that it was meant only for the following errors.











    It would be great if you could help me for a link through which i can determine the lines which hold my custom annotation at runtime.

    Thank you.

  • Unomi Friday, February 13, 2009

    Hi, I've just installed 6.5 and am looking into making my own hints.

    But now it looks like this module is depending on something with TAX libraries. I feel like it is not compatible with 6.5?

    How to proceed?


  • Mani Wednesday, September 7, 2011

    SUB: Is there a version of the plugin for NB7

    When I tried installing the plugin in NB7, it refused to do so since some dependencies were not fulfilled.



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