In this recipe, we show how a Ruble command can be triggered when an editor saves its content. This allows for processing to occur immediately after the file has been saved.
In the snippet below, we register our command with the "execution listener". When that listener encounters an event with the "org.eclipse.ui.file.save" id, the command will be triggered. Inside the invocation block, we see that the context contains an "execution_listener" property, which is a hash of properties being sent with the event. All key/value pairs are emitted to the console. To perform your post-save processing, replace the CONSOLE.puts line with the appropriate code.
A script that takes the current file and makes a backup in a specific spot.