@@ -7,7 +7,7 @@ import com.github.vbmacher.intellij.cucumber.scala.steps.{ScStepDefinition, ScSt
77import com .intellij .openapi .module .{Module , ModuleUtilCore }
88import com .intellij .openapi .progress .ProgressManager
99import com .intellij .openapi .vfs .VirtualFile
10- import com .intellij .psi .search .GlobalSearchScope
10+ import com .intellij .psi .search .{ GlobalSearchScope , ProjectScope }
1111import com .intellij .psi .util .PsiTreeUtil
1212import com .intellij .psi .{PsiElement , PsiFile , PsiManager }
1313import com .intellij .util .indexing .FileBasedIndex
@@ -45,10 +45,13 @@ class ScCucumberExtension extends AbstractCucumberExtension {
4545
4646 override def loadStepsFor (featureFile : PsiFile , module : Module ): java.util.List [AbstractStepDefinition ] = {
4747 val fileBasedIndex = FileBasedIndex .getInstance()
48- val searchScope = module.getModuleWithDependenciesAndLibrariesScope(true )
49- val scalaFiles = GlobalSearchScope .getScopeRestrictedByFileTypes(searchScope, ScalaFileType .INSTANCE )
5048 val project = module.getProject
5149
50+ val searchScope = module
51+ .getModuleWithDependenciesAndLibrariesScope(true )
52+ .uniteWith(ProjectScope .getLibrariesScope(project))
53+ val scalaFiles = GlobalSearchScope .getScopeRestrictedByFileTypes(searchScope, ScalaFileType .INSTANCE )
54+
5255 val result = collection.mutable.Buffer .empty[AbstractStepDefinition ]
5356
5457 fileBasedIndex.processValues(ScCucumberStepIndex .INDEX_ID , java.lang.Boolean .TRUE , null , {
0 commit comments