public override void OnInspectorGUI()
        {
            if (enableEditor)
            {
                textEditor.onRepaint = Repaint;
                textEditor.OnEnable(target);
                enableEditor = false;
            }

            if (Event.current.type == EventType.ValidateCommand)
            {
                if (Event.current.commandName == "ScriptInspector.AddTab")
                {
                    Event.current.Use();
                    return;
                }
            }
            else if (Event.current.type == EventType.ExecuteCommand)
            {
                if (Event.current.commandName == "ScriptInspector.AddTab")
                {
                    FGCodeWindow.OpenNewWindow(null, null, false);
                    Event.current.Use();
                    return;
                }
            }

            DoGUI();
        }
	private void OnFirstUpdate()
	{
		EditorApplication.update -= OnFirstUpdate;

		if (targetAsset != null)
		{
			title = System.IO.Path.GetFileName(AssetDatabase.GetAssetPath(targetAsset));
			textEditor.OnEnable(targetAsset);
			UpdateWindowTitle();
		}
	}