Code Headers [message #191400] |
Thu, 01 February 2007 14:02 |
Eclipse User |
|
|
|
Originally posted by: erick.p.heberling.lmco.com
I'm trying to set up a code comment header that my team can use throughout
our projects through Rational Clearcase. The catch is that it this must
be generated as the first line of the source file, prior to package
declaration and import statements. I've tried using the Eclipse built in
file comment, but then whenever I package the source file, the package
shows before the header. Is there anything I can do get the header before
the package declarations?
Thank you,
|
|
|
Re: Code Headers [message #191424 is a reply to message #191400] |
Thu, 01 February 2007 14:15 |
Eclipse User |
|
|
|
Originally posted by: csae7511.uibk.ac.at
Hi,
See:
Window --> Preferences --> Java --> Code Style --> Code Templates.
Select "New Java files" from "Code".
Here it should be possible to enter your header.
Hope that helps,
Stefan
Erick schrieb:
> I'm trying to set up a code comment header that my team can use
> throughout our projects through Rational Clearcase. The catch is that
> it this must be generated as the first line of the source file, prior to
> package declaration and import statements. I've tried using the Eclipse
> built in file comment, but then whenever I package the source file, the
> package shows before the header. Is there anything I can do get the
> header before the package declarations?
>
> Thank you,
>
|
|
|
Re: Code Headers [message #191478 is a reply to message #191424] |
Thu, 01 February 2007 19:45 |
Eclipse User |
|
|
|
Originally posted by: erick.p.heberling.lmco.com
Stefan,
Thank you for your answer.
I am able to generate a header, however I have some very specific rules to
follow about the header being set before the package declarations.
When I try to set this through the preferences it places the package prior
to the header.
Thanks,
|
|
|
Re: Code Headers [message #191495 is a reply to message #191478] |
Thu, 01 February 2007 20:41 |
Eclipse User |
|
|
|
Originally posted by: csae7511.uibk.ac.at
Hmm ... strange - I tried following template for "New Java files":
/*preheader*/
${filecomment}
${package_declaration}
${typecomment}
${type_declaration}
Results to following java file:
/*preheader*/
package core;
import java.util.List;
public class Test
{
....
}
Wasn't this you wanted to have or did I misunderstand you?
Regards,
Stefan
Erick schrieb:
> Stefan,
>
> Thank you for your answer.
> I am able to generate a header, however I have some very specific rules
> to follow about the header being set before the package declarations.
> When I try to set this through the preferences it places the package
> prior to the header.
>
> Thanks,
>
|
|
|
Powered by
FUDForum. Page generated in 0.03176 seconds