// Then we look for it in the model
tHandler = getModelService().resolveTypeService(typeName);
}
else {
// Else we got to get the local package
IPackageService packSrv = null;
IContainerService contSrv = getContainerService();
while(
(contSrv != null)
&&(!(contSrv instanceof IPackageService))
&&(contSrv instanceof IContainableElementService<?, ?>)
) {
contSrv =
((IContainableElementService<?, ?>)contSrv)
.getContainerService();
}
// From the package we can have the type
if(contSrv instanceof IPackageService) {
packSrv = (IPackageService)contSrv;
String packName = packSrv.getFullName();
String fullName = packName + '.' + typeName;
tHandler = packSrv.resolveTypeService(fullName);
}
}
}
return tHandler;
}