mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
[wechat] boolean attributes
GitOrigin-RevId: fb216b4274a948ef45316c2d8a785cfeeb570bb7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
18cd0f381b
commit
f1f7ec91fd
@@ -4,7 +4,9 @@ package com.intellij.html.webSymbols.attributes
|
|||||||
import com.intellij.html.webSymbols.attributes.impl.HtmlAttributeEnumConstValueSymbol
|
import com.intellij.html.webSymbols.attributes.impl.HtmlAttributeEnumConstValueSymbol
|
||||||
import com.intellij.html.webSymbols.attributes.impl.WebSymbolHtmlAttributeInfoImpl
|
import com.intellij.html.webSymbols.attributes.impl.WebSymbolHtmlAttributeInfoImpl
|
||||||
import com.intellij.psi.PsiElement
|
import com.intellij.psi.PsiElement
|
||||||
import com.intellij.webSymbols.*
|
import com.intellij.webSymbols.PsiSourcedWebSymbol
|
||||||
|
import com.intellij.webSymbols.WebSymbol
|
||||||
|
import com.intellij.webSymbols.WebSymbolOrigin
|
||||||
import com.intellij.webSymbols.completion.WebSymbolCodeCompletionItem
|
import com.intellij.webSymbols.completion.WebSymbolCodeCompletionItem
|
||||||
import com.intellij.webSymbols.query.WebSymbolsQueryExecutor
|
import com.intellij.webSymbols.query.WebSymbolsQueryExecutor
|
||||||
import org.jetbrains.annotations.ApiStatus
|
import org.jetbrains.annotations.ApiStatus
|
||||||
@@ -41,6 +43,40 @@ interface WebSymbolHtmlAttributeInfo {
|
|||||||
|
|
||||||
val priority: WebSymbol.Priority
|
val priority: WebSymbol.Priority
|
||||||
|
|
||||||
|
fun withName(name: String): WebSymbolHtmlAttributeInfo
|
||||||
|
|
||||||
|
fun withSymbol(symbol: WebSymbol): WebSymbolHtmlAttributeInfo
|
||||||
|
|
||||||
|
fun withAcceptsNoValue(acceptsNoValue: Boolean): WebSymbolHtmlAttributeInfo
|
||||||
|
|
||||||
|
fun withAcceptsValue(acceptsValue: Boolean): WebSymbolHtmlAttributeInfo
|
||||||
|
|
||||||
|
fun withEnumValues(enumValues: List<WebSymbolCodeCompletionItem>?): WebSymbolHtmlAttributeInfo
|
||||||
|
|
||||||
|
fun withStrictEnumValues(strictEnumValues: Boolean): WebSymbolHtmlAttributeInfo
|
||||||
|
|
||||||
|
fun withType(type: Any?): WebSymbolHtmlAttributeInfo
|
||||||
|
|
||||||
|
fun withIcon(icon: Icon?): WebSymbolHtmlAttributeInfo
|
||||||
|
|
||||||
|
fun withRequired(required: Boolean): WebSymbolHtmlAttributeInfo
|
||||||
|
|
||||||
|
fun withDefaultValue(defaultValue: String?): WebSymbolHtmlAttributeInfo
|
||||||
|
|
||||||
|
fun withPriority(priority: WebSymbol.Priority): WebSymbolHtmlAttributeInfo
|
||||||
|
|
||||||
|
fun with(name: String = this.name,
|
||||||
|
symbol: WebSymbol = this.symbol,
|
||||||
|
acceptsNoValue: Boolean = this.acceptsNoValue,
|
||||||
|
acceptsValue: Boolean = this.acceptsValue,
|
||||||
|
enumValues: List<WebSymbolCodeCompletionItem>? = this.enumValues,
|
||||||
|
strictEnumValues: Boolean = this.strictEnumValues,
|
||||||
|
type: Any? = this.type,
|
||||||
|
icon: Icon? = this.icon,
|
||||||
|
required: Boolean = this.required,
|
||||||
|
defaultValue: String? = this.defaultValue,
|
||||||
|
priority: WebSymbol.Priority = this.priority): WebSymbolHtmlAttributeInfo
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@@ -55,5 +91,23 @@ interface WebSymbolHtmlAttributeInfo {
|
|||||||
symbol: WebSymbol): WebSymbolHtmlAttributeInfo =
|
symbol: WebSymbol): WebSymbolHtmlAttributeInfo =
|
||||||
WebSymbolHtmlAttributeInfoImpl.create(name, queryExecutor, symbol)
|
WebSymbolHtmlAttributeInfoImpl.create(name, queryExecutor, symbol)
|
||||||
|
|
||||||
|
@JvmStatic
|
||||||
|
fun create(
|
||||||
|
name: String,
|
||||||
|
symbol: WebSymbol,
|
||||||
|
acceptsNoValue: Boolean = false,
|
||||||
|
acceptsValue: Boolean = true,
|
||||||
|
enumValues: List<WebSymbolCodeCompletionItem>? = null,
|
||||||
|
strictEnumValues: Boolean = false,
|
||||||
|
type: Any? = null,
|
||||||
|
icon: Icon? = null,
|
||||||
|
required: Boolean = false,
|
||||||
|
defaultValue: String? = null,
|
||||||
|
priority: WebSymbol.Priority = WebSymbol.Priority.NORMAL
|
||||||
|
): WebSymbolHtmlAttributeInfo = WebSymbolHtmlAttributeInfoImpl(
|
||||||
|
name, symbol, acceptsNoValue, acceptsValue, enumValues,
|
||||||
|
strictEnumValues, type, icon, required, defaultValue, priority
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -24,6 +24,62 @@ internal data class WebSymbolHtmlAttributeInfoImpl(
|
|||||||
override val priority: WebSymbol.Priority
|
override val priority: WebSymbol.Priority
|
||||||
) : WebSymbolHtmlAttributeInfo {
|
) : WebSymbolHtmlAttributeInfo {
|
||||||
|
|
||||||
|
override fun withName(name: String): WebSymbolHtmlAttributeInfo =
|
||||||
|
copy(name = name)
|
||||||
|
|
||||||
|
override fun withSymbol(symbol: WebSymbol): WebSymbolHtmlAttributeInfo =
|
||||||
|
copy(symbol = symbol)
|
||||||
|
|
||||||
|
override fun withAcceptsNoValue(acceptsNoValue: Boolean): WebSymbolHtmlAttributeInfo =
|
||||||
|
copy(acceptsNoValue = acceptsNoValue)
|
||||||
|
|
||||||
|
override fun withAcceptsValue(acceptsValue: Boolean): WebSymbolHtmlAttributeInfo =
|
||||||
|
copy(acceptsValue = acceptsValue)
|
||||||
|
|
||||||
|
override fun withEnumValues(enumValues: List<WebSymbolCodeCompletionItem>?): WebSymbolHtmlAttributeInfo =
|
||||||
|
copy(enumValues = enumValues)
|
||||||
|
|
||||||
|
override fun withStrictEnumValues(strictEnumValues: Boolean): WebSymbolHtmlAttributeInfo =
|
||||||
|
copy(strictEnumValues = strictEnumValues)
|
||||||
|
|
||||||
|
override fun withType(type: Any?): WebSymbolHtmlAttributeInfo =
|
||||||
|
copy(type = type)
|
||||||
|
|
||||||
|
override fun withIcon(icon: Icon?): WebSymbolHtmlAttributeInfo =
|
||||||
|
copy(icon = icon)
|
||||||
|
|
||||||
|
override fun withRequired(required: Boolean): WebSymbolHtmlAttributeInfo =
|
||||||
|
copy(required = required)
|
||||||
|
|
||||||
|
override fun withDefaultValue(defaultValue: String?): WebSymbolHtmlAttributeInfo =
|
||||||
|
copy(defaultValue = defaultValue)
|
||||||
|
|
||||||
|
override fun withPriority(priority: WebSymbol.Priority): WebSymbolHtmlAttributeInfo =
|
||||||
|
copy(priority = priority)
|
||||||
|
|
||||||
|
override fun with(name: String,
|
||||||
|
symbol: WebSymbol,
|
||||||
|
acceptsNoValue: Boolean,
|
||||||
|
acceptsValue: Boolean,
|
||||||
|
enumValues: List<WebSymbolCodeCompletionItem>?,
|
||||||
|
strictEnumValues: Boolean,
|
||||||
|
type: Any?,
|
||||||
|
icon: Icon?,
|
||||||
|
required: Boolean,
|
||||||
|
defaultValue: String?,
|
||||||
|
priority: WebSymbol.Priority): WebSymbolHtmlAttributeInfo =
|
||||||
|
copy(name = name,
|
||||||
|
symbol = symbol,
|
||||||
|
acceptsNoValue = acceptsNoValue,
|
||||||
|
acceptsValue = acceptsValue,
|
||||||
|
enumValues = enumValues,
|
||||||
|
strictEnumValues = strictEnumValues,
|
||||||
|
type = type,
|
||||||
|
icon = icon,
|
||||||
|
required = required,
|
||||||
|
defaultValue = defaultValue,
|
||||||
|
priority = priority)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun create(name: String,
|
fun create(name: String,
|
||||||
queryExecutor: WebSymbolsQueryExecutor,
|
queryExecutor: WebSymbolsQueryExecutor,
|
||||||
|
|||||||
Reference in New Issue
Block a user