Fix navigation tooltips etc. in #ifdeffed parts of headers

Authored by zwabel on Jul 25 2016, 6:50 PM.

Description

Fix navigation tooltips etc. in #ifdeffed parts of headers

In headers which are included from multiple locations with
different #ifdefs, code navigation often didn't work for
parts which are #ifdeffed. In such cases, there are overlapping
contexts. The problem was that findContextAt picked a random
one of the overlapping context, and then the declaration/use
was searched within that context, but maybe it wasn't there.

Don't call findContextAt; instead, combine its logic into the
recursive function that searches for declarations and uses,
which is now called itemUnderCursorInternal.

Also merge itemUnderCursor and itemRangeUnderCursor into
one function, because they basically do the same thing.
Instead let itemUnderCursor return all relevant information
in a tuple like structure.

Details

Committed
zwabelJul 25 2016, 6:50 PM
Parents
R32:b38947e5edd8: Don't pop up navigation tooltip by keyboard when completion is active
Branches
Unknown
Tags
Unknown