Browse Source

make InsertionContext mandatory for all AbstractInlineRefactorDialogs

pull/1/head
Siegfried Pammer 15 years ago
parent
commit
8068c5bf7f
  1. 4
      src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/AbstractInlineRefactorDialog.cs

4
src/AddIns/Misc/SharpRefactoring/Project/Src/Gui/AbstractInlineRefactorDialog.cs

@ -31,6 +31,9 @@ namespace SharpRefactoring.Gui
protected AbstractInlineRefactorDialog(InsertionContext context, ITextEditor editor, ITextAnchor anchor) protected AbstractInlineRefactorDialog(InsertionContext context, ITextEditor editor, ITextAnchor anchor)
{ {
if (context == null)
throw new ArgumentNullException("context");
this.anchor = insertionEndAnchor = anchor; this.anchor = insertionEndAnchor = anchor;
this.editor = editor; this.editor = editor;
this.context = context; this.context = context;
@ -134,7 +137,6 @@ namespace SharpRefactoring.Gui
deactivated = true; deactivated = true;
Element.Remove(); Element.Remove();
if (context != null)
context.Deactivate(null); context.Deactivate(null);
} }
} }

Loading…
Cancel
Save