Synchronise files between Eclipse and FTP Site
I am currently coding with Eclipse PDT开发者_JS百科, and I need to synchronise the files on my workstation with the files on the FTP server.
I've installed RSE, but I can only download and edit files as far as I can see it. What I want to happen is when I hit save, the file is saved locally, and the file to be updated on the FTP site.
Any ideas of how I can achieve this?
Create an ant builder on your project. See this article about how to do that. The important things you should know after you read the article:
- You can use Ant FTP task to transfer the files.
- You can define properties given by the Eclipse platform to get project root, list of changed files, change type (add, modify, delete) and so on. Use them wisely. You will need project_loc, resource_loc and so on. See picture at end to see how to get other available variables that can be passed to the script.
- Tune your Ant script, since if it run for each file update, then it can be slow. If it is slow anyway, then you can create a builder plugin for eclipse, which is not so complicated. I created some before.
- Be prepared, that ant script can get not only one file as changed, but a list.
精彩评论