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 46980 - Allow project specific editor/indention engine settings
Summary: Allow project specific editor/indention engine settings
Alias: None
Product: editor
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker with 8 votes (vote)
Assignee: Dusan Balek
Keywords: API
: 53155 (view as bug list)
Depends on:
Blocks: 41448
  Show dependency tree
Reported: 2004-08-06 22:45 UTC by tkellerer
Modified: 2008-11-03 20:20 UTC (History)
6 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description tkellerer 2004-08-06 22:45:23 UTC
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
Comment 1 Jesse Glick 2004-08-06 22:59:11 UTC
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.)
Comment 2 Jesse Glick 2004-09-28 15:49:57 UTC
Please evaluate for feasibility in E. Of course, the current
indentation engine semantics is so weak that it is barely worth sharing.
Comment 3 tkellerer 2004-11-15 09:16:13 UTC
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...
Comment 4 Roman Strobl 2004-12-07 13:53:21 UTC
Changing subcomponent to settings.
Comment 5 Vitezslav Stejskal 2008-01-10 13:00:10 UTC
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
Comment 6 nelchael 2008-03-16 23:16:44 UTC
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'.
Comment 7 rholmes 2008-03-28 07:11:37 UTC
I agree with nelchael that profiles would alleviate this issue.
Comment 8 Jesse Glick 2008-04-08 18:46:20 UTC
*** Issue 53155 has been marked as a duplicate of this issue. ***
Comment 9 Vitezslav Stejskal 2008-06-18 11:35:01 UTC
Per-project formatting settings for java have recently been added.
Comment 10 tkellerer 2008-06-18 12:22:00 UTC
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
Comment 11 Vitezslav Stejskal 2008-06-18 15:31:04 UTC
Project properties -> Java Formatting -> Use project specific options. What project type are you in?
Comment 12 tkellerer 2008-06-18 15:37:08 UTC
Its' a web application. 
For a standard Java application I can see "Java Formatting" node in the project properties.
Comment 13 Petr Jiricka 2008-06-18 16:27:39 UTC
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.
Comment 14 Vitezslav Stejskal 2008-11-03 20:20:36 UTC
This is now working for any project type and/or language that provide appropriate registrations. For details see