Permalink
Browse files

Ensure primary node is properly calculated when in method context loc…

…ation.
  • Loading branch information...
1 parent c2842f2 commit d0d3e154535728ff8758aa661e90abb1e6558a12 @aeisenberg aeisenberg committed Oct 13, 2012
@@ -62,7 +62,8 @@
pattern.setCurrentScope(context.currentScope);
pattern.setTargetType(completionType);
pattern.setStatic(isStatic);
- pattern.setPrimaryNode(context.location == ContentAssistLocation.STATEMENT);
+ pattern.setPrimaryNode(context.location == ContentAssistLocation.STATEMENT ||
+ (context.location == ContentAssistLocation.METHOD_CONTEXT && context.currentScope.isPrimaryNode()));
contributions = store.findContributions(pattern, DSLPreferences.getDisabledScriptsAsSet());
boolean isMethodContext = context instanceof MethodInfoContentAssistContext;

0 comments on commit d0d3e15

Please sign in to comment.