Posted 13 years ago by Kasper
Version: 3.1.0213
Platform: .NET 2.0
Environment: Windows XP (32-bit)
Avatar
Hi,

Please try the following, in the sample application:

- Language -> CSS
- Outlining -> Stop outlining
- Select the last block of CSS
- Outlining -> Hide selection

This will give a runtime error. Is there a quick workaround to fix this problem? I haven't tried anything my self, since I figured I better ask the expert(s) :). Should I simply add a null check for the ParseData property, or is that not enough?

Comments (1)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Thanks for the repro steps. Yes change all codebehind syntax language classes to check for a null ParseData like this in CssDynamicSyntaxLanguage:
public override void SetOutliningNodeCollapsedText(OutliningNode node) {
    if (node.ParseData != null) {
        switch (node.ParseData.Key) {
            case "Comment":
                node.CollapsedText = "/**/";
                break;
            case "PropertyBlock":
                node.CollapsedText = "{...}";
                break;
        }
    }
}
We'll update all the samples.


Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 7 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.