Ejemplo n.º 1
0
        protected override void OnCreate()
        {
            base.OnCreate();

            m_ConnectionsView = CreateView <ConnectionsView>();
            m_ConnectionsView.editorPrefsKey           = GetPrefsKey(() => m_ConnectionsView);
            m_ConnectionsView.showReferencesAsExcluded = snapshot.header.nativeObjectFromConnectionsExcluded;

            m_RootPathView = CreateView <RootPathView>();
            m_RootPathView.editorPrefsKey = GetPrefsKey(() => m_RootPathView);

            // The list at the left that contains all native objects
            m_NativeObjectsControl = new NativeObjectsControl(window, GetPrefsKey(() => m_NativeObjectsControl), new TreeViewState());
            m_NativeObjectsControl.onSelectionChange += OnListViewSelectionChange;
            //m_NativeObjectsControl.gotoCB += Goto;

            m_SearchField = new HeSearchField(window);
            m_SearchField.downOrUpArrowKeyPressed += m_NativeObjectsControl.SetFocusAndEnsureSelectedItem;
            m_NativeObjectsControl.findPressed    += m_SearchField.SetFocus;

            // The list at the right that shows the selected native object
            m_NativeObjectControl = new NativeObjectControl(window, GetPrefsKey(() => m_NativeObjectControl), new TreeViewState());
            m_PreviewView         = CreateView <NativeObjectPreviewView>();

            m_SplitterHorz         = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterHorz), m_SplitterHorz);
            m_SplitterVert         = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterVert), m_SplitterVert);
            m_PreviewSplitterVert  = EditorPrefs.GetFloat(GetPrefsKey(() => m_PreviewSplitterVert), m_PreviewSplitterVert);
            m_RootPathSplitterVert = EditorPrefs.GetFloat(GetPrefsKey(() => m_RootPathSplitterVert), m_RootPathSplitterVert);

            OnRebuild();
        }
Ejemplo n.º 2
0
        protected override void OnCreate()
        {
            base.OnCreate();

            m_ConnectionsView = CreateView <ConnectionsView>();
            m_ConnectionsView.editorPrefsKey = GetPrefsKey(() => m_ConnectionsView);

            m_RootPathView = CreateView <RootPathView>();
            m_RootPathView.editorPrefsKey = GetPrefsKey(() => m_RootPathView);

            m_PropertyGridView = CreateView <PropertyGridView>();
            m_PropertyGridView.editorPrefsKey = GetPrefsKey(() => m_PropertyGridView);

            m_ObjectsControl = CreateObjectsTreeView(GetPrefsKey(() => m_ObjectsControl), new TreeViewState());
            m_ObjectsControl.onSelectionChange += OnListViewSelectionChange;
            m_ObjectsControl.SetTree(m_ObjectsControl.BuildTree(snapshot));

            m_ObjectsSearchField = new HeSearchField(window);
            m_ObjectsSearchField.downOrUpArrowKeyPressed += m_ObjectsControl.SetFocusAndEnsureSelectedItem;
            m_ObjectsControl.findPressed += m_ObjectsSearchField.SetFocus;

            m_SplitterHorzPropertyGrid = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterHorzPropertyGrid), m_SplitterHorzPropertyGrid);
            m_SplitterVertConnections  = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterVertConnections), m_SplitterVertConnections);
            m_SplitterVertRootPath     = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterVertRootPath), m_SplitterVertRootPath);
        }
        protected override void OnCreate()
        {
            base.OnCreate();

            m_ConnectionsView = CreateView <ConnectionsView>();
            m_ConnectionsView.editorPrefsKey = GetPrefsKey(() => m_ConnectionsView);

            m_RootPathView = CreateView <RootPathView>();
            m_RootPathView.editorPrefsKey = GetPrefsKey(() => m_RootPathView);

            m_PropertyGridView = CreateView <PropertyGridView>();
            m_PropertyGridView.editorPrefsKey = GetPrefsKey(() => m_PropertyGridView);

            m_ObjectsControl = new ManagedObjectDuplicatesControl(window, GetPrefsKey(() => m_ObjectsControl), new TreeViewState());
            m_ObjectsControl.onSelectionChange += OnListViewSelectionChange;

            m_ObjectsSearchField = new HeSearchField(window);
            m_ObjectsSearchField.downOrUpArrowKeyPressed += m_ObjectsControl.SetFocusAndEnsureSelectedItem;
            m_ObjectsControl.findPressed += m_ObjectsSearchField.SetFocus;

            m_SplitterHorzPropertyGrid = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterHorzPropertyGrid), m_SplitterHorzPropertyGrid);
            m_SplitterVertConnections  = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterVertConnections), m_SplitterVertConnections);
            m_SplitterVertRootPath     = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterVertRootPath), m_SplitterVertRootPath);

            var job = new Job();

            job.snapshot = snapshot;
            job.control  = m_ObjectsControl;
            ScheduleJob(job);
        }
Ejemplo n.º 4
0
        protected override void OnCreate()
        {
            base.OnCreate();

            m_ConnectionsView = CreateView <ConnectionsView>();
            m_ConnectionsView.editorPrefsKey = GetPrefsKey(() => m_ConnectionsView);

            m_RootPathView = CreateView <RootPathView>();
            m_RootPathView.editorPrefsKey = GetPrefsKey(() => m_RootPathView);

            m_HandlesControl = new GCHandlesControl(window, GetPrefsKey(() => m_HandlesControl), new TreeViewState());
            m_HandlesControl.SetTree(m_HandlesControl.BuildTree(snapshot));
            m_HandlesControl.onSelectionChange += OnListViewSelectionChange;

            m_HandlesSearchField = new HeSearchField(window);
            m_HandlesSearchField.downOrUpArrowKeyPressed += m_HandlesControl.SetFocusAndEnsureSelectedItem;
            m_HandlesControl.findPressed += m_HandlesSearchField.SetFocus;

            m_SplitterHorz = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterHorz), m_SplitterHorz);
            m_SplitterVert = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterVert), m_SplitterVert);
        }
Ejemplo n.º 5
0
        protected override void OnCreate()
        {
            base.OnCreate();

            m_ConnectionsView = CreateView <ConnectionsView>();
            m_ConnectionsView.editorPrefsKey   = GetPrefsKey(() => m_ConnectionsView);
            m_ConnectionsView.showReferencedBy = false;

            // The list at the left that contains all native objects
            m_StaticFieldsControl = new StaticFieldsControl(window, GetPrefsKey(() => m_StaticFieldsControl), new TreeViewState());
            m_StaticFieldsControl.SetTree(m_StaticFieldsControl.BuildTree(snapshot));
            m_StaticFieldsControl.onTypeSelected += OnListViewTypeSelected;

            m_SearchField = new HeSearchField(window);
            m_SearchField.downOrUpArrowKeyPressed += m_StaticFieldsControl.SetFocusAndEnsureSelectedItem;

            m_PropertyGridView = CreateView <PropertyGridView>();
            m_PropertyGridView.editorPrefsKey = GetPrefsKey(() => m_PropertyGridView);

            m_SplitterHorz = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterHorz), m_SplitterHorz);
            m_SplitterVert = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterVert), m_SplitterVert);
        }
        protected override void OnCreate()
        {
            base.OnCreate();

            ReleaseTextures();

            m_HexView   = CreateView <HexView>();
            m_ShowAsHex = EditorPrefs.GetBool(GetPrefsKey(() => m_ShowAsHex), false);

            m_SectionFragTexture      = new Texture2D(ManagedHeapSectionsUtility.k_TextureWidth, ManagedHeapSectionsUtility.k_TextureHeight, TextureFormat.ARGB32, false);
            m_SectionFragTexture.name = "HeapExplorer-MemorySectionFragmentation-Texture";

            m_HeapFragTexture      = new Texture2D(ManagedHeapSectionsUtility.k_TextureWidth, ManagedHeapSectionsUtility.k_TextureHeight, TextureFormat.ARGB32, false);
            m_HeapFragTexture.name = "HeapExplorer-HeapFragmentation-Texture";
            ScheduleJob(new HeapFragmentationJob()
            {
                snapshot = snapshot, texture = m_HeapFragTexture, sections = GetMemorySections(), addressSpace = GetHeapAddressSpace()
            });

            m_ConnectionsView = CreateView <ConnectionsView>();
            m_ConnectionsView.editorPrefsKey             = GetPrefsKey(() => m_ConnectionsView);
            m_ConnectionsView.showReferencedBy           = false;
            m_ConnectionsView.afterReferencesToolbarGUI += OnToggleHexViewGUI;

            m_SectionsControl = new ManagedHeapSectionsControl(window, GetPrefsKey(() => m_SectionsControl), new TreeViewState());
            m_SectionsControl.SetTree(m_SectionsControl.BuildTree(snapshot, GetMemorySections()));
            m_SectionsControl.onSelectionChange += OnListViewSelectionChange;

            m_SectionsSearchField = new HeSearchField(window);
            m_SectionsSearchField.downOrUpArrowKeyPressed += m_SectionsControl.SetFocusAndEnsureSelectedItem;
            m_SectionsControl.findPressed += m_SectionsSearchField.SetFocus;

            m_SplitterHorz = EditorPrefs.GetFloat(GetPrefsKey(() => m_SplitterHorz), m_SplitterHorz);

            m_ShowInternalSections = s_ShowInternalSections;
        }