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.
Different projects have different coding guidelines, so I think it would make sense if the settings for the editor (e.g. tabwidth) and the indention engine (spaces vs. real tabs, braces etc) could be bound to a project instead of beeing defined globally
Yes, file formatting settings should definitely be made project-specific rather than userdir-specific in the future. Will require new APIs (probably queries) understood by the editor; then projects will probably need to store this information in project.xml. (Or if there is no need to have different settings for files within the same project, the editor could use AuxiliaryConfiguration to store such information without the project's help - cannot then use the project customizer dialog, however.)
Please evaluate for feasibility in E. Of course, the current indentation engine semantics is so weak that it is barely worth sharing.
That is somewhat true :) But especially things like tab width and the usage of tabs is (at least for me) different for different projects/teams I work in. Currently I need to keep to userdirs around to support this...
Changing subcomponent to settings.
Dusane, are you working on this or have you got some other issue covering this for java editor? If so, please dupe this on it. Thanks
Until per project settings for formatter/editor are implemented it would suffice to provide 'Profile' drop-down for formatter/editor - just like in 'Fonts & Colors'.
I agree with nelchael that profiles would alleviate this issue.
*** Issue 53155 has been marked as a duplicate of this issue. ***
Per-project formatting settings for java have recently been added.
I'm using a current dev (daily) build. Where is the UI to configure the per-project formatting options? I can't find anything in the Options dialog or the project properties
Project properties -> Java Formatting -> Use project specific options. What project type are you in?
Its' a web application. For a standard Java application I can see "Java Formatting" node in the project properties.
Right, this only works for Java SE apps, and for the Java language, which is a great start, but is just one case of many. So I don't consider this fixed, reopening. Please please, think about how this should work *for all projects and all languages*, not just in one specific case. One specific question - how will this work when another language (e.g. Groovy or HTML) will want to add the capability to share formatting options for Groovy or HTML in J2SE project? Is it expected that "Groovy Formatting" and "HTML Formatting" categories will be added to the project customizer? Is there a UI spec that would count with this possibility? Thanks.
This is now working for any project type and/or language that provide appropriate registrations. For details see http://wiki.netbeans.org/EditorFormattingSettings.