|
|
@ -51,7 +51,6 @@ namespace ICSharpCode.ILSpy.AddIn.Commands |
|
|
|
ThreadHelper.ThrowIfNotOnUIThread(); |
|
|
|
ThreadHelper.ThrowIfNotOnUIThread(); |
|
|
|
|
|
|
|
|
|
|
|
var document = owner.DTE.ActiveDocument; |
|
|
|
var document = owner.DTE.ActiveDocument; |
|
|
|
var selection = (EnvDTE.TextPoint)((EnvDTE.TextSelection)document.Selection).ActivePoint; |
|
|
|
|
|
|
|
var id = owner.Workspace.CurrentSolution.GetDocumentIdsWithFilePath(document.FullName).FirstOrDefault(); |
|
|
|
var id = owner.Workspace.CurrentSolution.GetDocumentIdsWithFilePath(document.FullName).FirstOrDefault(); |
|
|
|
if (id == null) |
|
|
|
if (id == null) |
|
|
|
return null; |
|
|
|
return null; |
|
|
@ -59,14 +58,6 @@ namespace ICSharpCode.ILSpy.AddIn.Commands |
|
|
|
return owner.Workspace.CurrentSolution.GetDocument(id); |
|
|
|
return owner.Workspace.CurrentSolution.GetDocument(id); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
EnvDTE.TextPoint GetEditorSelection() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
ThreadHelper.ThrowIfNotOnUIThread(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var document = owner.DTE.ActiveDocument; |
|
|
|
|
|
|
|
return ((EnvDTE.TextSelection)document.Selection).ActivePoint; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
protected override async void OnExecute(object sender, EventArgs e) |
|
|
|
protected override async void OnExecute(object sender, EventArgs e) |
|
|
|
{ |
|
|
|
{ |
|
|
|
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); |
|
|
|
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); |
|
|
|