Skip to content

Commit

Permalink
Fixed access to
Browse files Browse the repository at this point in the history
  • Loading branch information
Alefas committed Jul 25, 2016
1 parent 422dd1f commit ae74fbd
Showing 1 changed file with 6 additions and 7 deletions.
Expand Up @@ -34,15 +34,14 @@ trait ScAnnotationsHolder extends ScalaPsiElement with PsiAnnotationOwner {
case _ => None
}

val maybeStubAnnotations = maybeStub.toSeq flatMap {
_.getChildrenByType(TokenSet.create(ScalaElementTypes.ANNOTATIONS),
JavaArrayFactoryUtil.ScAnnotationsFactory).toSeq
} headOption
val maybeStubAnnotations = maybeStub.toSeq.flatMap({
_.getChildrenByType(TokenSet.create(ScalaElementTypes.ANNOTATIONS),
JavaArrayFactoryUtil.ScAnnotationsFactory).toSeq
}).headOption

val maybeAnnotations = (maybeStubAnnotations ++
Option(findChildByClassScala(classOf[ScAnnotations]))) headOption
val maybeAnnotations = maybeStubAnnotations.orElse(Option(findChildByClassScala(classOf[ScAnnotations])))

maybeAnnotations.toSeq flatMap {
maybeAnnotations.toSeq.flatMap {
_.getAnnotations.toSeq
}
}
Expand Down

0 comments on commit ae74fbd

Please sign in to comment.