/// <summary> /// Handles the removal of an import directive. /// </summary> /// <param name="psiServices">The PSI services.</param> /// <param name="scope">The namespace scope.</param> /// <param name="usingDirective">The using directive to remove.</param> /// <param name="action">The action to perform to remove the directive.</param> public void HandleRemoveImport(IPsiServices psiServices, ICSharpTypeAndNamespaceHolderDeclaration scope, IUsingDirective usingDirective, Action action) { ICSharpTreeNode namespaceNode = usingDirective.GetUsedNamespaceNode(); if (namespaceNode == null) { Assertion.Fail("Only a namespace using can be removed."); } else { TreeTextRange range = namespaceNode.GetTreeTextRange(); HandleRemoveImportInternal(psiServices, scope, usingDirective, action, CSharpLanguage.Instance, range); } }