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 228303 - project specific formatting should use current IDE settings as defaults
Summary: project specific formatting should use current IDE settings as defaults
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Settings (show other bugs)
Version: 7.4
Hardware: PC Mac OS X
: P2 normal (vote)
Assignee: Milutin Kristofic
Depends on:
Reported: 2013-04-05 21:16 UTC by athompson
Modified: 2015-11-13 18:02 UTC (History)
3 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description athompson 2013-04-05 21:16:25 UTC
It's very nice being able to specify project specific formatting options now. Thanks! But (there's always a "but") currently when you specify project specific settings (through the Project Properties dialog), the UI shows what appear to be Netbeans "clean install" settings instead of the current IDE-wide settings, so you have to change everything all over again. Since you generally only have to make a few tweaks on a per-project basis, it would be much more convenient if the dialogs started with your current IDE settings.

It appears that only settings that you actually change are stored in the project's metadata, so the ideal behavior when applying formatting would be to always start with the current IDE-wide settings, and then override the IDE-wide settings with those specified in the metadata. That way, any future change to IDE-wide settings is also reflected in projects with project specific settings, unless that specific changed setting was overridden in the project metadata.

If you really want to get fancy, you could indicate in the project specific version of the formatting UI which settings have been overridden by the project (perhaps by making their labels a different color) and provide an easy way to revert those settings back to the default (IDE-wide) values.
Comment 1 lopura 2015-11-11 12:01:54 UTC
I agree that a feature to "copy" global settings is needed.

I have quite a lot of changes in my global formatting settings. Now I start a new project, where I have to change a few minor things. The only way to do this (if I don't miss anything) is to go through the list of formatting styles and adjust every single one (again) and hope I don't forget one.

Even if the current global settings are not used as a starting point, it should be possible to copy/import the current global settings for this project and then make the required adjustments.
Comment 2 athompson 2015-11-13 18:02:31 UTC
(In reply to lopura from comment #1)

Hi lopura,

Fortunately there is a way to do something similar. I've created a "dummy" project and adjusted the formatting options within the project as I want them. Now for every new project I can use the "load from another project" setting to quickly get the options the way I want them and then make any further tweaks.

It would be nice if smarter functionality were in the IDE, but in the meantime this approach may be helpful, and it's a heck of a lot better than before the feature was added.