[Gambas-user] Code Origami Mysteries
Benoît Minisini
gambas at ...1...
Tue Aug 23 15:49:42 CEST 2011
> Well, I'm flabbergasted! :-)
>
> I have just discovered the code folding in the gambas 3 IDE. (Yes, I
> know I'm slow. It comes with age. :-X )
Didn't you ask yourself what all these little arrows are? ;-)
>
> But two things have got me beat.
>
> 1. Is there a keyboard shortcut to collapse/expand the current folding
> region?
CTRL+ENTER and CTRL+SHIFT+ENTER
>
> 2. (A bit more mysterious!) I use a standard prototype for all my
> classes so I can remember where to find things (age again - memory span
> is about 5 milliseconds these days). It looks like this:
>
> '=================================================================
> '==== EVENT Declarations ====
> '=================================================================
>
> '=================================================================
> '==== Property Declarations ====
> '=================================================================
>
> '=================================================================
> '==== Local Property Variables ====
> '=================================================================
>
> '=================================================================
> '==== Local Variables ====
> '=================================================================
>
> '=================================================================
> '==== Special Methods ====
> '=================================================================
>
> '=================================================================
> '==== Public Methods ====
> '=================================================================
>
> '=================================================================
> '==== Private Methods ====
> '=================================================================
>
> '=================================================================
> '==== Event Handlers ====
> '=================================================================
>
> '=================================================================
> '==== Property Accessors ====
> '=================================================================
>
> and here is a picture of a sample class with all regions collapsed
> collapsed
Where ?
>
> Now, that is absolutely fantatistic!!!!!!
> But.
>
> Sometimes those header block comments are not shown. Here's an example,
> caused by including a blank line after the block comment:
> cant see some blocks
> Notice how the "Property Accessors" block comment is no longer visible.
>
> The mystery to me is:
>
> What are the rules that the IDE follows when folding code?
>
> cheers
> Bruce
>
Everything between two procedure limits is collapsed. So if your comments are
AFTER the procedure, they are collapsed with them. But not BEFORE.
Regards,
--
Benoît Minisini
More information about the User
mailing list