Setting File Header Content

General discussions about code engineering

Moderator: Moderators

Setting File Header Content

Postby brandon.gibson@lmco.com » Fri Jun 24, 2011 9:05 am

How do you set the file header content on a per file basis?

I know you can set global header content, but I need to add header information that is based on the file being generated.
brandon.gibson@lmco.com
Forum Beginner
Forum Beginner
 
Posts: 40
Posts Rating:0
Joined: Mon Aug 23, 2010 12:09 pm

Re: Setting File Header Content

Postby egiva » Mon Jun 27, 2011 3:51 am

Brandon,

File header could be created one for all files and it is generated only, when file is created for the first time. If a file is already created, header is taken from the source file.
Best Regards,
Egidijus Vaisnora
egiva
Customer Support
Customer Support
 
Posts: 37
Posts Rating:0
Joined: Tue Jan 05, 2010 6:32 am

Re: Setting File Header Content

Postby brandon.gibson@lmco.com » Mon Jun 27, 2011 8:26 am

I am not seeing this behavior in MagicDraw 17.0 SP2. I have reverse engineered a very large set of IDL files and the headers are not being repopulated on the output files.

Also, I need different headers on every file (with information like authors and revision numbers) not the same header on every file.
brandon.gibson@lmco.com
Forum Beginner
Forum Beginner
 
Posts: 40
Posts Rating:0
Joined: Mon Aug 23, 2010 12:09 pm

Re: Setting File Header Content

Postby egiva » Wed Jun 29, 2011 4:50 am

Brandon,

You can set header at Options-> Project-> Code engineering-> CORBA IDL Language options. There are supported following templates: $FILE_NAME, $AUTHOR, $DATE, $TIME. Unfortunately, but this header is generated every time for IDL. I thought we was talking about Java file. Java, comparing with IDL, supports round-trip. It means, Java engineering can analyze and preserve some source file parts from overwriting. Thus file header wouldn't be overwritten. IDL makes plane code re-generation only.
Best Regards,
Egidijus Vaisnora
egiva
Customer Support
Customer Support
 
Posts: 37
Posts Rating:0
Joined: Tue Jan 05, 2010 6:32 am

Re: Setting File Header Content

Postby brandon.gibson@lmco.com » Wed Jun 29, 2011 6:37 am

Okay, could the header for the files be stored in the description of the file type objects used for code generation by the IDL generator?
brandon.gibson@lmco.com
Forum Beginner
Forum Beginner
 
Posts: 40
Posts Rating:0
Joined: Mon Aug 23, 2010 12:09 pm

Re: Setting File Header Content

Postby egiva » Fri Jul 15, 2011 9:30 am

Could you specify more detail what you are attempting to do? Corba IDL code engineering do not support file header comment storing into UML at current time. Of course it could be stored, let say, in the UML component which is used to represent reversed IDL file (located under "File View" package). But this stored comment won't be emitted to the generated file.
Best Regards,
Egidijus Vaisnora
egiva
Customer Support
Customer Support
 
Posts: 37
Posts Rating:0
Joined: Tue Jan 05, 2010 6:32 am


Return to Code engineering

Who is online

Users browsing this forum: No registered users and 0 guests

cron