public ReplAsyncCompletionCommitManager(ReplRemoteCompletionBroker broker, ITextView textView)
        {
            _broker   = broker;
            _textView = textView;

            var serverCommitTriggerCharacters = broker.GetCompletionCommitCharacters(textView.TextBuffer.ContentType)
                                                .Concat(broker.GetCompletionTriggerCharacters(textView.TextBuffer.ContentType));

            // completion characters returned from the language server are given as an array of strings. This converts the
            // string[] into a IEnumerable<char> by taking the first letter of each string and ommiting empty strings.
            PotentialCommitCharacters = serverCommitTriggerCharacters
                                        .Select(value => value.FirstOrDefault())
                                        .Where(c => c != default(char))
                                        .Concat(typicalDimissChars);
        }
Ejemplo n.º 2
0
 public ReplAsyncCompletionSource(ReplRemoteCompletionBroker broker, ITextView textView, ITextStructureNavigatorSelectorService textStructureNavigatorSelectorService)
 {
     _broker           = broker;
     _textView         = textView;
     _navigatorService = textStructureNavigatorSelectorService;
 }