Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » cross reference in import
cross reference in import [message #954082] Mon, 22 October 2012 19:25 Go to next message
Laigle jérôme is currently offline Laigle jérômeFriend
Messages: 26
Registered: August 2012
Junior Member
Hi,
 
It should be possible to have a cross reference in import
 
 
for example there are two file test1 and test2
I imported explicitly  test2 in test1 (define with include)
but i want to have also import implicit of test1 in test2 automatic for the scoping

 
my dsl:
 
Include:
                '#include' importURI=STRING
;
 
but i don't how i can do it


 
Maybe somebody has an idea or can point me into the right direction? Thanks in advance!
 
Best regards,
Jérôme
Re: cross reference in import [message #954721 is a reply to message #954082] Tue, 23 October 2012 07:39 Go to previous message
Laigle jérôme is currently offline Laigle jérômeFriend
Messages: 26
Registered: August 2012
Junior Member
i tried to do something like this


protected LinkedHashSet<URI> getImportedUris(Resource resource) {
LinkedHashSet<URI> importsList = super.getImportedUris(resource);
URI builtinFunctions = URI
.createURI("platform:/plugin/fr.alliancesoftware.abal.language/resources/builtin_functions.s");
importsList.add(builtinFunctions);

EObject rootObject = resource.getContents().get(0);

//Cross References
LazyLinkingResource lazyLinkingResource = (LazyLinkingResource)resource;
//lazyLinkingResource.getLinkingService().getLinkedObjects(rootObject, reference, node);

return importsList;
}


for return cross reference but it's not run
Previous Topic:Xtext for textual editing of CDO objects
Next Topic:How could XVariableDeclaration extend JvmIdentifiableElement ?
Goto Forum:
  


Current Time: Tue Oct 20 01:55:36 GMT 2020

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

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

Back to the top