in Backend/Core/ForTea.Core/Psi/T4CSharpCustomModificationHandler.cs [251:284]
public void HandleRemoveStatementsRange(IPsiServices psiServices, ITreeRange treeRange, Action action)
=> action();
public ITreeRange HandleChangeStatements(IPsiServices psiServices, ITreeRange rangeBeforeChange,
Func<ITreeRange> changeAction, bool strict)
=> changeAction();
public void HandleChangeExpressionInStatement(IPsiServices psiServices, IStatement statement,
Action changeAction)
=> changeAction();
/// <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 = GetUsedNamespaceNode(usingDirective);
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);
}
}