Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 186628 - A C++ project does not allow overriding global formatting per project
A C++ project does not allow overriding global formatting per project
Status: RESOLVED FIXED
Product: cnd
Classification: Unclassified
Component: Editor
6.x
All All
: P3 with 1 vote (vote)
: 7.4
Assigned To: Alexander Simon
issues@cnd
formatting
:
: 195118 211886 (view as bug list)
Depends on: 144579
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-24 19:54 UTC by daveyost
Modified: 2013-05-29 08:49 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
:


Attachments
This is partly implemented feature (248.00 KB, patch)
2013-03-01 20:28 UTC, Alexander Simon
Details | Diff
patch 2 (272.85 KB, patch)
2013-03-04 14:59 UTC, Vladimir Voskresensky
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description daveyost 2010-05-24 19:54:24 UTC
I have a C++ project.

http://blogs.sun.com/netbeansphp/entry/formatting_tabs_and_indents

leads me to hope that I should be able to set per-project formatting options. I can't see any way to do that in the UI, and I looked and looked.

This seems not to be implemented for C++ projects.
Comment 1 Alexander Simon 2010-05-24 20:18:27 UTC
There are no C/C++ project specific formatting options.
C/C++ formatting options "Override Global Options" overrides options for all languages:
- expand tabs to spaces
- number of spaces per indent
- tab size
Comment 2 daveyost 2010-05-24 22:10:44 UTC
I could not find any checkbox in my C++ project options that would let me  override the global options.
Comment 3 Alexander Simon 2010-05-25 05:29:49 UTC
Tools->Options->Editor->Formatting->C++
- check box "Override Global Options"
Comment 4 Vladimir Voskresensky 2010-05-25 08:00:03 UTC
I think it's about Formatting options in Project Properties (as for Java projects)
Comment 5 Vladimir Voskresensky 2011-02-07 08:43:23 UTC
*** Bug 195118 has been marked as a duplicate of this bug. ***
Comment 6 Alexander Simon 2012-05-02 17:18:46 UTC
*** Bug 211886 has been marked as a duplicate of this bug. ***
Comment 7 az.pengwang 2013-02-21 20:57:37 UTC
Java projects have this project-level coding style management feature already for years. Is there any plan to port it over in the future releases? It is an important feature for slaves (like me) who are working on many projects at a same time.
Comment 8 Alexander Simon 2013-02-22 06:57:49 UTC
(In reply to comment #7)
> Java projects have this project-level coding style management feature already
> for years. Is there any plan to port it over in the future releases? It is an
> important feature for slaves (like me) who are working on many projects at a
> same time.
Hi az.pengwang,

We are not planning to implement this enchantment because:
- bug has only one vote
- use case is not clear (it similar to the rarely used. For example: a) user work on bunch of company project and each project has own formatting style. I hardly believe in this scenario. b) user work on bunch of company projects with common formatting and for enjoying develops third part project with different formatting style.)

Alexander
Comment 9 balatka 2013-02-22 07:40:01 UTC
We really long for this feature. It's a very common scenario, when you work on a few C/C++ projects with different mandatory formatting. Especially the maintenance of legacy projects is typical.
Comment 10 Leonid Lenyashin 2013-02-22 17:08:49 UTC
(In reply to comment #8)

> 
> We are not planning to implement this enchantment because:
> - bug has only one vote
> - use case is not clear (it similar to the rarely used. For example: a) user
> work on bunch of company project and each project has own formatting style. I
> hardly believe in this scenario. b) user work on bunch of company projects with
> common formatting and for enjoying develops third part project with different
> formatting style.)
> 
> Alexander

I'm surprised to hear we are not planning this. There is no need to speculate about the use cases. I personally met a few customers who said they need this.
Typical case is maintenance of legacy code.
Comment 11 az.pengwang 2013-03-01 18:18:43 UTC
(In reply to comment #8)
> 
> We are not planning to implement this enchantment because:
> - bug has only one vote
> - use case is not clear (it similar to the rarely used. For example: a) user
> work on bunch of company project and each project has own formatting style. I
> hardly believe in this scenario. b) user work on bunch of company projects with
> common formatting and for enjoying develops third part project with different
> formatting style.)
> 
> Alexander

Hi Alex,

Then how many votes are needed to make this higher priority?

There are definitely more user cases are looking for this feature. I am typical user in your category "a". I am working on three different types of projects, one is firmware based on third parties' code, one is Linux, and the other is open source. They all have different coding style.

Regards,
Peng
Comment 12 soldatov 2013-03-01 19:04:44 UTC
(In reply to comment #11)
> There are definitely more user cases are looking for this feature. I am typical
> user in your category "a". I am working on three different types of projects,
> one is firmware based on third parties' code, one is Linux, and the other is
> open source. They all have different coding style.
> 
> Regards,
> Peng
Do you really commits nbproject/* into your VCS?
Comment 13 Leonid Lenyashin 2013-03-01 19:51:20 UTC
 
> Hi Alex,
> 
> Then how many votes are needed to make this higher priority?

> 
> Regards,
> Peng

Peng, no worry, my single vote is enough to make it happen ;-)
Comment 14 balatka 2013-03-01 19:59:02 UTC
looks like C++ development Heaven is approaching :)
Comment 15 az.pengwang 2013-03-01 20:09:46 UTC
keep fingers crossed:)
Comment 16 Alexander Simon 2013-03-01 20:28:01 UTC
Created attachment 132082 [details]
This is partly implemented feature

Probably Vladimir do it faster
Comment 17 Vladimir Voskresensky 2013-03-02 11:42:40 UTC
Alexander, thanks for the patch, you are really great!
Please, continue and I can help with blocker bug
Comment 18 Vladimir Voskresensky 2013-03-04 14:59:11 UTC
Created attachment 132155 [details]
patch 2

new version with some fixes in controllers
Comment 19 Alexander Simon 2013-05-23 15:06:13 UTC
fixed, change set:
http://hg.netbeans.org/cnd-main/rev/e1f4116ab840
Comment 20 Quality Engineering 2013-05-26 02:22:42 UTC
Integrated into 'main-golden', will be available in build *201305252300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e1f4116ab840
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixed Bug #186628 A C++ project does not allow overriding global formatting per project
Comment 21 Quality Engineering 2013-05-29 02:05:36 UTC
Integrated into 'main-golden', will be available in build *201305282301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b02684db5a37
User: Alexander Simon <alexvsimon@netbeans.org>
Log: additional fix Bug #186628 A C++ project does not allow overriding global formatting per project:
- hide id field
Comment 22 az.pengwang 2013-05-29 08:49:50 UTC
Thank you!!! Can't wait to give it a try:)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo