Brand New Annotations Support
By Ondrej Brejla on Mar 29, 2012
Hi all! Today we would like to introduce you our brand new annotation support for NetBeans 7.2.
The first thing which is different is the look of annotations in code completion. As you can see, there is a new annotation icon and an annotation type. Because we have a lot of modules with their own annotations, we differ them in code completion window by their type. We support annotations for:
- ApiGen (legacy PHPDoc annotations),
- Doctrine 2 (ORM and ODM) and
- Symfony 2.
- class/interface (type),
- method and
It means that you will get just proper annotations for your class field as well as your global function.
Do you have your own annotations? Or do you simply miss some? There is nothing hard to add it in there. We have a simple UI for adding your custom annotations! It's in Tools -> Options -> PHP -> Annotations. Here you can simply add, edit or delete your annotations.
When you try to create new one, all fields are prefilled by some default values. So you really don't have to remember "how to use that crazy freemarker syntax".
If you are satisfied with your new annotation, you can see it in a code completion window among other annotations. As you can see it has its own "Custom" type.