PHP Options: Annotations

Use this panel to create and manage custom PHP annotations in code completion. The panel opens in Tools > Options > PHP > Annotations.

Element Description

Custom Annotations table

This table lists all custom annotations that you define. The table has two columns: one for the annotation name, and one for the annotation context ('For'). The possible contexts are function, class/interface (type), method, and field.

Add

Adds an annotation to the table. Clicking this button opens the Custom Annotation dialog.

Edit

Select an annotation in the table and click this button to edit the selected annotation. Clicking this button opens the Custom Annotation dialog.

Delete

Select an annotation in the table and click this button to delete the selected annotation.

Export

Export the custom annotation definitions to a ZIP archive file.

Import

Import custom annotation definitions from a ZIP archive file. .


Custom Annotation Dialog

Use the Custom Annotation dialog to add or edit a custom annotation.

Element Description

Name

Name of the custom annotation.

For

The context associated with the annotation. Choose one from the following:

  • function
  • class/interface (type)
  • method
  • field

Template

The template for the annotation. By default, the field contains a sample annotation template is provided, which you can edit. The template for the annotation uses the same syntax as code templates.

Documentation

The HTML documentation for the annotation. By default, the Source tab contains sample annotation documentation, which you can edit. The Preview tab renders the HTML that is in the Source tab, showing you how the documentation appears when a user invokes code completion and selects this annotation.



Related Topics

Developing Applications with NetBeans IDE,

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.