public ISmartIndent CreateSmartIndent(ITextView view)
        {
            var window = InteractiveWindow.FromBuffer(view.TextBuffer);

            if (window == null || window.CurrentLanguageBuffer == null)
            {
                return(null);
            }

            return(InteractiveSmartIndenter.Create(this.indentProviders, window.CurrentLanguageBuffer.ContentType, view));
        }
 /// <summary>
 /// Gets the interactive window associated with the text buffer if the text
 /// buffer is being hosted in the interactive window.
 ///
 /// Returns null if the text buffer is not hosted in the interactive window.
 /// </summary>
 public static IInteractiveWindow GetInteractiveWindow(this ITextBuffer buffer)
 {
     return(InteractiveWindow.FromBuffer(buffer));
 }