1

Resolved

Can not reopen javascript files

description

Steps to reproduce:1.Create a code snippet of javascript file2.Click the link from the review replay window3.Close the file from visual studio4.Click again the link from the replay window - the file does not open.It can't be opened even from the visual studio itself.That's because an exception is raised .  According to the MS documentation http://msdn.microsoft.com/en-us/library/envdte.documents.open.aspxthe open command is not intended for public use, but only for internal.That's causing somehow a confusion in case of JavaScript file.I've searched further the documentation for a method that is allowed for public useand found it in the ItemOperations interface http://msdn.microsoft.com/en-us/library/envdte.itemoperations.openfile%28v=vs.100%29.aspx It does not return a document, but when a document is opened in the visual studio, it's being addedin the documents collections so all we need is to search it.I've done so and now my code works :)  Update 07 May 2012I've found the quoted code above on two other places.I'm attaching screenshots with the diff but I'm unable to delete the old screenshot.I've also changed that code a bit.

file attachments

comments

lyubobg wrote May 5, 2012 at 1:24 PM

Bug fix

wrote May 7, 2012 at 3:34 PM

wrote May 7, 2012 at 3:34 PM

wrote May 7, 2012 at 3:36 PM

lyubobg wrote May 7, 2012 at 3:36 PM

CodeElementLink.cs

wrote May 7, 2012 at 3:37 PM

lyubobg wrote May 7, 2012 at 3:37 PM

LineNumbersLink.png

lyubobg wrote May 7, 2012 at 4:05 PM

Latest version

wrote May 7, 2012 at 4:05 PM

lyubobg wrote May 7, 2012 at 4:06 PM

Latest version

wrote May 7, 2012 at 4:06 PM

wrote May 7, 2012 at 4:06 PM

lyubobg wrote May 7, 2012 at 4:06 PM

Latest version

wrote Dec 22, 2012 at 5:54 PM

wrote Dec 22, 2012 at 5:54 PM

wrote Dec 22, 2012 at 5:56 PM

wrote Dec 22, 2012 at 5:56 PM

wrote Feb 21, 2013 at 10:47 PM

wrote May 16, 2013 at 10:27 AM

wrote May 16, 2013 at 10:27 AM

wrote Jun 14, 2013 at 7:22 AM