Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Non-Standard import and namespace(Non-Standard import and namespace)
Non-Standard import and namespace [message #1800530] Tue, 01 January 2019 16:05 Go to next message
Pierre Padovani is currently offline Pierre PadovaniFriend
Messages: 7
Registered: November 2018
Junior Member
We are building a configuration based grammar that can 'import' other saved models, similar in nature to the standard ImportURI method. The difference is that the 'uri' for us is a UUID and version of the saved model stored on a server.
(I won't go into the rational behind our approach, but a filesystem based import scheme is not where we are going.)

So something like:

import SomeModelType {id=a2effa0e-2c04-4336-bea7-2c56c9fceaad version="1.0.0"} as aliasNamespace


Referencing a model from the import elsewhere would look like:
aliasNamespace.myModel


I've read several blogs and posts about imports and namespace, but am still a bit lost around what the correct approach I should be taking here. Any guidance would be greatly appreciated!

Thanks!
Re: Non-Standard import and namespace [message #1800537 is a reply to message #1800530] Tue, 01 January 2019 19:16 Go to previous message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

Since your approach is similar to import URIs, you should probably start examining the ImportUriGlobalScopeProvider and provide something similar for your case and bind it as implementation of the IGlobalScopeProvider interface (override bindIGlobalScopeProvider in the runtime module).
Previous Topic:Error in Rules
Next Topic:Error in entering an ID having the same name as a keyword
Goto Forum:
  


Current Time: Sat Apr 27 03:30:33 GMT 2024

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

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

Back to the top