private void GoToChild(AddComponentWindow.Element e, bool addIfComponent)
 {
     if (e is AddComponentWindow.NewScriptElement)
     {
         if (!this.hasSearch)
         {
             this.m_ClassName = AssetDatabase.GenerateUniqueAssetPath((e as AddComponentWindow.NewScriptElement).TargetPath());
             this.m_ClassName = Path.GetFileNameWithoutExtension(this.m_ClassName);
         }
     }
     if (e is AddComponentWindow.ComponentElement)
     {
         if (addIfComponent)
         {
             EditorApplication.ExecuteMenuItemOnGameObjects(((AddComponentWindow.ComponentElement)e).menuPath, this.m_GameObjects);
             base.Close();
         }
     }
     else if (!this.hasSearch || e is AddComponentWindow.NewScriptElement)
     {
         this.m_LastTime = DateTime.Now.Ticks;
         if (this.m_AnimTarget == 0)
         {
             this.m_AnimTarget = 1;
         }
         else if (this.m_Anim == 1f)
         {
             this.m_Anim = 0f;
             this.m_Stack.Add(e as AddComponentWindow.GroupElement);
         }
     }
 }
 public override bool OnAction()
 {
     AddComponentWindow.SendUsabilityAnalyticsEvent(new AddComponentWindow.AnalyticsEventData
     {
         name        = base.name,
         filter      = AddComponentWindow.s_AddComponentWindow.searchString,
         isNewScript = false
     });
     GameObject[] gameObjects = AddComponentWindow.s_AddComponentWindow.m_GameObjects;
     EditorApplication.ExecuteMenuItemOnGameObjects(this.m_MenuPath, gameObjects);
     return(true);
 }