public void Execute(ISolution solution, ITextControl textControl) { using (ReadLockCookie.Create()) { var manager = PsiManager.GetInstance(solution); manager.CommitAllDocuments(); IProjectItem parentFolder = GetParentFolder(_sourceTypeDeclaration); MoveToOuterFile(); IProjectItem sourceFile = GetSourceFile(parentFolder, _sourceTypeDeclaration); IProjectFile newFile = MoveFileToProject(sourceFile); OpenFileInEditor(solution, newFile); sourceFile.Remove(); } }