提交 458cce64 编写于 作者: A Allison Chou

If document is removed, execute as command temporarily

上级 e7c3dcd4
......@@ -100,12 +100,14 @@ internal class CodeActionResolveHandler : AbstractRequestHandler<LSP.VSCodeActio
var changes = applyChangesOperation.ChangedSolution.GetChanges(solution);
var projectChanges = changes.GetProjectChanges();
// TO-DO: If the change involves adding a document, execute via command instead of WorkspaceEdit
// until adding documents is supported in LSP: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1147293/
// After support is added, remove the below if-statement and add code to support adding documents.
// TO-DO: If the change involves adding or removing a document, execute via command instead of WorkspaceEdit
// until adding/removing documents is supported in LSP: https://devdiv.visualstudio.com/DevDiv/_workitems/edit/1147293/
// After support is added, remove the below if-statement and add code to support adding/removing documents.
var addedDocuments = projectChanges.SelectMany(
pc => pc.GetAddedDocuments().Concat(pc.GetAddedAdditionalDocuments().Concat(pc.GetAddedAnalyzerConfigDocuments())));
if (addedDocuments.Any())
var removedDocuments = projectChanges.SelectMany(
pc => pc.GetRemovedDocuments().Concat(pc.GetRemovedAdditionalDocuments().Concat(pc.GetRemovedAnalyzerConfigDocuments())));
if (addedDocuments.Any() || removedDocuments.Any())
{
codeAction.Command = SetCommand(codeAction.Title, data);
return codeAction;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册