CFEclipse Tip: Linked Resources

  • Post author:
  • Post category:Uncategorized

A lot of CFEclipse users use the File Explorer View to work with all their files. I, on the other hand, prefer to use Eclipse’s projects. I like them because they allow you to encapsulate things into organized “packages”. You can create projects that point to locations all over your file system (or even network locations), and then you will always have easy access to them. Also, Eclipse offers a simple history for files you’ve worked on, which allows you to go back to previous versions. So if you’re like me, you work with files in a local work space outside of your source code management system, and only upload “final” versions of files. Eclipse makes this scenario even nicer, because you get a built-in history for the local files you work on. If you delete a file, or make a massive amount of changes, you can always go back to previous versions.Today I learned something new about Eclipse. One thing that has always annoyed me about working with projects is that often times you need to access files that live outside of your defined Project root. You can always do File->Open and find the file, or use the File Explorer. But what if you need to access that file a lot, like if it’s an Application.cfc file, or an xml config file? Eclipse allows you to create Linked Resources, which are a way to “bring in” external files and folders to your project. To do this, right click on your project in the Navigator, and click on New. If you select either Folder or File, and then click Advanced, you are given the option to create a link to an external location. The Eclipse docs say that this is a hard link, so if you edit that file in one project, it will also be changed in any other projects that reference it (a good thing, imo).