Skip to content

Commit

Permalink
cosmetic
Browse files Browse the repository at this point in the history
  • Loading branch information
ghik committed Oct 18, 2019
1 parent cb0a57b commit 73b6aad
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions src/org/jetbrains/plugins/hocon/psi/HoconPsiElement.scala
Original file line number Diff line number Diff line change
Expand Up @@ -402,20 +402,18 @@ final class HQualifiedIncluded(ast: ASTNode) extends HoconPsiElement(ast) {
for {
hs <- target
vf <- Option(getContainingFile.getOriginalFile.getVirtualFile)
rs <- {
val strVal = hs.stringValue
qualifier match {
case Some(ClasspathModifier) =>
Some(new IncludedFileReferenceSet(strVal, hs, true, true, scope))
case Some(FileModifier) =>
Some(new IncludedFileReferenceSet(strVal, hs, true, false, scope))
case None if !isValidUrl(strVal) =>
val pfi = ProjectRootManager.getInstance(getProject).getFileIndex
val fromClasspath = pfi.isInSource(vf) || pfi.isInLibraryClasses(vf)
Some(new IncludedFileReferenceSet(strVal, hs, false, fromClasspath, scope))
case _ =>
None
}
strVal = hs.stringValue
rs <- qualifier match {
case Some(ClasspathModifier) =>
Some(new IncludedFileReferenceSet(strVal, hs, true, true, scope))
case Some(FileModifier) =>
Some(new IncludedFileReferenceSet(strVal, hs, true, false, scope))
case None if !isValidUrl(strVal) =>
val pfi = ProjectRootManager.getInstance(getProject).getFileIndex
val fromClasspath = pfi.isInSource(vf) || pfi.isInLibraryClasses(vf)
Some(new IncludedFileReferenceSet(strVal, hs, false, fromClasspath, scope))
case _ =>
None
}
} yield rs
}
Expand Down

0 comments on commit 73b6aad

Please sign in to comment.