Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,12 @@ package com.github.tempest.framework
object TempestFrameworkUtil {
const val TEMPLATE_SUFFIX = ".view.php"
const val COMPONENT_NAME_PREFIX = "x-"

val BUILT_IN_DIRECTIVE_ATTRIBUTES = setOf(
":if",
":elseif",
":else",
":foreach",
":forelse",
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ class ComponentReferenceContributor : PsiReferenceContributor() {
val attribute = element as? XmlAttribute ?: return emptyArray()
val htmlTag = attribute.parent as? HtmlTag ?: return emptyArray()

if (attribute.name in TempestFrameworkUtil.BUILT_IN_DIRECTIVE_ATTRIBUTES) {
return emptyArray()
}

return arrayOf(TempestAttributeReference(element, htmlTag))
// .apply { println("found references for ${element} ${this.joinToString { it.toString() }}") }
}
Expand Down
Loading