diff options
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit')
-rw-r--r-- | Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/linking/ApplicationConfigurationLinkingService.xtend | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/linking/ApplicationConfigurationLinkingService.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/linking/ApplicationConfigurationLinkingService.xtend index fafba1d7..c876f3be 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/linking/ApplicationConfigurationLinkingService.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/linking/ApplicationConfigurationLinkingService.xtend | |||
@@ -71,28 +71,29 @@ class ApplicationConfigurationLinkingService extends DefaultLinkingService { | |||
71 | } | 71 | } |
72 | 72 | ||
73 | private def getByUri(EObject context, EReference ref, INode node) { | 73 | private def getByUri(EObject context, EReference ref, INode node) { |
74 | val linkedObjects = super.getLinkedObjects(context, ref, node) | ||
75 | if (!linkedObjects.empty) { | ||
76 | return linkedObjects | ||
77 | } | ||
74 | val uri = getNSUri(node) | 78 | val uri = getNSUri(node) |
75 | if (uri.present) { | 79 | if (uri.present) { |
76 | var URI createdURI | 80 | var URI createdURI |
77 | try { | 81 | try { |
78 | createdURI = URI.createURI(uri.get) | 82 | createdURI = URI.createURI(uri.get) |
79 | } catch (IllegalArgumentException e) { | 83 | } catch (IllegalArgumentException e) { |
80 | return super.getLinkedObjects(context, ref, node) | 84 | return #[] |
81 | } | 85 | } |
82 | var Resource res | 86 | var Resource res |
83 | try { | 87 | try { |
84 | res = context.eResource.resourceSet.getResource(createdURI, true); | 88 | res = context.eResource.resourceSet.getResource(createdURI, true); |
85 | } catch (RuntimeException e) { | 89 | } catch (RuntimeException e) { |
86 | return super.getLinkedObjects(context, ref, node) | 90 | return #[] |
87 | } | 91 | } |
88 | if (res !== null && res.contents !== null) { | 92 | if (res !== null && res.contents !== null) { |
89 | return res.contents.filter[ref.EType.isInstance(it)].toList | 93 | return res.contents.filter[ref.EType.isInstance(it)].toList |
90 | } else { | ||
91 | return super.getLinkedObjects(context, ref, node) | ||
92 | } | 94 | } |
93 | } else { | ||
94 | return super.getLinkedObjects(context, ref, node) | ||
95 | } | 95 | } |
96 | return #[] | ||
96 | } | 97 | } |
97 | 98 | ||
98 | private def getNSUri(INode node) { | 99 | private def getNSUri(INode node) { |