Posted 18 years ago
by Actipro Software Support
- Cleveland, OH, USA

Feature Request Overview
Several customers have requested a feature where you would be able to specify a "header" and "footer" section of code that would not appear within the editor but would provide IntelliPrompt while editing.
So for instance, the parser would "think" you are editing this:When in reality, the only thing the end user sees in the editor is this:
Possible Solution #1
Add a HeaderText and FooterText property to the Document that is normally ignored. The semantic parser would have to be able to examine Document.HeaderText + Document.Text + Document.FooterText and adjust all its offsets by subtracting out the length of the HeaderText since that should be invisible to the end user.
Design problems with this implementation include:
1) Outlining (since it is based on the AST) will show containing namespace/class indicators. Would require some sort of workaround.
2) Error indicators that should be inserted in the header/footer regions would have to be filtered out.
3) Type/member drop-down list could not be used since it would show items in the header/footer regions. But in this scenario this is probably a non-issue.
Possible Solution #2
Add a mechanism to support hidden regions of text with SyntaxEditor. Place the header and footer text within hidden regions.
Design problems with this implementation include:
1) Line numbers will be off, but maybe could be corrected by using the Document.AutoLineNumberingBase property.
2) Auto-indent will be off since there will be { characters in the header text.
3) Outlining (since it is based on the AST) will show containing namespace/class indicators. Would require some sort of workaround.
Let's Get Your Feedback
Which solution do you think is better? And do you foresee any other issues with implementation of either? We think #1 would be easier to implement for this scenario. Let's hear from you!
Several customers have requested a feature where you would be able to specify a "header" and "footer" section of code that would not appear within the editor but would provide IntelliPrompt while editing.
So for instance, the parser would "think" you are editing this:
using System;
using MyNamespace;
namespace MyScripts {
void OnChange() {
// some more user code here
}
}
void OnChange() {
// some more user code here
}
Add a HeaderText and FooterText property to the Document that is normally ignored. The semantic parser would have to be able to examine Document.HeaderText + Document.Text + Document.FooterText and adjust all its offsets by subtracting out the length of the HeaderText since that should be invisible to the end user.
Design problems with this implementation include:
1) Outlining (since it is based on the AST) will show containing namespace/class indicators. Would require some sort of workaround.
2) Error indicators that should be inserted in the header/footer regions would have to be filtered out.
3) Type/member drop-down list could not be used since it would show items in the header/footer regions. But in this scenario this is probably a non-issue.
Possible Solution #2
Add a mechanism to support hidden regions of text with SyntaxEditor. Place the header and footer text within hidden regions.
Design problems with this implementation include:
1) Line numbers will be off, but maybe could be corrected by using the Document.AutoLineNumberingBase property.
2) Auto-indent will be off since there will be { characters in the header text.
3) Outlining (since it is based on the AST) will show containing namespace/class indicators. Would require some sort of workaround.
Let's Get Your Feedback
Which solution do you think is better? And do you foresee any other issues with implementation of either? We think #1 would be easier to implement for this scenario. Let's hear from you!
Actipro Software Support