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 190599

Summary: C++ should have label alignment option
Product: cnd Reporter: flopper
Component: EditorAssignee: issues@cnd <issues>
Status: NEW ---    
Severity: normal CC: invcosine
Priority: P3    
Version: 7.1   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description flopper 2010-09-26 09:32:20 UTC
There should be a label alignment option. I don't like the jitter created by dedented labels and prefer them on the same column as all other code. The same for public/private/protected: and case labels in switch statements.
Comment 1 invcosine 2012-05-27 08:38:42 UTC
I think there is different styles. Which means options. I would prefer all labels to appear one level of indentation less than where it appears, such as Xcode (but I love netbeans!).

Xcode does this:
    {
        //...
        if (ret == EXIT_FAILURE)
        {
            fprintf(stderr, "error ...\n", );
            goto skip_over;
        }
        
    skip_over:
        // clean up memory
        return;
    }


Netbeans currently (7.1) does:

        {
            //...
            if (ret == EXIT_FAILURE)
            {
                fprintf(stderr, "error ...\n",);
                goto skip_over;
            }

skip_over:
            // clean up memory
            return;
        }

While writing/coding, pressing enter will keep the label inline with the rest of the code. Looking like this:

        {
            //...
            if (ret == EXIT_FAILURE)
            {
                fprintf(stderr, "error ...\n",);
                goto skip_over;
            }

            skip_over:
            // clean up memory
            return;
        }


Gee I hope the spaces come out in these samples.