Page 1 of 1

IDE Code Explorer settings

Posted: Sat Jan 17, 2015 2:21 pm
by Jerry Messina
Can any of the Code Explorer options be over-ridden for a single project (ie in the .sfp file) or do they always come from the registry?

I'm looking for a way to be able to turn on/off the 'Explore Includes' setting on a project-by-project basis.

Re: IDE Code Explorer settings

Posted: Sat Jan 17, 2015 3:33 pm
by David Barker
No, you cannot do that project by project - it's either on or off...

Re: IDE Code Explorer settings

Posted: Tue Jan 20, 2015 3:12 am
by Jon Chandler
Does "export includes" move all the files to the same directory? I was thinking it would be safest to collect all the files for archiving.

Re: IDE Code Explorer settings

Posted: Tue Jan 20, 2015 10:48 am
by Jerry Messina
Hi Jon

The setting I'm talking about is 'Explore includes', which you find by clicking the down arrow at the right hand side of the Code Explorer window menu bar.

With that enabled, it allows the Code Explorer to drill down into each of the 'include' files and expand the values in each of the files, and with it off the Explorer only expands stuff in the current file.

It's really handy to have it on, but I have a number of projects that have several hundred files in them and that causes the Explorer to freak out... I get 'out of memory' errors and the IDE crashes if I forget and open one of those projects with the setting enabled.

Re: IDE Code Explorer settings

Posted: Tue Jan 20, 2015 5:48 pm
by Jon Chandler
Thanks Jerry. I'll have to take a look to understand exactly what you're saying.

That brings me back to my original thought. If I have a project it its own folder, is there an easy way to import all the include files into that folder? If I'm archiving something, I may want to use all the original files, to prevent any updates breaking something in that code in the future. This would also be handy for those situations where an include file is coming from somewhere you don't expect.

Re: IDE Code Explorer settings

Posted: Tue Jan 20, 2015 6:34 pm
by Coccoliso
Hello Jon,
if you must use a "standard module" and the changes are related only to the project that is developing in my opinion the easiest way is just rename the file while keeping the name of the module and put it in UserLibrary.

Code: Select all

I2C.BAS               >      DeviceI2C.BAS
Module I2C                   Module I2C
Normally if you are using a standard module and changing it should already bring in UserLibrary then and if the changes are improvements or add new subs or functions only the programs that use them will be subject to these changes and it would not help even the name change.
Then to backup the whole environment is convenient to use SVN or something to possibly go back to the version you want pointing to the \Swordfish folder to copy the whole environment.

Re: IDE Code Explorer settings

Posted: Tue Jan 20, 2015 8:19 pm
by Jerry Messina
If I have a project it its own folder, is there an easy way to import all the include files into that folder?
If I'm archiving something, I may want to use all the original files
I think we all have different ways of handling this.

Personally, I put copies of ALL the files I use into the project folder and don't rely on any of the standard locations. That way I know I'll always have a copy of what I used to originally build it, which is more important to me than keeping the files up to date. If I ever dust it off later, it's my choice as to whether I want to update them or not.
This would also be handy for those situations where an include file is coming from somewhere you don't expect
After compiling, you can look in the project .IDF file. Right at the top there's a '.file' section that'll show you a list of what files it used. You could always cut and paste that into your favorite copy utility/bat file.

Re: IDE Code Explorer settings

Posted: Wed Jan 21, 2015 10:17 pm
by Jon Chandler
Thanks Jerry,

I had never looked at the IDF file before. The files used is great information to have - I've had a few cases where the files I was editing wasn't the file being used so this could be helpful.

Re: IDE Code Explorer settings

Posted: Thu Jan 22, 2015 8:36 am
by David Barker
VIEW...EDITOR OPTIONS, check "display full filename path in application title bar". Then use the explorer window to open an include file. That way you know (1) the actual file you see is being used by the main program and (2) the filename and path can be seen in the IDE at all times

Re: IDE Code Explorer settings

Posted: Thu Jan 22, 2015 12:18 pm
by Jerry Messina
Coccoliso made a good point too...
Then to backup the whole environment is convenient to use SVN or something to possibly go back to the version you want pointing to the \Swordfish folder to copy the whole environment.
If you really want to be able to recreate a project you'll probably need to have the same version compiler that was used originally. While it's usually always a good idea to be up to date compiler-wise (as the latest compiler may well have important fixes), you may want to be able to compare old results vs new, and for that you'll need the original compiler and not just the libraries.

Considering a standard compiler install sprinkles things in various locations these days (ie win7), how easy is it to do this with most SVN tools?

I'd check it out, but I've put my SF install "back together again" like it used to be all under one directory.

Re: IDE Code Explorer settings

Posted: Thu Jan 22, 2015 12:57 pm
by Coccoliso
Hello Jerry,
I actually also in SVN this folders :

Code: Select all

C:\ProgramData\Mecanique\Swordfish\Library
C:\Program Files (x86)\Mecanique\Swordfish
D:\Users\Coccoliso\Documents\Swordfish
and before performing an upgrade to a new SF version I learned to perform an SVN update of the SF folders.
In LOG write why upgrade the SVN version, and can return to a previous condition both for my sources and userlibrary with regard to the version of SF.
This way I can do a Diff between the new and previous SF library modules, understand what has changed and eventually bring changes.

Re: IDE Code Explorer settings

Posted: Thu Jan 22, 2015 8:22 pm
by Jon Chandler
Thanks David.