Board index » cppbuilder » code folding is buggy

code folding is buggy


2006-09-13 03:30:42 PM
cppbuilder40
Hello there!
Dont you ever guys get involved in situation when you see the code folding
is being frenzy? I experience it when inserting old BCB 5 files in my new
C++ builder 2006 project. Sometimes code folding correctly sets its marks
sometimes it doesnt. And apparently there is no visible work around to fix
it.
Strange...
p.s. bds+updates+hotfixes
Bewildered and puzzled,
Andrew.
 
 

Re:code folding is buggy

On Wed, 13 Sep 2006 11:30:42 +0400, "Andrew Fedoseev"
< XXXX@XXXXX.COM >wrote:
Quote
Dont you ever guys get involved in situation when you see the code folding
IIRC code folding and auto-bracing stopped working correctly for me
with Update 2. do you have second feature working?
--
Vladimir Ulchenko aka vavan
 

Re:code folding is buggy

"vavan" < XXXX@XXXXX.COM >???????/???????? ? ???????? ?????????:
Quote
On Wed, 13 Sep 2006 11:30:42 +0400, "Andrew Fedoseev"
< XXXX@XXXXX.COM >wrote:

>Dont you ever guys get involved in situation when you see the code folding

IIRC code folding and auto-bracing stopped working correctly for me
with Update 2. do you have second feature working?
these features seem to work badly in combination, when code-folding is out
of work you may encounter a misplaced brace when you enter new line.
Quote
--
Vladimir Ulchenko aka vavan
 

{smallsort}

Re:code folding is buggy

On Wed, 13 Sep 2006 12:06:30 +0400, "Andrew Fedoseev"
< XXXX@XXXXX.COM >wrote:
Quote
these features seem to work badly in combination, when code-folding is out
of work you may encounter a misplaced brace when you enter new line.
that's exactly my point, I had to turn off that very useful feature
after installed update 2. strangely for me nobody here noticed such
problems but looks like now I'm not the only one :)
--
Vladimir Ulchenko aka vavan
 

Re:code folding is buggy

"vavan" < XXXX@XXXXX.COM >???????/???????? ? ???????? ?????????:
Quote
On Wed, 13 Sep 2006 12:06:30 +0400, "Andrew Fedoseev"
< XXXX@XXXXX.COM >wrote:

>these features seem to work badly in combination, when code-folding is
>out
>of work you may encounter a misplaced brace when you enter new line.

that's exactly my point, I had to turn off that very useful feature
after installed update 2. strangely for me nobody here noticed such
problems but looks like now I'm not the only one :)
yeah now there are two of us :). As far as i know this little bug appears
only when migrating from old cpp sources. Still cant conceive the origin of
this problem, these cpp files are just plain text and nothing more.
Quote
Vladimir Ulchenko aka vavan
 

Re:code folding is buggy

On Wed, 13 Sep 2006 12:26:50 +0400, "Andrew Fedoseev"
< XXXX@XXXXX.COM >wrote:
Quote
only when migrating from old cpp sources. Still cant conceive the origin of
well, I think "old" cpp source cannot be the root of that problem on
its own but rather perhaps some syntax construction in it or its
includes. for me this trouble is in brand new bcb2006 project with
apparently no "old" sources included
Quote
this problem, these cpp files are just plain text and nothing more.
perhaps your files (or corresponding includes) are too complex for
their parser to comprehend :)
--
Vladimir Ulchenko aka vavan
 

Re:code folding is buggy

"vavan" < XXXX@XXXXX.COM >???????/???????? ? ???????? ?????????:
Quote
On Wed, 13 Sep 2006 12:26:50 +0400, "Andrew Fedoseev"
< XXXX@XXXXX.COM >wrote:

>only when migrating from old cpp sources. Still cant conceive the origin
>of

well, I think "old" cpp source cannot be the root of that problem on
its own but rather perhaps some syntax construction in it or its
includes. for me this trouble is in brand new bcb2006 project with
apparently no "old" sources included
Very strange, i must have been avoided this in my C++ 2006 projects.
Quote
>this problem, these cpp files are just plain text and nothing more.

perhaps your files (or corresponding includes) are too complex for
their parser to comprehend :)
:) looks like this.
Anyway, it is better to hear official version from Borland Team.
Quote
Vladimir Ulchenko aka vavan
 

Re:code folding is buggy

It starts to get on my nerves...
Where can i turn it off?
"Andrew Fedoseev" < XXXX@XXXXX.COM >сообщи?сообщила ?новостях следующе?
Quote
Hello there!
Dont you ever guys get involved in situation when you see the code folding
is being frenzy? I experience it when inserting old BCB 5 files in my new
C++ builder 2006 project. Sometimes code folding correctly sets its marks
sometimes it doesnt. And apparently there is no visible work around to fix
it.
Strange...


p.s. bds+updates+hotfixes

Bewildered and puzzled,
Andrew.

 

Re:code folding is buggy

just posted a screenshot (borland.public.attachments) for people who dont
believe it happens...
ths same piece of code written from scratch in a new unit causes no errors
in code folding...
"Andrew Fedoseev" < XXXX@XXXXX.COM >сообщи?сообщила ?новостях следующе?
Quote
Hello there!
Dont you ever guys get involved in situation when you see the code folding
is being frenzy? I experience it when inserting old BCB 5 files in my new
C++ builder 2006 project. Sometimes code folding correctly sets its marks
sometimes it doesnt. And apparently there is no visible work around to fix
it.
Strange...


p.s. bds+updates+hotfixes

Bewildered and puzzled,
Andrew.

 

Re:code folding is buggy

On Fri, 22 Sep 2006 09:53:49 +0400, "Andrew Fedoseev"
< XXXX@XXXXX.COM >wrote:
Quote
believe it happens...
let me assure you that I believe you :) I have the very same problem
and could post lots of very funny screenshots and actually I posted it
once in attachments group but I do not think this will change
something. finally I decided that it's just another feature amongst
the others borland wanted to implemented but failed to do it correctly
so I simply forgot about it, I do not need code-folding that much and
I can live without it. much worse for me that auto-bracing (which is
VERY useful feature indeed) also doesn't work
the funniest thing with code folding is that while it is obviously
broken and their parser gets stuck, another feature, highlighting of
{} braces when the cursor positioned on it, works just fine for me all
the time. unbelievable inconsistence
Quote
ths same piece of code written from scratch in a new unit causes no errors
in code folding...
this is very interesting observation. perhaps you should report it in
QC if you found some small source file which clearly demonstrates the
bug
--
Vladimir Ulchenko aka vavan
 

Re:code folding is buggy

i found the answer.
the problem is in include files.
i was testing it by deleteing and putting them back and found it affects
the code folding behavior. In my case i just deleted one include file
from the include list and this solved the whole problem. i do not understand
why Borland is so much interested in browsing include files while computing
the proper code folding ranges. I have to confess my code has problems with
cross including. I'm trying to get rid of it, but in big applications it
becomes really a pain in the @s#. Meanwhile, the ".h" file i deleted has no
problems with code folding. So as for now the only one reason this feature
gets screwed up, imho - is cross-including.
Why does compiler browse the inlude files when it comes to a code folding???
"vavan" < XXXX@XXXXX.COM >???????/???????? ? ???????? ?????????:
Quote
On Fri, 22 Sep 2006 09:53:49 +0400, "Andrew Fedoseev"
< XXXX@XXXXX.COM >wrote:

>believe it happens...

let me assure you that I believe you :) I have the very same problem
and could post lots of very funny screenshots and actually I posted it
once in attachments group but I do not think this will change
something. finally I decided that it's just another feature amongst
the others borland wanted to implemented but failed to do it correctly
so I simply forgot about it, I do not need code-folding that much and
I can live without it. much worse for me that auto-bracing (which is
VERY useful feature indeed) also doesn't work

the funniest thing with code folding is that while it is obviously
broken and their parser gets stuck, another feature, highlighting of
{} braces when the cursor positioned on it, works just fine for me all
the time. unbelievable inconsistence

>ths same piece of code written from scratch in a new unit causes no errors
>in code folding...

this is very interesting observation. perhaps you should report it in
QC if you found some small source file which clearly demonstrates the
bug

--
Vladimir Ulchenko aka vavan
 

Re:code folding is buggy

By "cross-including" do you mean that a header file gets included more than
once? If this is what you are talking about, then there is a very simple
solution to that.
Just bracket the text of the include file with:
#ifndef NAME
#define NAME
.
.
.
#endif
Where NAME is unique to each header file.
John
"Andrew Fedoseev" < XXXX@XXXXX.COM >wrote in message
Quote
i found the answer.
the problem is in include files.
i was testing it by deleteing and putting them back and found it affects
the code folding behavior. In my case i just deleted one include file
from the include list and this solved the whole problem. i do not
understand
why Borland is so much interested in browsing include files while
computing
the proper code folding ranges. I have to confess my code has problems
with
cross including. I'm trying to get rid of it, but in big applications it
becomes really a pain in the @s#. Meanwhile, the ".h" file i deleted has
no
problems with code folding. So as for now the only one reason this
feature
gets screwed up, imho - is cross-including.

 

Re:code folding is buggy

"John C." < XXXX@XXXXX.COM >сообщи?сообщила ?новостях следующе?
Quote
By "cross-including" do you mean that a header file gets included more
than once? If this is what you are talking about, then there is a very
simple solution to that.
Just bracket the text of the include file with:
#ifndef NAME
#define NAME
.
.
.
#endif
Where NAME is unique to each header file.
John
Thx, for the reply, John. It is being inserted by default. Nevertheless, you
still can get the linker variables duplicating errors while linking.
Quote
"Andrew Fedoseev" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>i found the answer.
>the problem is in include files.
>i was testing it by deleteing and putting them back and found it affects
>the code folding behavior. In my case i just deleted one include file
>from the include list and this solved the whole problem. i do not
>understand
>why Borland is so much interested in browsing include files while
>computing
>the proper code folding ranges. I have to confess my code has problems
>with
>cross including. I'm trying to get rid of it, but in big applications it
>becomes really a pain in the @s#. Meanwhile, the ".h" file i deleted has
>no
>problems with code folding. So as for now the only one reason this
>feature
>gets screwed up, imho - is cross-including.
>


 

Re:code folding is buggy

On Fri, 22 Sep 2006 06:56:43 -0500, "John C."
< XXXX@XXXXX.COM >wrote:
Quote
By "cross-including" do you mean that a header file gets included more than
the problem appears to be elsewhere since every header I use has
inclusion guard. at least I think so :)
--
Vladimir Ulchenko aka vavan
 

Re:code folding is buggy

On Wed, 13 Sep 2006 10:11:45 +0200, vavan < XXXX@XXXXX.COM >
wrote:
Quote
On Wed, 13 Sep 2006 12:06:30 +0400, "Andrew Fedoseev"
< XXXX@XXXXX.COM >wrote:

>these features seem to work badly in combination, when code-folding is
>out
>of work you may encounter a misplaced brace when you enter new line.

that's exactly my point, I had to turn off that very useful feature
after installed update 2. strangely for me nobody here noticed such
problems but looks like now I'm not the only one :)

No, I get it as well sometimes. It's probably related to the problem where
the IDE sends you to the wrong line when you double-click a compiler error,
it simply can't count very well ;)
As a workaround, inserting or deleting an empty line somewhere in the
source
usually helps.