@Test public void testActivate_select() { handler.async(); getComponent(DetailUtil.class)._setLauncher(new DetailUtil.Launcher() { @Override public void loadDetail(Project project, final Entity entity, final boolean show, final boolean select) { handler.done(new Runnable() { @Override public void run() { Assert.assertEquals("requirement", entity.getType()); Assert.assertEquals(4, entity.getId()); Assert.assertEquals(true, show); Assert.assertEquals(true, select); } }); } }); activeItemService.activate(new Entity("requirement", 4), false, true); }
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; }