public override void OnExecute(SelectedItem item, string fileName, OutputWindowPane pane) { OpenFileDialog dlg = new OpenFileDialog(); dlg.Title = "Source: " + fileName; dlg.Multiselect = false; dlg.CheckFileExists = false; dlg.CheckPathExists = false; dlg.InitialDirectory = Path.GetDirectoryName(fileName); dlg.FileName = Path.GetFileName(fileName); if (DialogResult.OK == dlg.ShowDialog()) { string newName = dlg.FileName; P4Operations.IntegrateFile(pane, newName, fileName); P4Operations.EditFile(pane, item.ProjectItem.ContainingProject.FullName); item.ProjectItem.Collection.AddFromFile(newName); item.ProjectItem.Delete(); P4Operations.DeleteFile(pane, fileName); } }