Formatting - Braces - Update
The position of braces in PHP code can be set up in the PHP formatting setting, category Braces(select item Braces in the Category combo box). It's possible to set up separately position of the brace after class declaration, function or method declaration and for other statements.
There are three values - Same Line, New Line and Preserve Existing that can be set to. The default value is Same Line.
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.
Formatting - Tabs and Indents
Few weeks ago I wrote that I try to improve indentation engine and formatting for PHP files. Some improvements in the indentation engine were done during fixing NetBeans 6.8 and with this post I would like to start a discussion about formatting, which I try to improve during these days. In the development builds there are new categories for the PHP formatting options. Now are available categories for setting Tabs and Indents, Braces, Spaces and Blank Lines.
User can modify behavior of the formatter in two levels. In Editor category -> Formatting tab in Options dialog (Tools -> Options) you can modify setting for PHP formatting. You should select PHP in the Language combo box, if you want to change PHP specific settings.
These global options influence the behavior for all PHP files, except the files belonging projects that use their own setting. So the PHP formatting can be also influence on the project level. In Project Properties dialog is Formatting category and you can decide, whether the project will use global options or the project specific options. Also you can easily reuse options from other project after click on Load from other project button. Like in the global options you should select PHP in the Language combo box, if you want to change behavior of the PHP formatting for the selected project.

The first category is Tabs And Indents. The options Number of Spaces per Indent, Tab Size and Right Margin are common for all editors and by default the global setting is used. The check box Expand Tabs to Spaces is clear. By default it is checked and it means that the existing chars '\t' are replaced by the count of spaces that is defined as Tab Size property. Property Number of Spaces per Indent defines the maximum number of spaces that will be created after pressing TAB key to indent the source code. When the check box Expand Tabs to Spaces is unchecked, then the defined number of spaces in Tab Size property is converted to the '\t' char. For this reason is good if you set Number of Spaces per Tab to an even multiple or divisor of Tab Size .
The PHP specific options:
- Initial Indentation - In files only with PHP code it defines number of spaces, that are placed at the beginning of every line (except the PHP delimiters <?php, <? and ?>). In files, where is HTML mixed with php, the Initial Indentation defines number of spaces from beginning of the PHP delimiter.
- Continuation Indentation Size - If there is a long expression, which is on more lines, then the continuation of the expression is indented through this property.
- Items in Array Declaration - It's similar to previous property, but for an array declaration.
It should be clear from this picture:
The next time I'm going to write about next category. Try the latest development build and suggest what else should be configurable.
Error badges
Hi, today it will be a very short blog post about a feature we just added to the development version of NetBeans. As the title says, this feature is Error Badges - what does it mean? If you have a PHP file with any error, this file can be easily recognized directly from Projects view. Have a look at the picture:
Please notice, that the badges are present not only in Projects view but also in the tab of the editor.
Right now, it's not decided yet whether this feature will be included in NetBeans 6.9 final because it is experimental and we need to know how well it works for you so any feedback from you, our users, is more than welcome.
That's all for today, as always, please test it and as said above, report all the issues or enhancements you find in NetBeans IssueZilla (component php, subcomponent Editor).
Zend Framework support
Hi all, today I would like to inform that we just added initial support for Zend framework.
[Read More]
NetBeans 6.8 is available

Today (a feew minutes ago) NetBeans 6.8 has been released and you can dowload it from the main page at netbeans.org site.
I hope that it brings more better and usable support for web development, especially fro PHP developers. I woul like to thank everyone who helps us to improve the IDE.
Promo Video about NetBeans 6.8
NetBeans 6.8 is almost done and is going to be published very soon. You can watch a promo video about NetBeans 6.8 here. As you can see
Usually the new splash screen is one of the latest changes in the release repository. There is the final design of the splash screen.
Small Experiment about File Path in the Editor Tab
I have played with the displaying file path or a part of the file path in the editor tab. I have created a small patch for CSS, JavaScript, PHP and other files that use CSL editor (HTML is not the case). I don't want to commit the patch to the repository, because it's a just experiment and the appropriate solution should cover all files and should be done in the editor infrastructure. The reason why I did this is to see the result and find out as much consequences as possible and also to hear your opinion.
If you want to try it, you should follow these instructions:
- Download NetBeans RC2 in zip form (in the Platform combo box select OS Indenpendent Zip item).
- Unzip the file somewhre in a ${unzip_dir} folder
- Download this org-netbeans-modules-csl-api.jar and replace the original one in ${unzip_dir}/netbeans/ide12/modules/ folder.
- In a command line go to in ${unzip_dir}/netbeans/bin folder
- Run NetBeans with this command on a Linux machine:
./netbeans.sh --userdir /path/to/a/folder -J-Dcsl.editor.folder.level=2
or on a Windows machinenetbeans.exe --userdir d:\path\to\a\folder -J-Dcsl.editor.folder.level=2
In the picture bellow you can see the RC2 build which displays two levels of folders for the mentioned files in the editor tab.

The --userdir option is explain here. It's my recommendation to use it:). The more important option here is the second one (-J-Dcsl.editor.folder.level) that influence the way how the path is displayed in the editor tab.
The number (in my case 2) saying how many levels of parent folders of the file is displayed in the editor tab. If you set this option to -1, then full absolute path is displayed. In case that you set it to 0 or you don't set the option at all, the behavior is the default one - no additional information is displayed in the editor tab.
You can place also the option as a another default option into the netbeans.conf file in ${unzip_dir}/netbeans/etc/ folder.
NetBeans 6.8 RC 2 is out
On Friday, there was published the second release candidate of NetBeans 6.8. You can download the build here.
When we discussed the features for NetBeans 6.9, some people complain about slow scanning and editing. If this experience is based on NetBeans 6.7.1 (which had known performance problems), please try NetBeans 6.8 RC2. We believe the speed has improved significantly. If you still face performance problems with the release candidate build, please let us know the details and we will try hard to improve the performance for your scenario.
CTRL+TAB tip
Probably the last tip is the IDE status bar that could help you in situation, where you have opened more files with the same name. The status bar displays full file path of the selected file in the popup window that is displayed during switching between opened files in the editor through CTRL+TAB short cut.
I have also created four issues, the issue #178090 that explains the problem and is basically umbrella for three issues:
- #178091 - Display in title bar path for the edited file
- #178093 - Display in the window with open file list (CTRL+TAB) path of the selected file
- #178094 - Provide file navigator bar
If you have any comment about this issues, please write the comment directly into the issue. It's much better if it looks like that the issue is a voice of our users, then it looks like an idea of a NetBeans developer:).
Select edited file in Project view, Files view or Favourite view
Yesterday I wrote about option Synchronize Editor with Views and Carlos imentioned the shortcut CTRL+SHIFT+1 in his comment. The shortcut is active, when you are in the editor and selects the edited file in Projects view that obtain also focus. So the difference between Synchronize Editor with Views and this shortcut is that the focus is changed.
In similar way shortcut CTRL+SHIFT+2 works too, but it opens the Files view and selects the edited file there.
And CTRL+SHIFT+3 selects the edited file in the Favourite view. If the file is not in the Favorite view yet, then Add to Favorites dialog is opened. Then you can put directly the file to favorites or a selected folder.
Synchronize Editor with Views
There is one requirement to see a part of file path as name of tab of opened editor to simply recognized the file that is opened. Sure there is a tooltip, which shows the full path of the file, but the mouse has to be used to display the tooltip. This is mainly needed, when there are opened many files with the same name.
Although there is not such functionality yet, there is Synchronize Editor with Views option that could help you. You can find it in View menu and if the item is checked, then in Project view and File view is automatically selected the file that is in the editor.

It doesn't correspond exactly to the requirement that is mentioned above, but it can help in some cases.
Planning features for NetBeans next ... Continuation II
I will try to continue to answer your comments about planning features. I'm sorry if I will not answer your comment, it possibly should be because the similar question/issue was already answered or explained or simply I don't know how to answer. Also I would like to say again, if there will be enough resources, we would like to implements supports for all frameworks and almost all requirements which you wish. But the resources .... Simply we can not do miracles:(. On the other hand it's open source and if you feel strong enough in Java programming, you can help us, but this is another story.
[Read More]
Planning features for NetBeans next ... Continuation I
It was exactly one year ago, when we released NetBeans 6.5, the first version of NetBeans with PHP support. I know that the support is not still perfect (which software is bug free in theses days :) ), but at least NetBeans is known inside the PHP world. One of the evidence is the number of comments that you have written below my latest blog about planing features for next release. I would like to thank everyone who spent a minute and write up a suggestion or an idea.
[Read More]
Planning features for NetBeans next
We are now planning features for NetBeans 6.9, which will be probably the next version of our IDE. There are tons of things, which can be done in editors and other areas that are needed for the web development. From the PHP developer point of view we plan mainly improvements in the PHP editor and create a support for Zend Framework and also Cake PHP framework.
My goal now is to evaluate possible features that can help in the web developer workflow. I would like to ask you, what could help you to make your web developer life easier. Forget on editor features, debugger or a framework support. These are different areas.
I'm mainly interested in features like an integration NetBeans with Firefox - Firebug. For example I use Firebug for "tuning" css and html, because it allows to change the code directly in Firefox and see the result instantly. Unfortunately there is no way how to save these changes back to the sources. If there will be a plugin, which can communicate with NetBeans, then there is bigger chance to save these changes. Sure it can not work in 100% cases, but still can be useful.
Also I have heard a requirement about refreshing a page in Firefox on save in NetBeans. I'm not sure how much people want this, because in this case there should be a mapping between the URL and the file. Or sometimes our users complain that always new tab is open, when they run project or a file. With such integration it would be possible that NetBeans will be able to work only with one tab in Firefox. Or integrate few features from YSlow directly in NetBeans.
Another thing is compressing CSS and JavaScript files for production site. Do you compress CSS and JavaScript files? If yes, how NetBeans could help you with this task?
I don't want to express here everything what is in my head. It would be better to here it from you. What will be useful for you? Please, mentioned the things, which can significantly simplify the workflow and save your time.
Thanks for your time.
