Пример #1
0
        public static void Refresh(Irony.Parsing.ParseTree tree)
        {
            if (isScanning)
            {
                return;
            }

            var file = FileManager.CurrentFile;

            if (file == null || BabePackage.DTEHelper.DTE.ActiveDocument == null || file.Path != BabePackage.DTEHelper.DTE.ActiveDocument.FullName)
            {
                return;
            }

            if (System.IO.File.Exists(file.Path))
            {
                var tp = new TreeParser();
                tp.Refresh(tree);

                BabePackage.WindowManager.RefreshEditorOutline();
                BabePackage.WindowManager.RefreshOutlineWnd();
            }
            else
            {
                //文件已经被移除
                IntellisenseHelper.RemoveFile(file.Path);
                FileManager.CurrentFile = null;
            }
        }
Пример #2
0
        public Dictionary <string, List <LuaMember> > GetFullMembers()
        {
            Dictionary <string, List <LuaMember> > Result = new Dictionary <string, List <LuaMember> >();

            Result.Add(this.Name, this.Members);
            //List<LuaMember> Result = new List<LuaMember>(Members);

            var father = Father;

            while (father != null)
            {
                LuaTable Base = IntellisenseHelper.GetTable(father);
                if (Base == null)
                {
                    break;
                }
                //Result.AddRange(Base.Members);
                Result.Add(Base.Name, Base.Members);
                father = Base.Father;
            }

            return(Result);
        }