GLBasic forum

Main forum => GLBasic - en => Topic started by: bigsofty on 2006-Apr-19

Title: Editor Request - Code Folding
Post by: bigsofty on 2006-Apr-19
Not an essential but my favourite feature of the Delphi IDE is Code Folding. This is the ablility to 'fold' a block of code into a code folded marker '...'

For example :-

Code (glbasic) Select
[-]FUNCTION PSprite: id, tile, width, height, x, y
LOCAL sx, sy, tx, ty, dx, dy
LOCAL p2x, p2y
LOCAL cols, c
    GETSPRITESIZE id, sx, sy
    cols = INTEGER(sx / width)
    tx = MOD(tile, cols) * width
    ty = INTEGER(tile/cols) * height
    c=RGB(255,255,255)

    width=width-1
    height=height-1
    STARTPOLY id
        POLYVECTOR x,      y       ,tx      ,ty       ,c
        POLYVECTOR x,      y+height,tx      ,ty+height,c
        POLYVECTOR x+width,y+height,tx+width,ty+height,c
        POLYVECTOR x+width,y       ,tx+width,ty       ,c
    ENDPOLY
ENDFUNCTION
Becomes...

Code (glbasic) Select
[+]FUNCTION PSprite: id, tile, width, height, x, y ...Browsing and arranging your code is a much easier afair.

As I said, not essential but I would love to see it in the editor. :)
Title: Editor Request - Code Folding
Post by: Kitty Hello on 2006-Apr-19
That's a lot of work and I personally do not use it ;) That's why there is a jump-bar on the right side, yo you have all the functions without additional text in between. I think I'll better use my time for other things, sorry. :)
Title: Editor Request - Code Folding
Post by: bigsofty on 2006-Apr-19
No problem Gernot, I understand :),

How is the compiler/debugger set for an external editor. Could I control the compiler/debugger from command line? Can I intercept errors/warrnings/messages?
Title: Editor Request - Code Folding
Post by: Kitty Hello on 2006-Apr-19
Oh. You'd better leave that. It's not designed this way and it would cause lots of trouble. Is this feature so important?
Title: Editor Request - Code Folding
Post by: bigsofty on 2006-Apr-20
No its not that important Gernot. I wrote a small Blitzbasic IDE a while back using Delphi, I thought it could be easy to modify it for GLB.
Title: Editor Request - Code Folding
Post by: Kitty Hello on 2006-Apr-28
The new update offers the possibility to remove jump marks from the list simply by writing an '@' infront of it. Get it and see if it helps you. V: 3.118
Title: Editor Request - Code Folding
Post by: bigsofty on 2006-May-01
A nice addition,

thank you Gernot.

Ian