public void VsTextViewCreated(IVsTextView textViewAdapter)
        {
            ITextView textView = AdapterService.GetWpfTextView(textViewAdapter);

            InsertMatchingCommandHandler CreateCommandHandler()
            {
                return(new InsertMatchingCommandHandler(textViewAdapter, textView, this));
            }

            textView.Properties.GetOrCreateSingletonProperty(CreateCommandHandler);
        }
        public void VsTextViewCreated(IVsTextView textViewAdapter)
        {
            IWpfTextView textView = AdapterService.GetWpfTextView(textViewAdapter);

            if (textView == null)
            {
                return;
            }

            Func <RustCompletionCommandHandler> createCommandHandler =
                () => new RustCompletionCommandHandler(textViewAdapter, textView, CompletionBroker);

            textView.Properties.GetOrCreateSingletonProperty(createCommandHandler);
        }
Exemplo n.º 3
0
        public void VsTextViewCreated(IVsTextView textViewAdapter)
        {
            IWpfTextView textView = AdapterService.GetWpfTextView(textViewAdapter);

            if (textView == null)
            {
                return;
            }

            textView.Properties.GetOrCreateSingletonProperty(() => new RustCompletionCommandHandler(textViewAdapter, textView, CompletionBroker));
            textView.Properties.GetOrCreateSingletonProperty(() => new RustCommentSelectionCommandHandler(textViewAdapter, textView));
            textView.Properties.GetOrCreateSingletonProperty(() => new RustF1HelpCommandHandler(textViewAdapter, textView));
            // TODO: also handle FormatDocument and GoToDefiniton here in a similar way
        }
Exemplo n.º 4
0
        public void VsTextViewCreated(IVsTextView textViewAdapter)
        {
            IWpfTextView textView = AdapterService.GetWpfTextView(textViewAdapter);

            if (textView == null)
            {
                return;
            }

            textView.Properties.GetOrCreateSingletonProperty(() => new RustCompletionCommandHandler(textViewAdapter, textView, CompletionBroker));
            textView.Properties.GetOrCreateSingletonProperty(() => new RustCommentSelectionCommandHandler(textViewAdapter, textView));
            textView.Properties.GetOrCreateSingletonProperty(() => new RustF1HelpCommandHandler(textViewAdapter, textView));
            textView.Properties.GetOrCreateSingletonProperty(() => new RustGoToDefinitionCommandHandler(ServiceProvider, textViewAdapter, textView));
            textView.Properties.GetOrCreateSingletonProperty(() => new RustPrettyPrintCommandHandler(textViewAdapter, textView));
        }