Example #1
0
        protected override void DoubleClickedItem(int id)
        {
            base.DoubleClickedItem(id);
            var    selectItem = FindItem(id, BuildRoot());
            string fileName   = selectItem.displayName.Split(new char[] { ',' }, 2)[0].Trim();

            try
            {
                int line = 0;
                int.TryParse(Regex.Match(selectItem.displayName, @"(?<=(line:))\d*(?=( ))").Value, out line);
                LocalToLuaIDE.OnOpenAsset(fileName, line);
            }
            catch
            {
            }
        }
        protected override void DoubleClickedItem(int id)
        {
            base.DoubleClickedItem(id);
            if (string.IsNullOrEmpty(searchString))
            {
                var selectItem = FindItem(id, BuildRoot());
                var item       = (LuaProfilerTreeViewItem)selectItem;
                if (item == null)
                {
                    return;
                }
                if (item.line == -1)
                {
                    Debug.Log("please wait");
                    return;
                }

                string fileName = item.filePath;
                try
                {
                    int line = item.line;
                    if (!File.Exists(fileName))
                    {
                        Debug.Log(fileName);
                    }
                    LocalToLuaIDE.OnOpenAsset(fileName, line);
                }
                catch
                {
                }
            }
            else
            {
                searchString = "";
                Reload();
                foreach (var item in roots)
                {
                    SetExpandedRecursive(item.id, false);
                }
                FrameItem(id);
            }
        }
Example #3
0
        protected override void DoubleClickedItem(int id)
        {
            base.DoubleClickedItem(id);
            var    selectItem = FindItem(id, BuildRoot());
            var    item       = (LuaProfilerTreeViewItem)selectItem;
            string fileName   = item.filePath;

            try
            {
                int line = item.line;
                if (!File.Exists(fileName))
                {
                    Debug.Log(fileName);
                }
                LocalToLuaIDE.OnOpenAsset(fileName, line);
            }
            catch
            {
            }
        }