int IVsFindTarget.GetCapabilities(bool[] pfImage, uint[] pgrfOptions) { IVsFindTarget vsFindTarget = GetView(sourceFrame) as IVsFindTarget; if (vsFindTarget != null) { return(vsFindTarget.GetCapabilities(pfImage, pgrfOptions)); } if (pfImage != null && pfImage.Length > 0) { pfImage[0] = true; } if (pgrfOptions != null && pgrfOptions.Length > 0) { pgrfOptions[0] = (uint)__VSFINDOPTIONS.FR_ActionMask; pgrfOptions[0] |= (uint)__VSFINDOPTIONS.FR_SyntaxMask; pgrfOptions[0] |= (uint)__VSFINDOPTIONS.FR_CommonOptions; pgrfOptions[0] |= (uint)__VSFINDOPTIONS.FR_Selection; pgrfOptions[0] |= (uint)__VSFINDOPTIONS.FR_Backwards; } return(VSConstants.S_OK); }
int IVsFindTarget.MarkSpan(TextSpan[] pts) { IVsFindTarget findTarget = GetView(sourceFrame) as IVsFindTarget; if (findTarget != null) { return(findTarget.MarkSpan(pts)); } return(VSConstants.E_NOTIMPL); }
protected override void OnCreate() { _window = _componentModel.GetService <IInteractiveWindowFactoryService>().CreateWindow(_evaluator); _window.SubmissionBufferAdded += SubmissionBufferAdded; _textViewHost = _window.GetTextViewHost(); var viewAdapter = _editorAdapters.GetViewAdapter(_textViewHost.TextView); _findTarget = viewAdapter as IVsFindTarget; _commandTarget = viewAdapter as IOleCommandTarget; }
public void SetFindTarget(object findTarget) { IVsFindTarget ft = (findTarget as IVsFindTarget); if (null == ft) { throw new ArgumentNullException("findTarget"); } _instance.SetFindTarget(ft); }
int IVsFindTarget.NotifyFindTarget(uint notification) { IVsFindTarget findTarget = GetView(sourceFrame) as IVsFindTarget; if (findTarget != null) { return(findTarget.NotifyFindTarget(notification)); } return(VSConstants.S_OK); }
int IVsFindTarget.SetFindState(object pUnk) { IVsFindTarget findTarget = GetView(sourceFrame) as IVsFindTarget; if (findTarget != null) { return(findTarget.SetFindState(pUnk)); } return(VSConstants.E_NOTIMPL); }
int IVsFindTarget.GetMatchRect(Microsoft.VisualStudio.OLE.Interop.RECT[] prc) { IVsFindTarget findTarget = GetView(sourceFrame) as IVsFindTarget; if (findTarget != null) { return(findTarget.GetMatchRect(prc)); } return(VSConstants.E_NOTIMPL); }
int IVsFindTarget.GetSearchImage(uint grfOptions, IVsTextSpanSet[] ppSpans, out IVsTextImage ppTextImage) { IVsFindTarget findTarget = GetView(sourceFrame) as IVsFindTarget; if (findTarget != null) { return(findTarget.GetSearchImage(grfOptions, ppSpans, out ppTextImage)); } ppTextImage = null; return(VSConstants.E_NOTIMPL); }
int IVsFindTarget.Find(string pszSearch, uint grfOptions, int fResetStartPoint, IVsFindHelper pHelper, out uint pResult) { IVsFindTarget findTarget = GetView(sourceFrame) as IVsFindTarget; if (findTarget != null) { return(findTarget.Find(pszSearch, grfOptions, fResetStartPoint, pHelper, out pResult)); } pResult = (uint)__VSFINDRESULT.VSFR_NotFound; return(VSConstants.E_NOTIMPL); }
int IVsFindTarget.GetProperty(uint propid, out object pvar) { IVsFindTarget findTarget = GetView(sourceFrame) as IVsFindTarget; if (findTarget != null) { return(findTarget.GetProperty(propid, out pvar)); } pvar = null; return(VSConstants.E_NOTIMPL); }
int IVsFindTarget.GetFindState(out object ppunk) { IVsFindTarget findTarget = GetView(sourceFrame) as IVsFindTarget; if (findTarget != null) { return(findTarget.GetFindState(out ppunk)); } ppunk = null; return(VSConstants.E_NOTIMPL); }
int IVsFindTarget.NavigateTo(TextSpan[] pts) { // do we need to activate/show window here first? IVsFindTarget findTarget = GetView(sourceFrame) as IVsFindTarget; if (findTarget != null) { return(findTarget.NavigateTo(pts)); } return(VSConstants.E_NOTIMPL); }
int IVsFindTarget.Replace(string pszSearch, string pszReplace, uint grfOptions, int fResetStartPoint, IVsFindHelper pHelper, out int pfReplaced) { IVsFindTarget findTarget = GetView(sourceFrame) as IVsFindTarget; if (findTarget != null) { return(findTarget.Replace(pszSearch, pszReplace, grfOptions, fResetStartPoint, pHelper, out pfReplaced)); } pfReplaced = 0; return(VSConstants.E_NOTIMPL); }
protected override void OnCreate() { _window = _componentModel.GetService <IInteractiveWindowFactoryService>().CreateWindow(_evaluator); _window.SubmissionBufferAdded += SubmissionBufferAdded; _textViewHost = _window.GetTextViewHost(); var textView = _textViewHost.TextView; textView.Options.SetOptionValue(EnableFindOptionName, true); AutomationProperties.SetName(textView.VisualElement, Caption); var viewAdapter = _editorAdapters.GetViewAdapter(textView); _findTarget = viewAdapter as IVsFindTarget; _commandTarget = viewAdapter as IOleCommandTarget; }
/// <summary> /// Cleans up an existing editor if we are about to put a new one in place, used to close down the old editor bits as well as /// nulling out any cached objects that we have that came from the now dead editor. /// </summary> private void ClearOldEditor() { if (this.codeWindow != null) { this.codeWindow.Close(); this.codeWindow = null; } if (this.textView != null) { this.textView.CloseView(); this.textView = null; } this.cachedEditorCommandTarget = null; this.cachedEditorFindTarget = null; this.invisibleEditor = null; }
protected override void OnCreate() { _replWindow.Initialize(); _adapterFactory = _replWindow.ComponentModel.GetService <IVsEditorAdaptersFactoryService>(); var textView = _replWindow.CurrentView; SetDefaultFontSize(_replWindow.ComponentModel, textView); // create adapters so VS is happy... var serviceProvider = (Microsoft.VisualStudio.OLE.Interop.IServiceProvider)GetService(typeof(Microsoft.VisualStudio.OLE.Interop.IServiceProvider)); _view = _adapterFactory.GetViewAdapter(textView); _findTarget = _view as IVsFindTarget; CurrentView.Closed += OnClose; _content = _replWindow.Content; }
protected override void OnCreate() { _replWindow.Initialize(); _adapterFactory = _replWindow.ComponentModel.GetService<IVsEditorAdaptersFactoryService>(); var textView = _replWindow.CurrentView; SetDefaultFontSize(_replWindow.ComponentModel, textView); // create adapters so VS is happy... var serviceProvider = (Microsoft.VisualStudio.OLE.Interop.IServiceProvider)GetService(typeof(Microsoft.VisualStudio.OLE.Interop.IServiceProvider)); _view = _adapterFactory.GetViewAdapter(textView); _findTarget = _view as IVsFindTarget; CurrentView.Closed += OnClose; _content = _replWindow.Content; }
internal void SetFindTarget(IVsFindTarget ft) { _findTarget = ft; _findTarget2 = ft as IVsFindTarget2; }
protected override void OnCreate() { _window = _componentModel.GetService<IInteractiveWindowFactoryService>().CreateWindow(_evaluator); _window.SubmissionBufferAdded += SubmissionBufferAdded; _textViewHost = _window.GetTextViewHost(); var viewAdapter = _editorAdapters.GetViewAdapter(_textViewHost.TextView); _findTarget = viewAdapter as IVsFindTarget; _commandTarget = viewAdapter as IOleCommandTarget; }
/// <summary> /// Cleans up an existing editor if we are about to put a new one in place, used to close down the old editor bits as well as /// nulling out any cached objects that we have that came from the now dead editor. /// </summary> internal void ClearEditor() { if (this.codeWindow != null) { this.codeWindow.Close(); this.codeWindow = null; } if (this.textView != null) { this.textView.CloseView(); this.textView = null; } this.cachedEditorCommandTarget = null; this.cachedEditorFindTarget = null; this.invisibleEditor = null; }