I used this code successfully to edit C# files internal to my extension (outside opened user's solution) in VS 2010-2013, but it no longer works in VS 2015.
To reproduce this problem, in the SetDisplayedFile method you can set path to an external file like
filePath= @"C:\Users\sv\Desktop\ToolWindowHostedEditor\MyToolWindow.cs";
Then open any VS solution and invoke the hosted editor.
In VS 2015 there is no syntax highlighting for such file and I can't type any text in the hosted editor.