| Summary: | Unwanted new line and Tab after a function name 'set' | ||
|---|---|---|---|
| Product: | [Applications] kdevelop | Reporter: | Steven T. Hatton <hattons> |
| Component: | Astyle | Assignee: | kdevelop-bugs-null |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | rutger, tassilo |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
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? 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
*** Bug 91906 has been marked as a duplicate of this bug. *** *** Bug 115189 has been marked as a duplicate of this bug. *** 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 |
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.