Skip to main content



      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 11:05 Go to next message
Eclipse UserFriend
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 14:16 Go to previous message
Eclipse UserFriend
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: Sun Jun 22 11:52:33 EDT 2025

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

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

Back to the top