Community
Participate
Working Groups
= Problem description = Currently, org.eclipse.sphinx.emf.util.EcoreResourceUtil.loadModelResource(ResourceSet, URI, Map<?, ?>, boolean) and org.eclipse.sphinx.emf.util.EcoreResourceUtil.saveModelResource(Resource, Map<?, ?>) record exceptions raised during load or save operation as errors on the the affected model resource. These errors are subsequently translated into problem markers, attached to the underlying file and thus become visible in the Problems view. While this behavior makes sense for already existing resources that are loaded or saved it doesn't make much sense on new resources being created and saved for the first time. If exceptions are raised in that case, the underlying file will never be created. So, there won't be any target for attaching the problem markers created from the errors recorded on the model resource. Users just notice that nothing has happened but neither Problems view nor Error Log view give any hint about what went wrong. = Resolution approach = Make sure that exceptions raised when saving model resources are only recorded as errors on model resource when the latter already exists (i.e., in case when EcoreResourceUtil#saveModelResource() is directly called by clients). Log raised exceptions in error log instead when saving models to new resources (i.e., in case when EcoreResourceUtil#saveNewModelResource() is called).
Fixed as proposed in description.
Mass-closing Resolved tickets