Encapsulate Early Recognition of Reference Lines

From FetchWiki

Jump to: navigation, search


[edit] Status

  • Problem described
  • Solution suggested

[edit] Problem description

We currently loop over the Source Navigator database of all references twice: once for accesses (to Attributes or GlobalVariables) and once for invocations (to Methods or Functions). This entails the danger that a reference line is processed twice.

The current means to prevent processing a reference line twice consists of evaluating the reference as a potential access or a potential invocation before processing it. However, it is unclear whether this evaluation prevents double processing (e.g., whether being a potential access rules out being a potential invocation). Moreover, this evaluation is not encapsulated in a class.

[edit] Relevance

It is currently unclear whether a reference line is processed once and only once. This affects both false positives as well as performance.

[edit] Implemented Solution

  • Encapsulate this evaluation in a function.
  • Ensure that the isPotentialAccess and isPotentialInvocation checks can't both return true for the same reference line.
Personal tools