try {
inStream = modelFile.getContents();
service.setInStream(inStream);
service.setLocationSolver(new WorkspaceLocationSolver());
service.initialize();
service.invoke();
if (service.getLoadedResource() instanceof ModelingProject) return (ModelingProject) service.getLoadedResource();
else throw new CoreException(new Status(Status.ERROR, "q_impress", "Unable to load model, invalid file."));
} catch (CoreException e) {
throw new CoreException(new Status(Status.ERROR, "q_impress", "Unable to load model.", e));