Skip to main content



      Home
Home » Modeling » TMF (Xtext) » Scope method not execute?
Scope method not execute? [message #991272] Tue, 18 December 2012 04:40 Go to next message
Eclipse UserFriend
I've got this IScope method:
        IScope scope_Assignment(AssignmentOrFBCall a, EReference ref){
		System.out.println(a.toString());
		return IScope.NULLSCOPE;
	}


but it doesn't produce any results. Nothing in output with println and content assistant does not change. So I thought it hasn't be executed, but if I try to add a breakpoint, it will be crossed.

So, where is the problem?

Grammar rule is this:
AssignmentOrFBCall:
	(((variable=[VariableDefinition]) |
	((variableArray=[ArrayDefinition]'['index=ExpressionIndex']')('.'internalVariable=InternalRecursive)?) | 
	(variableStructOrFB=[VariableDefinition]'.')(internalVariable=InternalRecursive))
	((':='expression=Expression)|('('(parameter=FBParameter | ')'))))
;
Re: Scope method not execute? [message #991283 is a reply to message #991272] Tue, 18 December 2012 05:37 Go to previous messageGo to next message
Eclipse UserFriend
Hi Xtext creates objects lazy so the context may be a parent. Use a
parent as context or try an unassigned action

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: Scope method not execute? [message #991288 is a reply to message #991272] Tue, 18 December 2012 06:06 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

the name of the scope method must be correct as well. Debug the getPredicate method in AbstractDeclarativeScopeProvider to see the "expected" method name.

Alex
Re: Scope method not execute? [message #991462 is a reply to message #991288] Wed, 19 December 2012 05:43 Go to previous message
Eclipse UserFriend
Alexander Nittka wrote on Tue, 18 December 2012 12:06
Hi,

the name of the scope method must be correct as well. Debug the getPredicate method in AbstractDeclarativeScopeProvider to see the "expected" method name.

Alex


Ok,
I'll try it.

Very thank you.
Previous Topic:[M4 Release] The new type system
Next Topic:Question about "Couldn't resolve reference to JvmIdentifiableElement"
Goto Forum:
  


Current Time: Tue Jul 22 18:11:56 EDT 2025

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

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

Back to the top