В зависимости от важности, я бы написал простой плагин, чтобы справиться с этим.
EDIT:
Все, что вам действительно нужно сделать, это:
1) Создайте плагин из шаблонов с установкой RCP \ PDE Eclipse
2) Добавьте следующий код к вашему активатору ...
@Override
public void start( final BundleContext context ) throws Exception {
super.start( context );
plugin = this;
ICommandService commandService = (ICommandService)plugin.getWorkbench().getService( ICommandService.class );
commandService.addExecutionListener( new IExecutionListener() {
public void notHandled( final String commandId, final NotHandledException exception ) {}
public void postExecuteFailure( final String commandId, final ExecutionException exception ) {}
public void postExecuteSuccess( final String commandId, final Object returnValue ) {
if ( commandId.equals( "org.eclipse.ui.file.save" ) ) {
// add in your action here...
// personally, I would use a custom preference page,
// but hard coding would work ok too
}
}
public void preExecute( final String commandId, final ExecutionEvent event ) {}
} );
}