Пример #1
0
 /// <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;
 }
Пример #2
0
 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;
         }
     }
 }
Пример #3
0
 /// <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;
         }
     }
 }
Пример #4
0
 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));
         }
     }
 }
Пример #5
0
 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?
 }
Пример #6
0
 internal void RemoveCodeWindowManager(CodeWindowManager m)
 {
     this.codeWindowManagers.Remove(m);
 }
Пример #7
0
 internal void AddCodeWindowManager(CodeWindowManager m)
 {
     this.codeWindowManagers.Add(m);
 }
Пример #8
0
 // 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);
 }
Пример #9
0
 // 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;
 }
Пример #10
0
 internal virtual void OnCaretMoved(CodeWindowManager mgr, IVsTextView textView, int line, int col)
 {
     if (mgr.DropDownHelper != null)
         mgr.DropDownHelper.SynchronizeDropdowns(textView, line, col);
 }
Пример #11
0
        /// <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;
        }