Jump to content
Ian Branch

A way to collapse Defines in the IDE??

Recommended Posts

Hi Team,

Is there some way or a tool that can/will collapse defines in the IDE?

i.e. {$IF defined(xxx) or defined(yyyy)}.....{$ENDIF} and {$IFDEF xxxx}.....{$ENDIF}

I have a large unit with multiple defines used by multiple apps, and it is sometimes difficult to be sure that I am not duplicating or adding defines where they don't need to be or shouldn't be.

 

Regards & TIA,

Ian

Share this post


Link to post

Not at this stage.  The unit has grown over time/years and needs to be rationalised.

The trouble is identifying the relevant/individual conditionals.

I found one piece of code where the entire procedure between begin & end was covered by a conditional conditional and then within it I found a repeat of the same conditional.

Hence the desire to collapse the conditional so I can readily see what is in what.

Share this post


Link to post

Sorry, I misread your OP. I thought you were trying to hide the define statements themselves, not the code inside these conditions.

Edited by angusj

Share this post


Link to post

Well, you could put the code you want collapsed in a {$REGION} because regions are collapsible. But that's a lot of extra work--and more lines of code.

Share this post


Link to post

Try running the unit through Pascal Analyzer Lite. It is quite likely that he will explain something to you.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×