views:

23

answers:

1

I am a PHP developer using Eclipse PDT. I would like a timestamp put automatically in my file headers whenever I save the file. Maybe as a replacement of a variable. Let's say I use this header in a file:

/**
 * ${filename}
 * ${timestamp}
 */

When I save the file I would this to be replaced with:

/**
 * Myfile.php
 * 4/20/2010 19:04
 */

It would also be ok if there is a macro that would add a line at the very beginning of the file just containing a timestamp.

Anybody with an idea?

Regards, George

A: 

There is none natively proposed by Eclipse (or Eclipse PDT), but you could add a language-agnostic plugin like AnyEdit tools, which proposes "on save" actions:

alt text

Since none of those actions are the one you are looking for, you can have a look at the source code and see how to extend those "On Save" actions to include what you are after.

VonC