"AssertionError: Declaration range is invalid" from DeclarationRangeUtil

已回答

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

0

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

请先登录再写评论。