/// <summary> /// Runs the <see cref="GoToErrorCommand"/>. /// </summary> public override void Run() { NAntPadTreeView padTreeView = (NAntPadTreeView)Owner; NAntBuildFile buildFile = padTreeView.SelectedBuildFile; if (buildFile != null) { string fileName = Path.Combine(buildFile.Directory, buildFile.FileName); FileService.JumpToFilePosition(fileName, buildFile.Error.Line, buildFile.Error.Column); } }
/// <summary> /// Runs the <see cref="OpenNAntBuildFile"/>. /// </summary> public override void Run() { NAntPadTreeView padTreeView = (NAntPadTreeView)Owner; NAntBuildFile buildFile = padTreeView.SelectedBuildFile; if (buildFile != null) { string fileName = Path.Combine(buildFile.Directory, buildFile.FileName); FileService.OpenFile(fileName); } }