|
|
|
|
|
|
|
Re: Ambiguities in xText scoping "Context" [message #1067567 is a reply to message #1007069] |
Tue, 09 July 2013 07:30  |
Eclipse User |
|
|
|
Revisting this after seeing it in another post, as I've been moving my work to xtext 2.4 and had to rework the scoping.
It looks like the extra layer of PortRef doesn't help. If you simplify to this:
CallService:
{CallService}
'CallService' ('::' name=EString)?
'{'
('sourcePort' sourcePort=[PortEvent])?
('targetPort' targetPort=[PortEvent])?
'}';
PortEvent: {PortEvent} 'PortEvent' ('::' name=EString)?;
Then in your scope provider (or delegate) scoping method check if reference == YourDSLPackage$Literals::CALL_SERVICE__SOURCE_PORT or CALL_SERVICE__TARGET_PORT to see which one you are in. You won't care what the context is.
(if you're pre-2.4 with a Java scoping class then its '.' instead of $ or ::)
|
|
|
Powered by
FUDForum. Page generated in 0.04363 seconds