コード例 #1
0
        /// <summary>
        /// Utility function spawning ParsingErrorReportForm window
        /// </summary>
        /// <param name="fileName">File being read</param>
        /// <param name="errors">List of error messages</param>
        internal static void ReportErrors(string fileName, List <string> errors)
        {
            ParsingErrorReportForm reportFrm = new ParsingErrorReportForm();

            reportFrm.SetErrorInfo(fileName, errors);
            reportFrm.ShowDialog();
        }
コード例 #2
0
        private void HandleParse()
        {
            var  parentPackage = (WhiteStarUML.IUMLPackage)packagesTreeView.SelectedNode.Tag;
            bool parseSucceded = CodeParser.Instance.ParseCode(parentPackage);

            if (parseSucceded)
            {
                MessageBox.Show(this, Symbols.MSG_PARSING_SUCCEEDED_LONG, Symbols.MSG_PARSING_SUCCEEDED, MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            else
            {
                ParsingErrorReportForm.ReportErrors(CodeParser.Instance.InputFile, CodeParser.Instance.LastParseLog);
            }
        }