Tuesday Feb 16, 2010

Formatting - Spaces I

The next  categories, where you can set up the formatting of PHP code is category Spaces. Currently there are implemented more then 40 options that are separated into six groups. All these options as other options, which were mentioned in previous posts about formatting are available in development builds (NetBeans 6.9). The formatting has to be tested properly, if you find a problem, please report it in our database or at least write as a comment here.

The first group Before Keywords defines spaces before a keyword that are usually after '}' char. By default all these properties are switched on. 

The second group Before Parentheses contains options that defines spaces before left parentheses. All options in this group are by default switch on except Method / Function Declaration and Method / Function Call.

The last group mentioned in this post is Before Left Braces. In this group you can define whether the formatting handles space between open brace and an element. All the properties in this group are switched on by default.

Continue the next time.

Friday Feb 05, 2010

Formatting - Braces

Based on the comments under this post the options for placing braces were changed. So this post is not relevant anymore and new information you can find here.

When you select PHP language in the formatting setting then in Category combo box you can select category Braces. The panel for this category contains only one combo box, where you can define the position of braces. There are three values -  Same Line, New Line and Preserve Existing. The default value is Same Line. See the picture.

 I'm not sure whether this one option is sufficient. Does someone have a requirement to offer more options for the braces? For example the Java formatting has options that allow to set different behavior for class declaration, methods declaration and other cases. Also it allows to set that  braces are indented on the new line.

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