Formatting and Indentation
As a result I have decided to look at this and to try to fix as many bugs as possible. Because there is not much time for NetBeans 6.8, I would like to ask you for help. I have created task in our Issuezilla, where you can put the cases, when formatting or indentation doesn't work correctly. If you don't have Issuezilla account and you don't want to create it, you can paste the cases here as a comment. A case should contain an example of the code before formatting / indentation and also the same code, but in the right form.
I can not promise that we can fix all these cases, but we will try as many as possible.
Thanks for your help.

Are new nightly builds broken or something? After some time netbeans uses almost 100% of cpu. You can't close it (you must kill it).
It happens on windows and linux (on two different symfony projects).
Posted by Michal on October 20, 2009 at 09:16 AM CEST #
I started using Netbeans 6.7.1 for Java ME and it drive my efficiency to zero.
with only one project loaded in the IDE the Memory usage goes upto 400+ MB and when the code file grow bit larger it takes full cpu even if i edit a line of code.
Visual Studio 2008 with 4-6 projects loaded at the same dont consume more than 300 MB.
I am running Core 2 duo 3 GHz with 2GB RAM
Posted by Yasir M Turk on October 20, 2009 at 09:41 AM CEST #
uhhhh, post with no pictures. Sad.
Posted by gaga on October 20, 2009 at 09:44 AM CEST #
To Michal:
File an issue, please. Thanks.
Posted by Tomas Mysik on October 20, 2009 at 10:10 AM CEST #
Task won't open (times out.) Why do the Continuation Indentation and Label Indentation options not work? If I change them, they are not saved, neither is the override for PHP
6.7.1.
Posted by Keith Davis on October 21, 2009 at 03:46 PM CEST #
Well, the link to the task is working...but very sloooow.
Posted by Keith Davis on October 21, 2009 at 03:51 PM CEST #
For me happens the same thing: after some time using netbeans 6.8 m2, it uses 100% of the CPU and the collapse.
6.8 has many good features that I love, but I have to go back to 6.7 until the CPU matter is fixed.
Thank for all
Posted by Jaime on October 21, 2009 at 06:38 PM CEST #
I found bad situation.
I have see autocompletion of jQuery in html and js files. But see non-jquery completion.
Please, fix this bug. And remove option from menu with old "external libraries".
Thanks!
Posted by Anton Danilchenko on October 23, 2009 at 09:51 PM CEST #
Hi guys.
Yesterday I installed NB 6.8 Beta (for PHP) and found bug related with Code Templates completion and formating.
I use Debian GNU/Linux 'lenny'.
Here is my steps:
1. Go to Tools->Options. Switch Editor section and next choose Code Templates tab.
2. Add new template.
I add template for PHP language. Set abbreviation: dump.
And for Expanded Text I set next ONE LINE:
echo '<pre>'; print_r(${cursor}); exit();
3. Save this template.
4. Go to editor and in .php file I type dump and immediately press TAB button.
Here is results:
echo '<pre>';
print_r(${cursor});
exit();
After each ";" symbol I see a new line. But my template contains only one line! without any line breaks.
I don't know where I can post this bug. Can anybody says where I can post this bug?
Sorry if I created offtop post.
Thank you.
Posted by Alexander Biryukov on October 25, 2009 at 08:35 PM CET #
This is issue of the formatter. When there is a template placed to the editor, then it's formatted. So probably we need to introduce new option in the formatter.
Posted by Petr Pisl on October 27, 2009 at 11:09 AM CET #
street light street light street light
Posted by street light on October 30, 2009 at 04:05 AM CET #
(1)
Other editors:
write line<ENTER>
| Cursor goes there
__write indented line<ENTER>
__| Cursor stays on indentation
<ENTER><TAB>
__| Cursor remembers indentation range
This feature would resolve the most problems, in my opinion.
(2)
You cannot set the "Number of Spaces per Indent" to Zero, so it is impossible to use a ind.-schemes like Whitesmiths/Banner Style.
(3)
A really imortant option would be: Disable PHPDoc-Syntax for multiple line comments. I really _hate it_, if my IDE forces me to use a asterisk in every line of my multiple line comment.
Posted by nik on October 31, 2009 at 03:59 PM CET #
just some comments:
I have add some custom code template for PHP templating in HTML file type.
such as:
<?php echo '${cursor}'; ?>
but the output turns out:
<?php echo '<CURSOR HERE>'
<LINEBRAK>; ?>
Just some formatting issue.
Posted by Snake on November 02, 2009 at 05:48 PM CET #
sorry, I just noticed that there is a similar report. at http://blogs.sun.com/netbeansphp/entry/formatting_and_indentation#comment-1256499312000
Posted by Snake on November 02, 2009 at 05:49 PM CET #
I created bug related with this problem
http://www.netbeans.org/issues/show_bug.cgi?id=175493
But I received answer that this is "a feature".
Posted by Alexander Biryukov on November 03, 2009 at 10:03 AM CET #
Nested code formatting breaks when Alt+Shift+F is pressed.
Example:
Before Alt+Shift+F:
$ar = array (
__array (
____'foo' => 'bar',
____'foo' => 'bar',
____array (
______'foo' => 'bar'
____)
__)
);
After Alt+Shift+F:
$ar = array (
__array (
__'foo' => 'bar',
__'foo' => 'bar',
__array (
__'foo' => 'bar'
__)
__)
);
Posted by Martin Vrkljan on November 05, 2009 at 08:40 PM CET #
I request for PHP Braces
currenly there are 3 option:
1. new line
2. same line
3. preserve existing
Zend framework have coding standard:
- new line for class and method
- same line for if, for, while, switch and other
i think this style must add to Netbean
thank you
regards
Posted by Agus Suhartono on November 12, 2009 at 01:54 AM CET #