/// <summary>
        /// Refresh the file model
        /// </summary>
        /// <param name="updateUI">Update outline view</param>
        public override void UpdateCurrentFile(bool updateUI)
        {
            if (cFile == null || CurSciControl == null)
            {
                return;
            }
            ASFileParser parser = new ASFileParser();

            parser.ParseSrc(cFile, CurSciControl.Text);
            ScriptToClass(cFile);
            cLine = CurSciControl.LineFromPosition(CurSciControl.CurrentPos);
            UpdateContext(cLine);

            // update outline
            if (updateUI)
            {
                ASContext.Context = this;
            }
        }
Exemple #2
0
        /// <summary>
        /// Build the file DOM
        /// </summary>
        /// <param name="filename">File path</param>
        protected override void GetCurrentFileModel(string fileName)
        {
            string ext = Path.GetExtension(fileName);

            if (!re_PHPext.IsMatch(ext))
            {
                cFile = FileModel.Ignore;
                UpdateContext(cLine);
            }
            else
            {
                cFile              = new FileModel(fileName);
                cFile.Context      = this;
                cFile.HasFiltering = true;
                ASFileParser parser = new ASFileParser();
                parser.ParseSrc(cFile, CurSciControl.Text);
                cLine = CurSciControl.LineFromPosition(CurSciControl.CurrentPos);
                UpdateContext(cLine);
            }
        }