@Test public void testLoadState() { selectNothing(); Element state = new Element("ActiveItemService"); state.setAttribute("type", "defect"); state.setAttribute("id", "2"); activeItemService.loadState(state); checkActivateItem("defect", 2); }
public void loadState(Element state) { String type = state.getAttributeValue("type"); if(type != null) { ref = new EntityRef(type, Integer.valueOf(state.getAttributeValue("id"))); } }
ActiveItemService implements PersistentStateComponent<Element>, TaskManagerIntegration.Listener { public void loadState(Element state) { String type = state.getAttributeValue("type"); if(type != null) { ref = new EntityRef(type, Integer.valueOf(state.getAttributeValue("id"))); } } }
ActiveItemService implements PersistentStateComponent<Element>, TaskManagerIntegration.Listener { public void loadState(Element state) { String type = state.getAttributeValue("type"); if(type != null) { ref = new EntityRef(type, Integer.valueOf(state.getAttributeValue("id"))); } } ActiveItemService(Project project, DetailUtil detailUtil); }
ActiveItemService implements PersistentStateComponent<Element>, TaskManagerIntegration.Listener { public void loadState(Element state) { String type = state.getAttributeValue("type"); if(type != null) { ref = new EntityRef(type, Integer.valueOf(state.getAttributeValue("id"))); } } 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 void loadState(Element state) { String type = state.getAttributeValue("type"); if(type != null) { ref = new EntityRef(type, Integer.valueOf(state.getAttributeValue("id"))); } } 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; }