in gdscript/src/main/kotlin/gdscript/completion/GdLookup.kt [30:67]
fun create(
text: String,
lookup: String? = null,
typed: String? = null,
priority: Double? = null,
icon: Icon? = null,
color: Color? = null,
presentable: String? = null,
tail: String? = null,
handler: InsertHandler<LookupElement>? = null,
): LookupElement {
var builder = GdLookupElementBuilder
.create(text, if (lookup !== null) lookup else text)
.withTailText(tail)
.withTypeText(typed)
.withIcon(icon)
if (presentable !== null) {
builder = builder.withPresentableText(presentable)
}
if (handler !== null || lookup != null) {
builder = builder.withInsertHandler(handler ?: GdLookupInsertHandler.INSTANCE)
}
if (color !== null) {
builder = builder.withItemTextForeground(color)
}
if (priority === null) {
return builder
}
return PrioritizedLookupElement.withPriority(
builder,
priority,
)
}