Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » My DSL is acessing variables from another file, without import
My DSL is acessing variables from another file, without import [message #1803822] Mon, 11 March 2019 14:42 Go to next message
Noslen Acesnof is currently offline Noslen AcesnofFriend
Messages: 23
Registered: February 2019
Junior Member
Hello,

My DSL is having a weird behavior.
When I have two files .mydsl I can access in on file the variables of the other, without any import. Can you help me?

Var:	
	'var' name=QualifiedName '='  value=VariableValue
;

VariableValue:
	{VariableValue} STRING |
	VariableReference
;

VariableReference:
   '#'ref=[Var|QualifiedName];

 QualifiedName:
    ID ('.' ID)*;

Re: My DSL is acessing variables from another file, without import [message #1803826 is a reply to message #1803822] Mon, 11 March 2019 15:23 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13163
Registered: July 2009
Senior Member
his this is normal xtext behaviour. by default you can see stuff from other files.
you can create a bind a nullimpl for IGlobalScopeProvider that returns IScope.NULLSCOPE


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/xtext/
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: My DSL is acessing variables from another file, without import [message #1803827 is a reply to message #1803826] Mon, 11 March 2019 16:04 Go to previous message
Noslen Acesnof is currently offline Noslen AcesnofFriend
Messages: 23
Registered: February 2019
Junior Member
Ok, thanks ;)
Previous Topic:Template language
Next Topic:XImportSection and global scoping
Goto Forum:
  


Current Time: Mon Oct 21 05:25:42 GMT 2019

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

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

Back to the top