如何更改Eclipse模板中使用的$ {user}变量的值 [英] How to change the value of ${user} variable used in Eclipse templates
问题描述
而不是硬编码默认的@author模板,我希望Eclipse使用用户的真实姓名取自帐户信息(在Linux中 - 但Windows解决方案也是欢迎的)。进入Eclipse配置的地方也是可以接受的,我也找不到正确的地方。
Instead of hardcoding the default @author template I would like Eclipse to use user's real name taken from account information (in Linux - but Windows solution is also welcome). Entering it somewhere into Eclipse configuration would be acceptable, too, alas I can't find the right place.
推荐答案
http://morlhon.net/blog/2005/09/07/eclipse-username/
似乎最好的办法是在命令行中重新定义java user.name变量,或者在eclipse安装中使用eclipse.ini文件根目录。这似乎适用于我:
It seems that your best bet is to redefine the java user.name variable either at your command line, or using the eclipse.ini file in your eclipse install root directory. This seems to work fine for me:
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Duser.name=Davide Inglima
-Xms40m
-Xmx512m
这篇关于如何更改Eclipse模板中使用的$ {user}变量的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!