@Test public void testActivate() { selectNothing(); handler.async(); activeItemService.addListener(new ActiveItemService.Listener() { @Override public void onActivated(final EntityRef ref) { activeItemService.removeListener(this); handler.done(new Runnable() { @Override public void run() { Assert.assertNotNull(ref); Assert.assertEquals(2, ref.id); Assert.assertEquals("requirement", ref.type); } }); } }); activeItemService.activate(new Entity("requirement", 2), false, false); checkActivateItem("requirement", 2); }
public synchronized void activate(Entity entity, boolean callTaskManager, boolean select) { if(entity != null) { ref = new EntityRef(entity); } else { ref = null; } fireOnActivated(); if(select && entity != null) { selectEntityDetail(entity); } if(callTaskManager && taskManagerIntegration != null) { taskManagerIntegration.activate(entity); } }
ActiveItemService implements PersistentStateComponent<Element>, TaskManagerIntegration.Listener { public synchronized void activate(Entity entity, boolean callTaskManager, boolean select) { if(entity != null) { ref = new EntityRef(entity); } else { ref = null; } fireOnActivated(); if(select && entity != null) { selectEntityDetail(entity); } if(callTaskManager && taskManagerIntegration != null) { taskManagerIntegration.activate(entity); } } }
ActiveItemService implements PersistentStateComponent<Element>, TaskManagerIntegration.Listener { public synchronized void activate(Entity entity, boolean callTaskManager, boolean select) { if(entity != null) { ref = new EntityRef(entity); } else { ref = null; } fireOnActivated(); if(select && entity != null) { selectEntityDetail(entity); } if(callTaskManager && taskManagerIntegration != null) { taskManagerIntegration.activate(entity); } } ActiveItemService(Project project, DetailUtil detailUtil); }
ActiveItemService implements PersistentStateComponent<Element>, TaskManagerIntegration.Listener { public synchronized void activate(Entity entity, boolean callTaskManager, boolean select) { if(entity != null) { ref = new EntityRef(entity); } else { ref = null; } fireOnActivated(); if(select && entity != null) { selectEntityDetail(entity); } if(callTaskManager && taskManagerIntegration != null) { taskManagerIntegration.activate(entity); } } ActiveItemService(Project project, DetailUtil detailUtil); synchronized void activate(Entity entity, boolean callTaskManager, boolean select); synchronized EntityRef getActiveItem(); void selectEntityDetail(final Entity entity); void addListener(Listener listener); void removeListener(Listener listener); Element getState(); void loadState(Element state); void taskEntityActivated(Entity entity); }
ActiveItemService implements PersistentStateComponent<Element>, TaskManagerIntegration.Listener { public synchronized void activate(Entity entity, boolean callTaskManager, boolean select) { if(entity != null) { ref = new EntityRef(entity); } else { ref = null; } fireOnActivated(); if(select && entity != null) { selectEntityDetail(entity); } if(callTaskManager && taskManagerIntegration != null) { taskManagerIntegration.activate(entity); } } ActiveItemService(Project project, DetailUtil detailUtil); synchronized void activate(Entity entity, boolean callTaskManager, boolean select); synchronized EntityRef getActiveItem(); void selectEntityDetail(final Entity entity); void addListener(Listener listener); void removeListener(Listener listener); Element getState(); void loadState(Element state); void taskEntityActivated(Entity entity); static Icon activeItemIcon; }