Arduino blog

Arduino blog

Arduino thinkering

This blog is about things I come by related to Arduino which I feel are inspiring/important/funny enough to write about.

Linking to example ino code

eclipse pluginPosted by Jan Wed, September 24, 2014 14:41:45
In my last post I mentioned I have added support for ino files to the plugin.
Now I took it a bit further.
To avoid having to copy the code from the project to the example folder of the library I now added support for linking to the example code (Like I do by default with the libraries).
This means that wen you change the code in the created project (that link to sample code) the actual code in the library folder will be changed exactly in the same way as you change code in libraries.
This makes it easier to maintain sample code as you do not have to copy or wonder whether you have copied the code.
Off-course this is a option you do not have to use.
Here you see that the files are linked.
When the sample code contains subfolders there will be links to the subfolders.

What are the drawbacks?
Normally when you link to libraries and you change the link to the hardware or the arduino IDE the project can be fixed by re-selecting the correct options. This is due to the fact that all links are relative to a "environment variable"
The links to the sample code are hard links to the root of your storage device. So moving things around will break the links.
I do not see this as a "bad thing" because the usage scenario I support is "adopt the sample code" which is a short time based scenario.

Note that this feature is only usefull when you want to update the sample code of a library. I advice not to use this feature if you do not have a version control system controlling your library code. I also advice to check in your latest version before making a project that links to the sample code.

  • Comments(0)//