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 232860

Summary: [74cat] Add options to control code formatting in complex templates specializations.
Product: cnd Reporter: kosmonaffft
Component: EditorAssignee: Alexander Simon <alexvsimon>
Status: CLOSED WONTFIX    
Severity: normal    
Priority: P3    
Version: 7.4   
Hardware: PC   
OS: Other   
Issue Type: DEFECT Exception Reporter:

Description kosmonaffft 2013-07-17 04:45:50 UTC
If i have complex template specialization, as example
any<
    mpl::vector<
        copy_constructible<>,
        typeid_<>,
        incrementable<>,
        ostreamable<>
    >
> x(10);

i cannot control spaces inside <> braces, so, after code reformatting i have this result:

any<
mpl::vector<
copy_constructible<>,
typeid_<>,
incrementable<>,
ostreamable<>
>
> x(10);

I think options for templates formatting will be helpful...
Comment 1 Alexander Simon 2016-07-08 13:49:51 UTC
It is impossible to implement it on lexer based formatter.
Comment 2 kosmonaffft 2016-07-08 15:24:46 UTC
Is it possible to not break existing formatting inside templates?
Comment 3 Alexander Simon 2016-07-08 15:43:10 UTC
(In reply to kosmonaffft from comment #2)
> Is it possible to not break existing formatting inside templates?
Formatter cannot understand that it is a template by using only lexer.
It can be safely implemented only on AST.