Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Explanation of Binding in layman terms?
Explanation of Binding in layman terms? [message #1766835] Tue, 27 June 2017 23:39 Go to next message
Robert Huang is currently offline Robert HuangFriend
Messages: 3
Registered: June 2017
Junior Member
Hi XText community. I just started using XText, and I tried understanding binding and writing scoping methods using the documentation but couldn't get it. If someone can explain where to write scoping methods and how in a DSL and what binding is would be extremely helpful.

[Updated on: Mon, 03 July 2017 00:03]

Report message to a moderator

Re: Explanation of Binding in layman terms? [message #1766901 is a reply to message #1766835] Wed, 28 June 2017 16:06 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14661
Registered: July 2009
Senior Member
if you create a dsl with the wizard you get

<MyDsl>ScopeProvider.xtend pregenerated.
simply open it and override getScope

class MyDslScopeProvider extends AbstractMyDslScopeProvider {
	
	override getScope(EObject context, EReference reference) {
		// TODO implement
		super.getScope(context, reference)
	}

}


- use parameter reference to find out which reference you scope.
- use parameter context to find out where you are and to navigate through the model

https://de.slideshare.net/holgerschill/deep-dive-into-xtext-scoping-local-and-global-scopes-explained


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:How to exclude resources from build
Next Topic:Problem with external ecore model
Goto Forum:
  


Current Time: Tue Mar 19 07:47:09 GMT 2024

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

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

Back to the top