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 154590 - provide possibility to preserve user spaces on formatting
Summary: provide possibility to preserve user spaces on formatting
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 blocker with 1 vote (vote)
Assignee: Alexander Simon
URL:
Keywords:
Depends on: 133909 130923
Blocks:
  Show dependency tree
 
Reported: 2008-12-04 11:58 UTC by gautiery
Modified: 2010-02-26 08:31 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
console log when netbeans crahes 1 (41.49 KB, text/plain)
2009-07-01 13:00 UTC, gautiery
Details
console log when netbeans crahes 2 (42.01 KB, text/plain)
2009-07-01 13:01 UTC, gautiery
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gautiery 2008-12-04 11:58:27 UTC
I already posted a similar issue but it seems that it never was registered. 

My company enforces the use of spaces to make the code more readable. For instance  we can have the following alignment
for parameters  or variable declarations :

func1    (int a    , int b        , std::string& str);
funcLong (int aLong, int bVeryLong, int          c);
int         a;    // this is variable a
std::string str;  // this a string
 

when I indent it I obtain:

func1 (int a, int b, std::string& str);
funcLong (int aLong, int bVeryLong, int c);
int a; // this is variable a
std::string str; // this a string


Where all the white spaces are removed. It would be nice to let the user decide if he wants the editor to leave the
spaces in between words or not.
Comment 1 Petr Dvorak 2008-12-04 12:36:54 UTC
Hi,

your previous issue (issue 153271) was registered. It is in principle a duplicate of issue 128077 that is requesting
smarter indentation of individual lines (preserving spaces, aligning some typical constructs, etc.) so that groups of
lines can be read more easily.

We are certainly aware of the demand for this feature and we intend to implement it in some future release. Please vote
for issue 128077 to speed up the process a little.

With regards,

Petr Dvorak

*** This issue has been marked as a duplicate of 128077 ***
Comment 2 Vladimir Voskresensky 2008-12-04 14:39:28 UTC
Looks, like CND related
Comment 3 Petr Dvorak 2008-12-04 15:10:40 UTC
One thing to explain: The only reason why issue 128077 is not on the "editor>formatting and indentation" sub-component
is that there are 10 votes for the issue and reassigning would erase them all... Otherwise, the request to make
formatting smarter with respect to groups of code etc. is general - this is why I think this is duplicate of 128077. See
comments at issue 151456.
Comment 4 Vladimir Voskresensky 2008-12-04 16:21:43 UTC
I don't against if user will add one more vote for 128077 :-)
But it's really bad, if you consider issue to be general, while having it in "java->editor" component.
Anyway, if general editor will add support we can reuse it, until then we can implement own option in Formatting for C++
only to make C++ users happier.
So, let's leave it in CND cluster and make dependency on java's one
Comment 5 Petr Dvorak 2008-12-05 14:41:51 UTC
OK, perfect. Thank you for evaluation.

> But it's really bad, if you consider issue to be general, while having it in "java->editor" component.
I agree, but there is also the nasty bug with votes:(...
Comment 6 gautiery 2009-07-01 13:00:54 UTC
Created attachment 84239 [details]
console log when netbeans crahes 1
Comment 7 gautiery 2009-07-01 13:01:41 UTC
Created attachment 84240 [details]
console log when netbeans crahes 2
Comment 8 gautiery 2009-07-01 13:23:41 UTC
sorry these attachments are not related to this issue. Please, disregard them.

Thanks