Yesterday, I discussed how to use FTP from with CFEclipse. Its fairly easy, however, one issue is that you are editing files directly on the remote server, not the best solution in most cases. A few people have asked if there is a way to synch a local CFEclipse (or any other) project with a remote server via FTP (similarto the way Dreamweaver FTP sites work). I am happy to tell you that, yes, Virginia, there is a way to synch files on a remote server via FTP. A lot of this information was passed along by Phil Nacelli.
The first step is to create a new CFCeclispe project, in this example I named my new project 'FTP_synch'.
Next, right-click on the project and select 'Import'.
In the window that pops up, choose 'Other --> FTP'
If this is the first time you are importing into this directory (which in this example, we are), select the 'Choose a new folder to be imported' option.
Next we will need to specify what FTP 'site' to connect to. You can choose a connection that already exists, or create a new one. In this example, there are no other connections, so we choose to create a new one.
After clicking 'Next', fill out your FTP server information.
On the next screen, we specify what FTP directory to which we will synch our project. If you want to synch the entire FTP root, select the site, as shown below. (Kudos to anyone who can identify the directory structure below)
After selecting the directory and clicking 'Next', Eclipse will go out and connect to your server and generate a list of files/directories. On the next screen, you choose which files/directories you wish to 'import' into your project. In this example, we are grabbing all the files, so you can just select the top item.
Click 'Finish' and you will see that the files from the remote server are being downloaded to your project. When it is completed, all the files you selected from the site will be on your local system.
Now, for the really cool stuff, you need to open the 'Synchronize' view. To do this click 'Windows --> Show View --> Other'. From the window that pops up, choose 'Team --> Synchronize'
You will now have the 'Synchronize' tab opened in CFEclispe perspective. I am not sure where it will be, but in my install, the tab appeared in the bottom panel of tabs. Inside this view, you should see something similar to the picture below.
This will tell you which files locally have been modified sine you last synchronized, or uploaded.
Make a change to one of your files in your project, and it will automatically appear in this panel. In the image below, I added a CF comment to /www/index.cfm. To compare the differences between your local, and the remote file, right click the file and select 'Open in Compare Editor'
One thing to be careful of is the 'synchronize' option on the context menu. it doesn't act like you might think. All it really does is check the server to see what files have changed. To move your changes over, you need to either choose 'Upload' or 'Override and Uplaod' (or 'Override and Download' if files on the server changed). This is what will move files back and forth from the remote FTP location.
Once you upload, or download the files, you will notice that they disappear from the Synchronize View. The cool thing is that this view only shows files that are out of synch with the server, or that have been modified locally.
I know of quite a few people who have not made the full leap to CFEclipse because it could not mimic the behavior of Dreamweaver FTP sites. This shows that you can mimic this behavior, and maybe now others will start using CFEclipse all the time.
If we could edit Contribute templates, and have the changes propagate to files created with those templates, in CFEclipse, I could actaully uninstall Dreamweaver.