@@ -21,7 +21,7 @@ open class HbsModuleReference(element: PsiElement, val moduleType: String) :
2121 private val internalModifiersFile = PsiFileFactory .getInstance(project).createFileFromText(" intellij-emberjs/internal/modifiers-stub" , Language .findLanguageByID(" TypeScript" )!! , this ::class .java.getResource(" /com/emberjs/external/ember-modifiers.ts" ).readText())
2222 private val internalComponentsFile = PsiFileFactory .getInstance(project).createFileFromText(" intellij-emberjs/internal/components-stub" , Language .findLanguageByID(" TypeScript" )!! , this ::class .java.getResource(" /com/emberjs/external/ember-components.ts" ).readText())
2323
24- private val internalHelpers = EmberUtils .resolveDefaultExport(internalHelpersFile) as JSObjectLiteralExpression
24+ protected val internalHelpers = EmberUtils .resolveDefaultExport(internalHelpersFile) as JSObjectLiteralExpression
2525 private val internalModifiers = EmberUtils .resolveDefaultExport(internalModifiersFile) as JSObjectLiteralExpression
2626 protected val internalComponents = EmberUtils .resolveDefaultExport(internalComponentsFile) as JSObjectLiteralExpression
2727
@@ -33,7 +33,14 @@ open class HbsModuleReference(element: PsiElement, val moduleType: String) :
3333 override fun multiResolve (incompleteCode : Boolean ): Array <out ResolveResult > {
3434 // Collect all components from the index
3535
36- if (moduleType == " helper" ) {
36+ if (moduleType == " helper" ) {
37+ if (internalHelpers.properties.map { it.name }.contains(element.text)) {
38+ val prop = internalHelpers.properties.find { it.name == element.text }
39+ return createResults((prop?.jsType?.sourceElement as JSReferenceExpression ).resolve())
40+ }
41+ }
42+
43+ if (moduleType == " component" ) {
3744 if (internalHelpers.properties.map { it.name }.contains(element.text)) {
3845 val prop = internalHelpers.properties.find { it.name == element.text }
3946 return createResults((prop?.jsType?.sourceElement as JSReferenceExpression ).resolve())
0 commit comments