public void PrintHeadPanel()
{
EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);
EditorGUI.BeginDisabledGroup(EditorApplication.isPlayingOrWillChangePlaymode);
if (GUILayout.Button(m_GUIRunAllTests, EditorStyles.toolbarButton))
{
RunTests(TestComponent.FindAllTestsOnScene().Cast<ITestComponent>().ToList());
}
EditorGUI.BeginDisabledGroup(!Selection.gameObjects.Any (t => t.GetComponent(typeof(ITestComponent))));
if (GUILayout.Button(m_GUIRunSelectedTests, EditorStyles.toolbarButton))
{
RunTests(Selection.gameObjects.Select(t => t.GetComponent(typeof(TestComponent))).Cast<ITestComponent>().ToList());
}
EditorGUI.EndDisabledGroup();
if (GUILayout.Button(m_GUICreateNewTest, EditorStyles.toolbarButton))
{
var test = TestComponent.CreateTest();
if (Selection.gameObjects.Length == 1
&& Selection.activeGameObject != null
&& Selection.activeGameObject.GetComponent<TestComponent>())
{
test.transform.parent = Selection.activeGameObject.transform.parent;
}
Selection.activeGameObject = test;
RebuildTestList();
}
EditorGUI.EndDisabledGroup();
GUILayout.FlexibleSpace ();
m_FilterSettings.OnGUI ();
EditorGUILayout.EndHorizontal ();
}