GhostDoc Rules Customisation
Question asked by N K Holme - January 9 at 2:41 AM
Answered
Hi, I am new to customising GhostDoc. I am trying to customise the rules for the 'File Header Template' in order to add a section for requirements tracking which will be defined in xml format as below.
 
// <requirements>
// <requirement level="Software" type="Functional number="001">
//   TODO: requirement 1
// </requirement>
// <requirement level="Software" type="Functional number="002">
//   TODO: requirement 2
// </requirement>
// </requirements>
 
I have read and understood the GenerateSummaryText() method which I have copied as the basis of my <requirements> element. I am having trouble retaining previously defined requirements in the <requirements></requirements> element that I have previously defined (I think that Context.GetExistingTagText("requirements"); returns null).
 
Is this because GetExistingTagText only recognises a predefined set of tags?
Is there a good source of documentation with respect to the SubMain API?
Are there any recommended best practices for debugging the Rules?
 
Has anyone got examples/guidance as to how I can achieve this.
 
Thanks in advance
Keith Holme.
 

1 Reply

Reply to Thread
0
Serge B. Replied
Employee Post
Hi Keith,
 
The File Header template is different from all other templates in GhostDoc as it is doesn't have to be conformant to the XML Comment rules. And most often it isn't conformant for is a regular comment block.
 
Both GetNonGeneratedTags and GetExistingTagText do not work with the file argument type (file header template) as a protection for the malformed XML issue.
 
Thanks!
Serge Baranovsky
SubMain Software
(800) 936-2134

Reply to Thread