Eclipse Tip of the Day: Linked Files and Folders
Here's a tip that I learned from my coworker Dmitry last night. I needed to mimic the dev environment they have here at work, but I wanted to do it in Eclipse since they use another older tool (Kawa). However, their dev system utilizes a shared folder with compiled classes so that each developer doesn't have to try to compile the monster 7,000+ files every time.
I was trying to figure out how to duplicate this and going on about how Eclipse limits you to developing within a project, when Dmitry pointed out that you can virtually "link" a folder or file to a resource outside of the project folder. This is great! It really clears up my last big complaint about Eclipse!!
It's super-simple to do. Just create a file or folder in your project as per normal (choose File->New->Folder), give it a name, and click on the Advanced button. This reveals a file-choose field where you can browse for the resource you want to "virtually" include in the project. When you say okay, the file you named is now linked outside of the project. Very sweet. There's even an option in Windows -> Preferences -> Workbench -> Label Decorations where you can make the icon of the linked resource show that it is in fact linked and not included in the project (it puts a little chain icon on it).
I never realized this was there before - maybe it's in the latest builds of Eclipse? I'm using last version - RC2 I think.
The only thing that does sort of suck is that you have to tell your Ant build scripts where your linked project files are now, becuase it's not included in the "magic". That's not a huge deal - but it could conceivably lead to problems if you're not careful. I.E. everything builds fine in the IDE, but from the command line, no.
Very cool. Thanks for the tip, D!