开发者

NetBeans "Last Modified:" template

Hopefully a simple question.

I've started using NetBeans for a new multi-developer PHP project I am working on. One thing I have noticed in scripts in the past is a section in the PHPDoc at the 开发者_开发问答top with something similar to

/**
 * PDO Database Configuration
 * Last Updated: %Date: 15/03/2011, 22:31:04 GMT (Tue 15th Mar 2011)%
 *
 * @author      lethalMango
 ...
*/

Is there a method to get that "Last Updated:" section to update automatically on save?

Cheers


As Melv says, a common way of doing is via the version control system. This is a better approach than relying on the IDE since it only needs setting up once server-side rather than on every client.

If you're using Subversion, you'd do this with properties.

Something like this, assuming yourfile.php has been added to svn:

svn propset svn:keywords "LastChangedDate" yourfile.php

Then add the string $LastChangedDate$ to the file, and every time the file is committed the keyword will be expanded to include the date.


I'm pretty sure Netbeans doesn't give you anything like that. I don't know of a plugin that gives you a hook to it either, but there are definitely ways of doing this sort of thing on versioning commits and/or in build tools, so that might be the best way to tackle it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜