Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Resolve External References(Resolve External References)
Resolve External References [message #881778] Tue, 05 June 2012 08:35
macheke macheke is currently offline macheke machekeFriend
Messages: 7
Registered: May 2012
Junior Member
Hie

i am serializing my models to XMI and have references to other model elements in other files, when i serialise i have the following output

<rvalue xsi:type="dslLanguage:SymbolReference">
<symbol href="../models/d8_Library/high_Level_Lib/test1.dsl#//@namespaces.0/@namespaces.0/@functions.4"/>
<argList/>
</rvalue>

//code snippet

for (final IResource resource : resources) {
					final URI fileURI = URI.createPlatformResourceURI(resource.getFullPath().toString(), false);
					final Resource res = rs.getResource(fileURI, true);
					final Map<String, Object> m = new HashMap<String, Object>();
					m.put(XtextResource.OPTION_RESOLVE_ALL, Boolean.TRUE);
					res.load(m);
				}

then use EcoreUtils to resolve

for (final Resource res : resources) {
			if (!res.getContents().isEmpty()) {
				final EObject element = res.getContents().get(0);
				elements.addAll(EcoreUtil2.eAllContentsAsList(element));
			}
		}
		for (final EObject ele : elements) {
			EcoreUtil2.resolveAll(ele);
		}


but still have that output. Is this expected? @functions.4 should be the real name of the function

Previous Topic:Predicated unordered group - what is that?
Next Topic:Xtext Error Message
Goto Forum:
  


Current Time: Sat Oct 24 18:16:03 GMT 2020

Powered by FUDForum. Page generated in 0.01234 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top