Posted 17 years ago by Alex
Version: 4.0.0246
Avatar
I have a class which I show in the editor. What is the best way to programatically add a method to this class. Can I use the Ast in the Document.SemanticParseData for that?
Or I will need juat to add it into the Document.Text? In this case how I can tedetmin the proper position to add and how can I keep correct indentation?

Thanks,
Alex

Comments (1)

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Alex,

The AST doesn't modify the document so you would have to use Document.InsertText to insert the text in the appropriate spot. Now you could use the compilation unit AST to find the offset of various members within the document.

Also for indentation, each DocumentLine has IndentAmount and TabStopLevel properties which may help you.


Actipro Software Support

The latest build of this product (v24.1.0) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.