FileViewProvider () { VirtualFile origFile = getVirtualFile(); LightVirtualFile copy = new LightVirtualFile(origFile.getName(), origFile.getFileType(), getContents(), origFile.getCharset(), getModificationStamp()); origFile.copyCopyableDataTo(copy); copy.setOriginalFile(origFile); UndoUtil.disableUndoFor(copy); copy.setCharset(origFile.getCharset()); return createCopy(copy); }