Quantcast
Channel: WE MOVED to github.com/nuget. This site is not monitored!
Viewing all articles
Browse latest Browse all 7612

Edited Unassigned: NuGet xml transforms should use the VS editor if the document is already open [3417]

$
0
0
xml/xdt transforms in NuGet use the file system, which leads to the 'would you like to reload this document' dialog. If you had pending changes in the editor, you have to either throw them away, or throw away whatever the transform did to your file. Since there's no editor integration, the result of the xml transform is based on what's saved on disk, not what the user has in the editor.

NuGet in VS can solve this by getting the text from the editor. By using the editor to perform the save (instead of the file system), you avoid having to reload the document, and get undo support.


For legal reasons I'm unable to submit a PR, but the following public interfaces of VS could get you started:

Use IVsRunningDocumentTable (from shell service provider) to find the document
The value pointed to by the docData parameter can be converted to an IVsTextBuffer
The IVsEditorAdaptersFactoryService (from mef) can convert IVsTextBuffer into the wpf-editor family of interfaces.

Viewing all articles
Browse latest Browse all 7612

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>