Esempio n. 1
0
 internal void Abort()
 {
     if (opened && action != null)
     {
         action.AbortCompoundAction();
         action = null;
         opened = false;
     }
 }
Esempio n. 2
0
 internal void Close()
 {
     if (opened && action != null)
     {
         action.CloseCompoundAction();
         action = null;
         opened = false;
     }
 }
Esempio n. 3
0
 internal CompoundViewAction(IVsTextView view, string description)
 {
     opened = false;
     action = (IVsCompoundAction)view;
     if (this.action == null)
     {
         throw new ArgumentNullException("(IVsCompoundAction)view");
     }
     NativeMethods.ThrowOnFailure(action.OpenCompoundAction(description));
     opened = true;
 }
Esempio n. 4
0
 internal void Abort()
 {
     if (opened && action != null)
     {
         action.AbortCompoundAction();
         action = null;
         opened = false;
         ResumeColorization(); // batch colorization
     }
 }
Esempio n. 5
0
 internal CompoundAction(ISource src, string description)
 {
     this.opened = false;
     this.src = src;
     this.action = (IVsCompoundAction)src.GetTextLines();
     if (this.action == null)
     {
         throw new ArgumentNullException("(IVsCompoundAction)src.GetTextLines()");
     }
     NativeMethods.ThrowOnFailure(action.OpenCompoundAction(description));
     this.opened = true;
     this.colorizer = src.GetColorizer();
     if (colorizer != null) colorizer.Suspend(); // batch colorization            
 }
Esempio n. 6
0
 /// <include file='doc\Source.uex' path='docs/doc[@for="CompoundActionBase.Close"]/*' />
 public virtual void Close()
 {
     if (opened && action != null) {
         int hr = action.CloseCompoundAction();
         if (!VSErrorHandler.Succeeded(hr)) {
             Trace.WriteLine("CloseCompoundAction failed!");
         }
         action = null;
         opened = false;
     }
 }