Skip to content

Commit

Permalink
Review changes update
Browse files Browse the repository at this point in the history
  • Loading branch information
kpbochenek committed Feb 18, 2020
1 parent 37012e4 commit db2d22b
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@ final class ReferenceProvider(
maybeOccurrence match {
case Some(occurrence) =>
val symbolName = occurrence.symbol.desc.name.value
if (ReferenceProvider.methodsSearchedWithoutInheritance.contains(
symbolName
)) {
val shouldIncludeInheritance =
ReferenceProvider.methodsSearchedWithoutInheritance.contains(symbolName)

if (shouldIncludeInheritance) {
currentSymbolReferences(
filePosition,
includeDeclaration
Expand Down Expand Up @@ -128,12 +129,12 @@ final class ReferenceProvider(
): Seq[Location] = {
val parentSymbols = implementation
.topMethodParents(doc, symbolOccurrence.symbol)
val txtParams: Seq[FilePosition] = {
val parentPositions: Seq[FilePosition] = {
if (parentSymbols.isEmpty) List(filePosition)
else parentSymbols.map(locationToFilePosition)
}
val isLocal = symbolOccurrence.symbol.isLocal
val currentReferences = txtParams
val currentReferences = parentPositions
.flatMap(
currentSymbolReferences(
_,
Expand All @@ -150,7 +151,7 @@ final class ReferenceProvider(
.filter(_.getUri.isScalaFilename)
else parentSymbols
}
val implReferences = txtParams.flatMap(
val implReferences = parentPositions.flatMap(
implementations(_, !symbolOccurrence.symbol.desc.isType)
)

Expand Down

0 comments on commit db2d22b

Please sign in to comment.