LWC11 XText Submission [message #728628] |
Fri, 23 September 2011 14:57 |
Michel Simeon Messages: 130 Registered: December 2009 |
Senior Member |
|
|
I find the LWC11 XText submission a very good tutorial to learn some of the most advanced features of Xtext and am trying to follow it step by step.
There is a warning that XText 2.0 was not fully stabilized when this was written, and indeed this is creating some problems when trying to run it using Eclipse 3.7 and XText 2.0.1.
I have reached the last section of Phase 1.1, Implementing the Scope Provider.
The paper gives:
public class InstancesScopeProvider extends XbaseScopeProvider {
@Override
public IScope createLocalVarScopeForBlock(final XBlockExpression block, final int indexOfContextExpressionInBlock,
final IScope parentScope) {
...
}
The @Override triggers an error because now XbaseScopeProvider.createLocalVarScopeForBlock has one more parameter (Boolean referredFromClosure). Should I add the parameter to the method then ?
There is a similar problem with the next method:
public IScope createLocalVarScope(final EObject context, final EReference reference, final IScope parentScope,
final boolean includeCurrentBlock, final int idx) {
if (context instanceof Instance) {
...
return MapBasedScope.createScope(parentScope, Scopes.scopedElementsFor(localVars));
} else {
return super.createLocalVarScope(context, reference, parentScope, includeCurrentBlock, idx);
}
}
The parameter list of super.createLocalVarScope is now quite different:
protected IScope createLocalVarScope(IScope parentScope, LocalVariableScopeContext scopeContext) {
How should that be handled ?
Thanks for help
MS
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03352 seconds