Community
Participate
Working Groups
Build Identifier: Xtext v2.0.1 I have defined a grammar that uses Xbase. When using the generated editor and the proposal feature at a place where an Xbase expression is expected, I get the following ClassCastException: java.lang.ClassCastException: my.package.MyScopeProvider cannot be cast to org.eclipse.xtext.xbase.scoping.XbaseScopeProvider at org.eclipse.xtext.xbase.ui.contentassist.XbaseProposalProvider.getScopeProvider(XbaseProposalProvider.java:214) This is true, because the generated MyScopeProvider extends AbstractDeclarativeScopeProvider but not XbaseProposalProvider. Reproducible: Always Steps to Reproduce: 1. create a grammar using xbase 2. use the proposal feature of the generated editor
Sorry, the last sentence of course should have read "[...] but not XbaseScopeProvider".
The ScopeProvider of your language should extend XbaseProposalProvider. After integrating Xbase this step could not be done automatically because your ScopeProvider is a generate ones artefact.
When extending XbaseScopeProvider myself, I get a discouraged access warning (as the according package is only exported to a list of defined friends). Would it be possible to remove this export restriction?
The packages are exported as internal since the APIs are not yet carved in stone (changes are possible). We will make them public as soon as we are satisfied with the solution.
Ok, thanks for the clarification!
Closing all bugs that were set to RESOLVED before Neon.0