Skip to content
Snippets Groups Projects
Commit ecd41976 authored by Simon Barner's avatar Simon Barner
Browse files

- getModel(ResourceSet): Resolve entire ResourceSet before trying to retrieve model

parent 0aad52e6
No related branches found
No related tags found
No related merge requests found
......@@ -62,7 +62,7 @@ import org.fortiss.tooling.kernel.service.IPersistencyService;
* @author mou
* @author $Author$
* @version $Rev$
* @ConQAT.Rating YELLOW Hash: 5A65DAD152BE6A49D738C7DD878D3C55
* @ConQAT.Rating YELLOW Hash: 69561D16AB9D258C6792EFCFF1F396F1
*/
public final class ResourceUtils {
......@@ -239,6 +239,7 @@ public final class ResourceUtils {
*/
@SuppressWarnings("unchecked")
public static <T extends EObject> T getModel(ResourceSet resourceSet, Class<T> clazz) {
EcoreUtil.resolveAll(resourceSet);
for(Resource resource : resourceSet.getResources()) {
for(EObject obj : resource.getContents()) {
if(clazz.isAssignableFrom(obj.getClass())) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment