Posted 15 years ago by KC
Version: 4.0.0281
Avatar
I am calling the editor.document.language.formatdocument function and receiving the following error:

The language 'VB' needs to implement the 'FormatTextRange' method so that it can support code formatting.

What do I need to do? I thought the Dotnet addon would have already implemented what is needed.

Comments (4)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Sorry the .NET VB language doesn't implement a formatter at this time. You should always make sure your language's FormattingSupported property returns true before calling the FormatDocument method.

I believe the class lib documentation for FormatDocument has some info about that. In your scenario, the VB language will return false for that property.


Actipro Software Support

Posted 15 years ago by KC
Avatar
What about outlining? Does the DotNet addon support that for automatic outlining? I have the mode set to automatic and do not get the expand/collapse sections.
Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
KC,

Yes it fully supports automatic outlining. However the outlining is based on the semantic parsing results (the CompilationUnit that is parsed from the document).

So be sure you follow all the "Key Steps for Getting Started" in the main help topic of the add-on to get that working. My guess is that you didn't do all those, therefore semantic parsing may not be working correctly, and thus no outlining shows up.


Actipro Software Support

Posted 15 years ago by KC
Avatar
That wasn't the problem... but this was for some reason. After I removed this line it worked.
Me.Document.Language.AutomaticOutliningBehavior = AutomaticOutliningBehavior.PostSemanticParse
The latest build of this product (v24.1.0) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.