Setting WorkItem Category

One answer

Ok, so I know there is a method called setCategory
The thing is: where can I fetch the ICategoryHandle objects from?
You can fetch the categories using this:
IWorkItemServer workItemService = getService(IWorkItemServer.class);
List<ICategory> listaCategorias = workItemService.findCategories(sourceworkItem.getProjectArea(),ICategory.FULL_PROFILE,monitor);