Aptana plug-in for Eclipse adds a lot of functionality for web developers inclusive of the FTP connection possibility. It also supports scripting ('Monkey Scripts'), which will be used in this solution:
/*
* Listener: commandService().addExecutionListener(this);
* Menu: Synchronize > Upload Current File On Save
* DOM: http://localhost/com.aptana.ide.syncing.doms
* DOM: http://download.eclipse.org/technology/dash/update/org.eclipse.eclipsemonkey.lang.javascript
*/
/**
* Returns a reference to the workspace command service
*/
function main() {}
function commandService()
{
var commandServiceClass = Packages.org.eclipse.ui.commands.ICommandService;
// same as doing ICommandService.class
var commandService = Packages.org.eclipse.ui.PlatformUI.getWorkbench().getAdapter(commandServiceClass);
return commandService;
}
/**
* Called before any/every command is executed, so we must filter on command ID
*/
function preExecute(commandId, event) {}
/* Add in all methods required by the interface, even if they are unused */
function postExecuteSuccess(commandId, returnValue)
{
// if we see a save command
if (commandId == "org.eclipse.ui.file.save")
{
sync.uploadCurrentEditor();
}
}
function notHandled(commandId, exception) {}
function postExecuteFailure(commandId, exception) {}
Now Eclipse will automatically upload every file after it's saved.