@Test public void testGetState() { selectDefect(); Element state = activeItemService.getState(); Assert.assertEquals("ActiveItemService", state.getName()); Assert.assertEquals("defect", state.getAttributeValue("type")); Assert.assertEquals("1", state.getAttributeValue("id")); }
public Element getState() { Element element = new Element(getClass().getSimpleName()); if(ref != null) { element.setAttribute("type", ref.type); element.setAttribute("id", String.valueOf(ref.id)); } return element; }
ActiveItemService implements PersistentStateComponent<Element>, TaskManagerIntegration.Listener { public Element getState() { Element element = new Element(getClass().getSimpleName()); if(ref != null) { element.setAttribute("type", ref.type); element.setAttribute("id", String.valueOf(ref.id)); } return element; } }
ActiveItemService implements PersistentStateComponent<Element>, TaskManagerIntegration.Listener { public Element getState() { Element element = new Element(getClass().getSimpleName()); if(ref != null) { element.setAttribute("type", ref.type); element.setAttribute("id", String.valueOf(ref.id)); } return element; } ActiveItemService(Project project, DetailUtil detailUtil); }
ActiveItemService implements PersistentStateComponent<Element>, TaskManagerIntegration.Listener { public Element getState() { Element element = new Element(getClass().getSimpleName()); if(ref != null) { element.setAttribute("type", ref.type); element.setAttribute("id", String.valueOf(ref.id)); } return element; } 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 Element getState() { Element element = new Element(getClass().getSimpleName()); if(ref != null) { element.setAttribute("type", ref.type); element.setAttribute("id", String.valueOf(ref.id)); } return element; } 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; }