Merge pull request #89 from eclipse/cd_bug500192

[500192] IdeContentProposalProvider - Don't call Scope Provider with null model
This commit is contained in:
Jan Köhnlein 2016-08-25 13:12:39 +02:00 committed by GitHub
commit 0aa7e9416a
2 changed files with 6 additions and 5 deletions

View file

@ -127,8 +127,9 @@ class IdeContentProposalProvider {
val type = findCurrentTypeAfter(reference)
if (type instanceof EClass) {
val ereference = GrammarUtil.getReference(reference, type)
if (ereference !== null) {
val scope = scopeProvider.getScope(context.currentModel, ereference)
val currentModel = context.currentModel
if (ereference !== null && currentModel !== null) {
val scope = scopeProvider.getScope(currentModel, ereference)
crossrefProposalProvider.lookupCrossReference(scope, reference, context, acceptor,
getCrossrefFilter(reference, context))
}

View file

@ -179,9 +179,9 @@ public class IdeContentProposalProvider {
final EClassifier type = this._currentTypeFinder.findCurrentTypeAfter(reference);
if ((type instanceof EClass)) {
final EReference ereference = GrammarUtil.getReference(reference, ((EClass)type));
if ((ereference != null)) {
EObject _currentModel = context.getCurrentModel();
final IScope scope = this.scopeProvider.getScope(_currentModel, ereference);
final EObject currentModel = context.getCurrentModel();
if (((ereference != null) && (currentModel != null))) {
final IScope scope = this.scopeProvider.getScope(currentModel, ereference);
Predicate<IEObjectDescription> _crossrefFilter = this.getCrossrefFilter(reference, context);
this.crossrefProposalProvider.lookupCrossReference(scope, reference, context, acceptor, _crossrefFilter);
}