package net.mgsx.game.plugins.ashley;

import net.mgsx.game.core.EditorScreen;
import net.mgsx.game.core.plugins.EditorPlugin;
import net.mgsx.game.plugins.ashley.editors.AshleyEntitiesEditor;
import net.mgsx.game.plugins.ashley.editors.AshleySystemsEditor;
import net.mgsx.game.plugins.ashley.systems.AshleyProfilerSystem;
import net.mgsx.game.plugins.editor.systems.EditorSystem;

public class AshleyEditorPlugin extends EditorPlugin
{
	@Override
	public void initialize(EditorScreen editor) 
	{
		editor.entityEngine.getSystem(EditorSystem.class)
			.addGlobalEditor("Entities", new AshleyEntitiesEditor());
		editor.entityEngine.getSystem(EditorSystem.class)
			.addGlobalEditor("Systems", new AshleySystemsEditor());
//		editor.registry.addGlobalEditor("Entities", new AshleyEntitiesEditor());
//		editor.registry.addGlobalEditor("Systems", new AshleySystemsEditor());
		
		editor.entityEngine.addSystem(new AshleyProfilerSystem());
	}
}

@@ -72,16 +72,65 @@
 Screen;%0A
+import net.mgsx.game.core.annotations.PluginDef;%0A
 import n
@@ -169,16 +169,16 @@
 Plugin;%0A
-
 import n
@@ -366,16 +366,69 @@
 System;%0A
+import net.mgsx.game.plugins.editor.KitEditorPlugin;%0A
 import n
@@ -478,16 +478,68 @@
 ystem;%0A%0A
+@PluginDef(dependencies=%7B%0A%09KitEditorPlugin.class%0A%7D)%0A
 public c
@@ -802,32 +802,32 @@
 orSystem.class)%0A
+
 %09%09%09.addGlobalEdi
@@ -873,160 +873,8 @@
 ));%0A
-//%09%09editor.registry.addGlobalEditor(%22Entities%22, new AshleyEntitiesEditor());%0A//%09%09editor.registry.addGlobalEditor(%22Systems%22, new AshleySystemsEditor());%0A
 %09%09%0A%09

fix plugin dependency