Bug 89543 - Unwanted new line and Tab after a function name 'set'
Summary: Unwanted new line and Tab after a function name 'set'
Status: RESOLVED FIXED
Alias: None
Product: kdevelop
Classification: Applications
Component: Astyle (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
: 91906 115189 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-09-15 07:40 UTC by Steven T. Hatton
Modified: 2006-10-15 15:30 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steven T. Hatton 2004-09-15 07:40:08 UTC
Version:           3.1.0 (using KDE 3.3.0, SuSE)
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.5-7.108-default

In Coin3D (or, I assume any Open Inventor implementation) there are classes with a function called "set".  When I write 

set("material", "diffuseColor 1 1 0"); 

astyle reformats it to

set
      ("material", "diffuseColor 1 1 0");

In the same function, I have the expression

setPart("shape", new SoCone);

which remains formatted as shown.

I will add that "set" is displayed in black text whereas "setPart" is displayed in dark blue.  This indicates to me that aspell considers "set" to be a keyword.
Comment 1 Jens Dagerbo 2004-09-15 18:41:31 UTC
astyle doesn't do any highlighting, that's done by the editorpart (katepart?). Maybe I'm tired but I can't see why it would highlight "set" as a keyword. You are working with C++, right? 

Also, what formatting configuration are you using?
Comment 2 Nicolas Castagne 2005-03-14 11:34:00 UTC
This bug is also appearing with "set" keyword of the C++ STL, and as far as I know with all the "set" keywords (in Java, C#, etc.)

For example, when declaring a STL set of integer, as in : 
 
set <int> mySet ;
, the reformating tool gives : 
 
set
    <int> mySet;
Indeed, a new line and a tabulation is created... 
 
It seems to be related to astyle. Within astyle, "set" is a resevered keyword within astyle. Well, it should not...
Cf : http://www.kdevelop.org/phorum5/read.php?2,27113,27114#REPLY
Comment 3 Matt Rogers 2005-10-20 02:30:32 UTC
*** Bug 91906 has been marked as a duplicate of this bug. ***
Comment 4 Jens Dagerbo 2005-10-28 13:42:20 UTC
*** Bug 115189 has been marked as a duplicate of this bug. ***
Comment 5 Matt Rogers 2006-10-15 15:30:53 UTC
Fixed in the KDevelop 3.4 branch as part of this commit:

SVN commit 595657 by dymo:

Applied patch from Megan Webb:
Update to the astyle plugin to use astyle v1.19
Changes:
- layout of the formatting dialog has changed to mirror the astyle
command line options help.
- all options from commandline astyle can be set.
- interactive display of most options selected.
- tooltips for all options