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 121127 - Provide separate options for anonymous inner classes
Summary: Provide separate options for anonymous inner classes
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker (vote)
Assignee: Dusan Balek
URL:
Keywords:
: 137875 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-11-04 20:38 UTC by Karthikeyan Rajeswaran
Modified: 2009-11-02 11:01 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karthikeyan Rajeswaran 2007-11-04 20:38:17 UTC
The options set in 'Tools | Options | Java Code' panel seems to affect both standalone classes and anonymous inner
classes. Sometimes this leads to strange indentation.

Please refer to the following threads on nbuser mailing list:
1. http://www.netbeans.org/servlets/ReadMsg?list=nbusers&msgNo=102909
   jonaqua wrote:
   I believe this is a bug in the auto-format stuff. When I run 
   auto-format (alt-shift-f) on a completely separate file it messes up 
   my anonymous action listeners:
         addButton.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
                 addButtonClicked();
             }
         });
   
   Is changed to the following when I press Alt-Shift-F:
         addButton.addActionListener(new ActionListener() {

                     public void actionPerformed(ActionEvent e) {
                         addButtonClicked();
                     }
                 });

2. http://www.netbeans.org/servlets/ReadMsg?list=nbusers&msgNo=98850
Comment 1 Jan Lahoda 2007-11-04 20:44:06 UTC
I also dislike the additional empty line - not sure if the best solution is to add more options, though.
Comment 2 Karthikeyan Rajeswaran 2007-11-04 20:48:47 UTC
More than the empty line, it is the extra tabs/spaces that is probably more annoying:
   http://www.netbeans.org/servlets/ReadMsg?list=nbusers&msgNo=102917
   ...I just opened NetBeans 6 Beta 1 and it's 'continuation indent' is set to 8
   yet it does not affect the anonymous inner classes....

Perhaps 'continuation indent' value should be ignored for anonymous inner classes.
Comment 3 Dusan Balek 2008-06-24 10:47:14 UTC
*** Issue 137875 has been marked as a duplicate of this issue. ***
Comment 4 Jan Becicka 2008-11-13 15:06:16 UTC
Will resolve later.
Comment 5 Quality Engineering 2009-11-02 11:01:57 UTC
NetBeans.org Migration: changing resolution from LATER to WONTFIX