コード例 #1
0
        /// <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);
            }
        }
コード例 #2
0
        /// <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);
            }
        }