We have covered almost every prominent aspect about the SourceHeader Updater window previously.
Now let us check on some little but nice non-obvious features. The Export and Import goes first.
Try to right click the mouse button within the Expected Header group box but outside of those editable fields and see what will come up.
A context menu will appear and it has two commands, Export and Import.
If the Export is pressed, the current Expected Header will be exported as an external file to the current user data roaming folder. The file name is RawSourceHeader.DAT and it is in XML format actually. It will look like the following if the Export button is pressed in this case:
<?xml version="1.0" encoding="utf-8"?>
<SourceHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Project>RevitAddinCS1</Project>
<Source>ExtApp.cs</Source>
<Description>The source file ExtApp.cs.</Description>
<Copyright>Copyright © Company, 2011. All Rights Reserved.</Copyright>
<Author>Author</Author>
<ExtraInfo>[email protected]</ExtraInfo>
<Date>2011-10-30</Date>
<History>
<Revision>v1.00, by Author, updated the source ExtApp.cs.</Revision>
</History>
</SourceHeader>
It is not recommended to manually create or modify the data file, but the widget will take it if nothing about the XML schema and the file name/location is broken.
Then when the Import button is pressed for another source file, the previously exported source Expected Header will be imported into the current Expected Header of the current source file depending on the options in the What to Import box:
It will save a lot of duplicate typing work as it is unlikely that some fields such as Copyright, Author, ExtraInfo, and Date elements will be different for different source files in a single project. The better thing is that the checked options will be kept for the life of the SourceHeader Updater session, so it saves some clicks one more time.
If readers think different about it or want something more, please feel free to comment.
The feature of assigning default values goes next.
Each field will be provided some good default value if the original Source Information Header has nothing for it.
The Project element defaults to the name of the current Visual Studio project; The Source certainly the file name; The Description follows the pattern ‘The source file <ABC>.cs.’ for C# source; The Copyright ‘Copyright © <Company>, <This Year>. All Rights Reserved. The Author the current user name; The ExtraInfo ‘<Author>@<Company>.COM’; The Date short name of today; the History ‘v1.00, by <Author>, updated the source <Source>.’.
If readers think different about it or want something more, please feel free to comment.
The resizing feature goes now.
As can be noticed, sometimes some fields are not long enough to hold the whole string such as the Copyright and the History in general. Do not worry. Resizing the window to make it wider solves the issue right away.
SourceHeader Updater of RevitAddinWidget can help review source information headers of all applicable source files in the current project of C#, VB.NET or C++ and update the headers conveniently and flexibly in a single central place.
Recent Comments