Jindent - Java Source Code Formatter http://www.jindent.com
 



title
5.6.2.2.4 Directives/Macros

Indent preprocessor directives

Indent preprocessor directives

Controls whether preprocessor directives are aligned to the first column or indented to the current block scope.


Do not indent peprocessor directives:

void·test()                             
{                                       
#ifdef
·_TEST                            
····cout·<<·"Test·is·enabled";          
#elif                                   
····cout·<<·"Test·is·disabled";         
#endif                                  
}                                       


Indent peprocessor directives to current block scope:

void·test()                             
{                                       
····#ifdef·_TEST                        
····cout·<<·"Test·is·enabled";          
····#elif                               
····cout·<<·"Test·is·disabled";         
····#endif                              
}                                       



Indent block within Begin- and End-macros

Indent block within Begin- and End-macros

Indents source code declared within preprocessor function calls which names starts with BEGIN and END.


Indentation of 4:

IMPLEMENT_DYNAMIC(CAddSourceDlg,·CDialog)
BEGIN_MESSAGE_MAP(CAddSourceDlg,
·CResizableDialog)
····ON_BN_CLICKED(IDC_RSRC,·OnBnClickedRadio1)
····ON_BN_CLICKED(IDC_RURL,·OnBnClickedRadio4)
····ON_BN_CLICKED(IDC_BUTTON1,·OnBnClickedButton1)
····ON_BN_CLICKED(IDOK,·OnBnClickedOk)  
END_MESSAGE_MAP()                       


Indentation of 0:

IMPLEMENT_DYNAMIC(CAddSourceDlg,·CDialog)
BEGIN_MESSAGE_MAP(CAddSourceDlg,
·CResizableDialog)
ON_BN_CLICKED(IDC_RSRC,
·OnBnClickedRadio1)
ON_BN_CLICKED(IDC_RURL,
·OnBnClickedRadio4)
ON_BN_CLICKED(IDC_BUTTON1,
·OnBnClickedButton1)
ON_BN_CLICKED(IDOK,
·OnBnClickedOk)      
END_MESSAGE_MAP()