IDE Code Explorer settings

Discuss the Integrated Development Environment (IDE)

Moderators: David Barker, Jerry Messina

Post Reply
Jerry Messina
Swordfish Developer
Posts: 1245
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

IDE Code Explorer settings

Post by Jerry Messina » Sat Jan 17, 2015 2:21 pm

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.

User avatar
David Barker
Swordfish Developer
Posts: 1194
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Re: IDE Code Explorer settings

Post by David Barker » Sat Jan 17, 2015 3:33 pm

No, you cannot do that project by project - it's either on or off...

Jon Chandler
Registered User
Registered User
Posts: 167
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Re: IDE Code Explorer settings

Post by Jon Chandler » Tue Jan 20, 2015 3:12 am

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.
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

Jerry Messina
Swordfish Developer
Posts: 1245
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: IDE Code Explorer settings

Post by Jerry Messina » Tue Jan 20, 2015 10:48 am

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.

Jon Chandler
Registered User
Registered User
Posts: 167
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Re: IDE Code Explorer settings

Post by Jon Chandler » Tue Jan 20, 2015 5:48 pm

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.
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

User avatar
Coccoliso
Posts: 152
Joined: Mon Feb 17, 2014 10:34 am

Re: IDE Code Explorer settings

Post by Coccoliso » Tue Jan 20, 2015 6:34 pm

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.

Jerry Messina
Swordfish Developer
Posts: 1245
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: IDE Code Explorer settings

Post by Jerry Messina » Tue Jan 20, 2015 8:19 pm

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.

Jon Chandler
Registered User
Registered User
Posts: 167
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Re: IDE Code Explorer settings

Post by Jon Chandler » Wed Jan 21, 2015 10:17 pm

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.
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

User avatar
David Barker
Swordfish Developer
Posts: 1194
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Re: IDE Code Explorer settings

Post by David Barker » Thu Jan 22, 2015 8:36 am

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

Jerry Messina
Swordfish Developer
Posts: 1245
Joined: Fri Jan 30, 2009 6:27 pm
Location: US

Re: IDE Code Explorer settings

Post by Jerry Messina » Thu Jan 22, 2015 12:18 pm

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.

User avatar
Coccoliso
Posts: 152
Joined: Mon Feb 17, 2014 10:34 am

Re: IDE Code Explorer settings

Post by Coccoliso » Thu Jan 22, 2015 12:57 pm

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.

Jon Chandler
Registered User
Registered User
Posts: 167
Joined: Mon Mar 10, 2008 8:20 am
Location: Seattle, WA USA
Contact:

Re: IDE Code Explorer settings

Post by Jon Chandler » Thu Jan 22, 2015 8:22 pm

Thanks David.
Jon

Check out the TAP-28 PIC Application board at http://www.clever4hire.com/throwawaypic/

Post Reply