how to use ITEM_TYPE
hi,everyone.in the following part
public class TicketService extends AbstractService implements ITicketService{ public ITicket createTicket(int id,int stillrest) throws TeamRepositoryException{ ITicket ticket = (ITicket)ITicket.ITEM_TYPE.createItem(); ticket.setId(id); ticket.setStillrest(stillrest); return ticket; } } it tells me that ITicket.ITEM_TYPE cannot be resolved.what should i do with the interface ITicket |
One answer
You can add a ITEM_TYPE field to your interface by using something like
the code below. The references to 'RepositoryPackage' would need to be changed to your models package, and the 'getContributor().getName()' would need to be changed to your item types name. public static final IItemType ITEM_TYPE = IItemType.IRegistry.INSTANCE .getItemType( RepositoryPackage.eINSTANCE.getContributor().getName(), RepositoryPackage.eNS_URI); - Matt Lavin Jazz Server Team On Fri, 2009-05-29 at 04:07 +0000, conan2840100 wrote: hi,everyone.in the following part |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.