This project has moved and is read-only. For the latest updates, please go here.
1
Vote

Property : Preserve hand-written text

description

Im missing a property to perserve, a hand-written / added text to a header

For Example

--Preserve-From-Here ---
my specific/hand-written/added later text for this header
--Preserve-To-Here ---

comments

MichaelKetting wrote Aug 20, 2015 at 8:16 PM

Hello Heinrich!

Are you thinking about text inside the license header or following the license header? In case it's comment text that should come in a comment block after the license header, you can simply use a blank line to separate the two.

Best regards, Michael

PS: We've just moved the project over to GitHub at https://github.com/rubicon-oss/LicenseHeaderManager so I'm just closing up shop on this issue tracker :)

HeinrichCodePlex wrote Aug 21, 2015 at 2:04 PM

Hi Michael,

I meant still adding automatically a file header, but preserving specific code blocks (like e.g. file change history etc. which is written manually).

Otherwise, I dont know what you mean with after the license header.

Greetings,

MichaelKetting wrote Sep 11, 2015 at 7:08 AM

Hi Heinrich!

Sorry about the delayed response, I just realized that the subscription settings are off.

Take the following example for a code file:

// Copyright
// Legalese ...
// Legalese ...
// Legalese ...
// History...
// History...

class MyClass
{
}

If your header looks like this, can simply add a blank line before starting the change history:

// Copyright
// Legalese ...
// Legalese ...
// Legalese ...

// History...
// History...

class MyClass
{
}

That way, only the first four lines will get updated via the LHM, stopping at the blank line. So, it depends on whether you need to put the change history in between other parts of the license header or right at the end. If you need to put it in-between, this looks like a discussion for GitHub on how to best express this in the syntax, etc and a pullrequest afterwards :)

Best regards, Michael