How can I add a default header to my source files automatically in Eclipse?

后端 未结 2 1613
栀梦
栀梦 2021-01-30 06:35

I\'m trying to figure out how I can have a comment header automatically added to all new source files in my eclipse java project. I\'ve looked around but I haven\'t found a simp

2条回答
  •  忘掉有多难
    2021-01-30 07:08

    If you want to add your comment a the top of the file (to add a copyright header), give a try to Eclipse Copyright Generator. There is a wizard that ask you what you want to include. Therefore you can add every kind of comment header.

    After installation you get a new menu: Project > Apply Copyright....

    In the include files field enter *.java to reduce the set of files.

    see also this answer


    As indicated in the comments, there is an other tool provided by the Eclipse Fundation: Eclipse Copyright Tool (as part of their releng tools)

提交回复
热议问题