Posted 6 years ago by Dude4
Version: 12.2.0571
Avatar

I have a library that I only want to expose a sub set of the available methods to the editor's intelisense. Is there an attribute I can adorn my methods with to either exclude or include them into the list? If not how else can this be accomplished?

Comments (3)

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

Hello, yes you can use the [EditorBrowsable(EditorBrowsableState.Never)] attribute to prevent methods from showing.


Actipro Software Support

Posted 6 years ago by Dude4
Avatar

Yes but that makes them not appear in Visual Studio too. I have a need for all members to show in VS but only some make sense in the context of the SyntaxEditor control.

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

The other thing you could do is make your own class that inherits CSharp/VBCompletionProvider and register it on your CSharp/VBSyntaxLanguage as the original CSharp/VBCompletionProvider type (so that it overrides the default one).  Then override that class' OnSessionOpening method.  It fires before the completion session displays.  So you are able to remove items if you want.  Each session item's Tag will contain data related to what it is (ITypeDefinition, ITypeMemberDefinition, etc).


Actipro Software Support

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

Add Comment

Please log in to a validated account to post comments.