"AssertionError: Declaration range is invalid" from DeclarationRangeUtil

Answered

My PairedBraceMatcher implementation calls DeclarationRangeUtil.getDeclarationRange(..) which throws an AssertionError, apparently getPossibleDeclarationAtRange returns null. Any idea why this could be happening and how to avoid it?

Thanks

2 comments
Comment actions Permalink

Looking at the code of getPossibleDeclarationAtRange suggests that no DeclarationRangeHandler is registered, neither explicitly nor via an extension. To avoid it, please either register some handler, or don't call getDeclarationRange :)

1

Please sign in to leave a comment.