Community
Participate
Working Groups
(RC1) In the MDT/OCL Complete OCL Grammar with the following text segment from the RoyalAndLoyal example project. context ServiceLevel inv invariant_ServiceLevel17 : (OrderedSet{'a', 'b', 'c', 'd'}->subOrderedSet(2, 3)) = OrderedSet{'b', 'c'} Setting the cursor after "Se" in "context ServiceLevel" gives a very credible set of proposals. This is a Complete OCL construct. Setting the cursor after "su" in "'d'}->subOrderedSet(2" gives nothing. This is an Essential OCL construct that the Complete OCL grammar refines and extends. a) no pop-up offering nothing b) no proposals for which at least subOrderedSet is an option Since the scope lookup is never invoked I suspect this is an Xtext rather than MDT/OCL problem. Attempting to debug: ContentAssistContext[] contexts are empty, although parser.getFollowElements(completeInput) did return some candidates. Setting the cursor after "->" in "'d'}->subOrderedSet(2" does not even seem to find any follow elements.
The problems seems to be the required lookahead of 26 (due to backtracking). I will briefly look into this and if I can spot the something obvious, I'll try to fix it. Otherwise it won't make it into 1.0.
Don't struggle to do this for 1.0.0; we can't expect 1.0.0 to be perfect in every respect. Certainly my editors aren't. Hit the performance issues first; those can be bad on even medium-size models nearly all of the time. A few missing completion proposals have no impact most of the time.
The problem is in org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser.followElementFactory.new IFollowElementFactory() {...}.createFollowElement(AbstractElement, int) but there is no straight forward way to fix this now. Will be done in the SR1.
Fixed in HEAD.
Closing bug which were set to RESOLVED before Eclipse Neon.0.