This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 120288 - code formatting/highlighting problems in NB 6.0
Summary: code formatting/highlighting problems in NB 6.0
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Source (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Rastislav Komara
Depends on:
Reported: 2007-10-28 13:26 UTC by sulthan
Modified: 2009-02-03 10:55 UTC (History)
0 users

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description sulthan 2007-10-28 13:26:38 UTC
Hello, today I installed NB 6.0 beta 2. I tried to setup the rules for automatic formatting of java sources and I 
found several issues:
1/ JavaExample in Fonts&Colors->Syntax is too simple. There should be fields (static & non-static), method calls 
(again static & non-static, constructors, public/protected/private members etc. The user cannot see how the code would 
look with the changes he has made. The only possibility is to save changes, close a file and open it again (no 
automatic update!)
2/ Java Code - blank lines cannot be used well. There are no settings for comments (blank line after/before), but the 
main problem for me is that it cannot be turned off. With blank lines formatting I cannot achieve code like this:

public static final int CONSTANT1 = 0;
public static final int CONSTANT2 = 1;
public static final int CONSTANT3 = 2;
   //after reformatting, this line is missing
private int attribute;

3/ Formatting of inline classes declaration - If I declare a class like this:
  container.add(new Canvas() {
      public void paint(Graphics g) {
The code is not indented properly. 
4/ Two variable declarations on the same line - I was trying to write this code:
  int i, j;
after reformatting it becomes:
  int i,
I didn't find a settings to change this behaviour.

With these issuses, I cannot use NB 6.0 and I have to stay with NB 5.5
Comment 1 Rastislav Komara 2009-02-03 10:55:54 UTC