Custom ScopeProvider + FilteringScope and Proxy Resolution ? [message #897108] |
Sat, 21 July 2012 17:57  |
Eclipse User |
|
|
|
I'm having the same problem stated here:.
I'm getting null value when trying to get a value of a feature of input.getEObjectOrProxy() in method below.
In the linked forum post, the suggestion id to create a custom ResourceDescriptionManager + ResourceDescriptionManager.
But in actual xtext version I couldn't find a bindIResourceDescriptionsManager() method.
There a new way to deal with this problem?
thanks,
Cristiano
public IScope scope_UnitInstance_superType(UnitInstance context,
EReference reference) {
IScope scope = delegateGetScope(context, reference);
return new FilteringScope(scope, new Predicate<IEObjectDescription>() {
public boolean apply(IEObjectDescription input) {
if (input != null
&& input.getEObjectOrProxy() instanceof UnitType) {
return input
.getEObjectOrProxy()
.eGet(SoftwareLibraryDslPackage.eINSTANCE
.getAbstractLibraryElement_Abstract())
.equals(Boolean.FALSE);
}
return false;
};
});
}
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03231 seconds