Brand New Annotations Support

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),
  • PHPUnit,
  • Doctrine 2 (ORM and ODM) and
  • Symfony 2.
Every annotation can be associated with some context. We recognize four of them:
  • function,
  • class/interface (type),
  • method and
  • field.

It means that you will get just proper annotations for your class field as well as your global function.

Brand New Annotations Support

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.

Brand New Annotations Support

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".

Brand New Annotations Support

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.

Brand New Annotations Support

That's all for today and as usual, please test it and if you find something strange, don't hesitate to file a new issue (component php, subcomponent Editor). Thanks.

Comments:

I'm looking forward to 7.2

I expect you are tracking the DocBlox & phpDocumentor 2 merge? http://www.docblox-project.org/2012/03/docblox-is-unmasked-it-is-really-phpdocumentor-2/

Posted by CJ on March 29, 2012 at 03:24 PM CEST #

Superb!

Posted by Koc on March 29, 2012 at 03:56 PM CEST #

A much needed feature, nice work!

Posted by Marco on March 29, 2012 at 06:12 PM CEST #

Thanks for your response!

CJ: Yes we know about that...but now we prefer ApiGen (http://apigen.org/) over other PHPDocs generators. We think that it's the best PHP API generator in these days.

Posted by Ondrej Brejla on March 30, 2012 at 04:41 AM CEST #

Awesome! That is so useful. Can't wait for 7.2

Posted by Gregor on March 30, 2012 at 06:59 AM CEST #

Thank you, very useful!

Posted by pivasyk on March 30, 2012 at 02:51 PM CEST #

Many thanks,

i planned to hack PHPUnit and Doctrine2 ORM/ODM annotations management for colorizing comments in netbeans... but 7.2 has done the job for me !!!

Posted by bullito on April 13, 2012 at 04:54 AM CEST #

That looks great. I am looking forward to netbeans-7.2.

Posted by Radek on April 23, 2012 at 11:17 PM CEST #

Post a Comment:
  • HTML Syntax: NOT allowed
About

This blogs is written by NetBeans developers who contribute to the PHP support mainly.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today