private VisualElement CreateContentView()
        {
            var content = new VisualElement {
                name = "content"
            };

            {
                m_graphView = new NodeSketchGraphView()
                {
                    name        = "GraphView",
                    viewDataKey = "LogicGraphView"
                };

                m_graphView.SetupZoom(0.05f, ContentZoomer.DefaultMaxScale);
                m_graphView.AddManipulator(new ContentDragger());
                m_graphView.AddManipulator(new SelectionDragger());
                m_graphView.AddManipulator(new RectangleSelector());
                m_graphView.AddManipulator(new ClickSelector());
                m_graphView.RegisterCallback <KeyDownEvent>(OnKeyDown);

                content.Add(m_graphView);

                m_graphView.graphViewChanged = GraphViewChanged;
            }
            return(content);
        }
        public void Initialize(EditorWindow editorWindow, NodeSketchEditorView editorView, NodeProvider nodeProvider, FieldProvider fieldProvider, NodeSketchGraphView graphView)
        {
            m_editorWindow  = editorWindow;
            m_editorView    = editorView;
            m_graphView     = graphView;
            m_nodeProvider  = nodeProvider;
            m_fieldProvider = fieldProvider;

            //  Transparent icon to trick search window to indent items.
            m_icon = new Texture2D(1, 1);
            m_icon.SetPixel(0, 0, new Color(0, 0, 0, 0));
            m_icon.Apply();
        }