found table in program
Inheritance: ParsedItem
Exemple #1
0
        /// <summary>
        /// Tables used in the program
        /// </summary>
        /// <param name="pars"></param>
        public void Visit(ParsedFoundTableUse pars)
        {
            bool missingDbName = pars.Name.IndexOf('.') < 0;

            // to code explorer
            var parentNode = pars.IsTempTable ? GetExplorerListNode("Temp-tables used", CodeExplorerIconType.TempTableUsed) : GetExplorerListNode("Tables used", CodeExplorerIconType.TableUsed);
            var newNode    = CodeItem.Factory.New(pars.IsTempTable ? CodeExplorerIconType.TempTable : CodeExplorerIconType.Table);

            newNode.DisplayText   = missingDbName ? pars.Name : pars.Name.Split('.')[1];
            newNode.Flags         = (missingDbName && !pars.IsTempTable ? ParseFlag.MissingDbName : 0) | pars.Flags;
            newNode.SubText       = null;
            newNode.DocumentOwner = pars.FilePath;
            newNode.GoToLine      = pars.Line;
            newNode.GoToColumn    = pars.Column;
            PushToCodeExplorer(parentNode, newNode);
        }
Exemple #2
0
        /// <summary>
        /// Tables used in the program
        /// </summary>
        /// <param name="pars"></param>
        public void Visit(ParsedFoundTableUse pars)
        {
            bool missingDbName = pars.Name.IndexOf('.') < 0;
            var  name          = pars.Name.Split('.');

            // to code explorer
            _parsedExplorerItemsList.Add(new CodeExplorerItem {
                DisplayText   = missingDbName ? pars.Name : name[1],
                Branch        = pars.IsTempTable ? CodeExplorerBranch.TempTableUsed : CodeExplorerBranch.TableUsed,
                IconType      = pars.IsTempTable ? CodeExplorerIconType.TempTable : CodeExplorerIconType.Table,
                Flag          = AddExternalFlag((missingDbName && !pars.IsTempTable) ? CodeExplorerFlag.MissingDbName : 0),
                IsNotBlock    = true,
                DocumentOwner = pars.FilePath,
                GoToLine      = pars.Line,
                GoToColumn    = pars.Column,
                SubString     = SetExternalInclude(null)
            });
        }