Tuesday Sep 30, 2008

Formatting settings per project

There is new feature in NetBeans 6.5 that you can set up formatting settings per project. In previous releases there used to be only one formatting setting for whole IDE. Now you can work on several projects with different formatting. Or even better, you can share the settings with the whole team because it is saved in the nbproject/project.properties file of your project. This file is versioned by your version control system as it is part of the project.

If you want to set the "setting for specific project":
  • Open Project properties
  • Click Formating category
  • Select the "Use project specific options" radio button
  • Don't forget to click OK when closing the dialog to save the settings ;)
setting for specific project


Samle of properties that appears in your project.properties
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs=true
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width=4
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab=4
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.tab-size=4
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width=80
auxiliary.org-netbeans-modules-editor-indent.CodeStyle.usedProfile=project
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.classDeclBracePlacement=NEW_LINE
auxiliary.org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs=true
Note: this is available from NetBeans 6.5!
About

Team blog of NetBeans Core and Platform Quality Assurance team

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today