/// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="DocumentProperties.Dispose"]/*' /> protected virtual void Dispose(bool disposing) { // If disposing equals true, dispose all managed // and unmanaged resources. if (disposing) { // Dispose managed resources. } this.tracker = null; this.mgr = null; }
protected DocumentProperties(CodeWindowManager mgr) { this.mgr = mgr; this.visible = true; if (mgr != null) { IOleServiceProvider sp = mgr.CodeWindow as IOleServiceProvider; if (sp != null) { ServiceProvider site = new ServiceProvider(sp); this.tracker = site.GetService(typeof(SVsTrackSelectionEx)) as IVsTrackSelectionEx; } } }
/// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="DocumentProperties.DocumentProperties"]/*' /> protected DocumentProperties(CodeWindowManager mgr) { this.mgr = mgr; this.visible = true; if (mgr != null) { IOleServiceProvider sp = mgr.CodeWindow as IOleServiceProvider; if (sp != null) { ServiceProvider site = new ServiceProvider(sp); this.tracker = site.GetService(typeof(SVsTrackSelectionEx)) as IVsTrackSelectionEx; } } }
internal ViewFilter(CodeWindowManager mgr, IVsTextView view) { this.pvaChar = IntPtr.Zero; this.mgr = mgr; this.service = mgr.LanguageService; this.source = mgr.Source; this.commentSupported = this.service.Preferences.EnableCommenting; this.textView = view; NativeMethods.ThrowOnFailure(view.AddCommandFilter(this, out nextTarget)); this.textViewEvents = new NativeMethods.ConnectionPointCookie(view, this, typeof(IVsTextViewEvents)); if (this.service != null) { IVsExpansionManager emgr = this.service.Site.GetService(typeof(SVsExpansionManager)) as IVsExpansionManager; if (emgr != null) { int fBound; emgr.GetSnippetShortCutKeybindingState(out fBound); this.snippetBound = fBound == 0 ? false : true; this.expansionEvents = new NativeMethods.ConnectionPointCookie(emgr, this, typeof(IVsExpansionEvents)); } } }
public virtual void Dispose() { this.textView = null; this.service = null; this.nextTarget = null; this.textTipData = null; this.mgr = null; if (this.pvaChar != IntPtr.Zero) { Marshal.FreeCoTaskMem(pvaChar); pvaChar = IntPtr.Zero; } GC.SuppressFinalize(this); // REVIEW: Why this? }
internal void RemoveCodeWindowManager(CodeWindowManager m) { this.codeWindowManagers.Remove(m); }
internal void AddCodeWindowManager(CodeWindowManager m) { this.codeWindowManagers.Add(m); }
// Override this method if you want to insert your own view filter // into the command chain. internal virtual ViewFilter CreateViewFilter(CodeWindowManager mgr, IVsTextView newView) { return new ViewFilter(mgr, newView); }
// Override this method to create your own custom document properties for // display in the Properties Window when the editor for this Source is active. // Default is null which means there will be no document properties. internal virtual DocumentProperties CreateDocumentProperties(CodeWindowManager mgr) { return null; }
internal virtual void OnCaretMoved(CodeWindowManager mgr, IVsTextView textView, int line, int col) { if (mgr.DropDownHelper != null) mgr.DropDownHelper.SynchronizeDropdowns(textView, line, col); }
/// <include file='doc\CodeWindowManager.uex' path='docs/doc[@for="DocumentProperties.Dispose"]/*' /> protected virtual void Dispose(bool disposing) { // If disposing equals true, dispose all managed // and unmanaged resources. if (disposing) { // Dispose managed resources. } this.tracker = null; this.mgr = null; }