Dropbox + Eclipse = Awesome

Developing a side project is a lot of fun. I have been working on a pet project for a little while now and I have found the biggest slow down for my project is that I think of small changes, or major fixes, when I am away from my code. I have tried using USB thumbdrives, and even Amazon S3 to take my code with me, but it never fails I will forget to update the code, or forget to take the thumbdrive with me. Finally I have found a simple way to make it all work.

Dropbox, if you don’t know, is 2.0GB of free online storage with an integrate synchronization program. It works on all three of theĀ  major OSes (Windows, Mac, and Linux). You simply have to have internet access to use Dropbox anywhere you can install the application. This played a huge roll in my scheme for taking my code with me.

Basically what I have done is simple setting up Dropbox as my workspace for Eclipse. Let me show you what I did. I simply installed Dropbox on my laptop at home. Then set my workspace for my pet project as my Dropbox folder. Here’s the steps I followed, and some screen shots to show what I did.

Step 1: Switch Workspaces. File -> Switch Workspace -> Other...

File > Switch Workspace > Other...

File > Switch Workspace > Other...

Step 2: Select your Dropbox directory and add "workspace" to the end of the path
Setting the Path to Dropbox + "workspace"

Setting the Path to Dropbox + "workspace"

This will cause Eclipse to restart, so it can load the new workspace. Step 3: Repeat these steps on your other machine (office, desktop, etc). The sync between machines will take a few minutes. The basic drive home from work should be long enough for the sync to take place. When you get home simply refresh the workspace, or file directory in Eclipse and you will be ready to work right where you left off on your project. With 2.0GB of free space you should have plenty of space to develop any project you may be working on. You can also share links to your public folder in Dropbox, so if you wanted to share some code files with a friend you can send them a link to your public folder.
    • s
    • March 1st, 2010

    you can also share whole folders. right click on subfolder in dropbox folder-> dropbox -> share this folder.
    and it got versioning, too.
    the only thing that prevents me from using it for collaboration like tortoise svn is a not so sophisticated check-out/check-in functionality.

    • Mike
    • April 29th, 2010

    Question…

    I am using eclipsePHP and have set my workspace to the dropbox folder, but I am having trouble running xampp to that workspace. I keep getting permission errors, any chance you also develop with eclipsePHP?

    Any advice you could contribute would be lovely.

    Mike

  1. Mike,

    The permissions problem you are referring too is pretty vague. Perhaps you can expand and tell me where the permissions problem is?

    You may have to adjust your permissions to be quite loose depending on what users/groups you have available on your machine. My work machine and my home machine use the same username, and groups. This makes it really easy to share my own files through dropbox as all files come through with the right permissions.

    • Alex
    • May 11th, 2010

    I have to agree, I’ve just recently discovered this and it’s amazing. Works great with pydev as well where I can configure all my interpreter paths and actually run right from out of my dropbox directories.

    May I also suggest Keepnote to go along with your setup? Truly exquisite!

    • Butters
    • May 27th, 2010

    Was doing the same thing for quite a while, with my /workspace/ only however, this can create consistency problems when working in other IDE plugins… eclipsePHP included, Force.com IDE etc…
    Reason is – these plug-ins write some settings metadata to the eclipse app directory instead of housing it in the workspace. To get around that, I have deployed the eclipse app and it’s respective workspaces’ inside of dropbox.
    This means you can only have eclipse open on one computer at a time (or else you run into permissions issues as well) but, the benefits far outweigh the disadvantage here.

    Thanks utah for blogging about this awesome use case for Dropbox…

  2. Hah, funny I should come across this: I just started using this to work on an Android project, sharing between (32-bit) WinXP and (64-bit) Linux. To my amazement, things fired right up on the first try.

    The one problem I ran into almost immediately, though, is that the Android ADB plugin needs to set the SDK location, which is stored in the workspace. On Linux, that’s /home/esm/android; on Windows, it’s Q:\Data\Android. :P

    I suspect this isn’t the only plugin that suffers from this problem; machine-specific paths are going to be a bit of a problem. In this case, I’m tempted to play with the new selective-sync feature to exclude the property files that are involved in this (.metadata/.plugins/org.eclipse.core.runtime/.settings/com.android.ide.eclipse.ddms.prefs and .metadata/.plugins/org.eclipse.core.runtime/.settings/com.android.ide.eclipse.adt.prefs, for the curious).

    • Randen
    • January 17th, 2011

    You need to install xampp into the dropbox folder so that you can run it from any machine. Just make sure you arent making simultaneous edits to database files because it will generate conflicts

  3. Hey guys i am trying to have multiple users work out of the dropbox folder but everytime a new user sets dropbox as there workspace a new .metatdata is created and i believe this is causing my workspace to come up blank anyone have any suggestions?

  4. You can create your workspace locally on your box, and then save the project into the DropBox folders. The only downside is that your workspace won’t transfer between machines, only the project itself.

  1. No trackbacks yet.