mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
this is needed to handle cases when the value is "expandable" - there are two different options to write the same (product = lib or product {type = lib}), but in some cases one of them requires expanding by default (lib requires a set of platforms)
instead of introducing the notion of "expandable" into the schema, we just provide an ability to provide a custom completion insert handler to handle tricky cases like that
GitOrigin-RevId: 5e54f19326891d7d02061b338efb392fc0ae2634
17 lines
796 B
Java
17 lines
796 B
Java
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
|
package com.jetbrains.jsonSchema.extension;
|
|
|
|
import com.intellij.codeInsight.completion.InsertHandler;
|
|
import com.intellij.codeInsight.lookup.LookupElement;
|
|
import com.intellij.openapi.extensions.ExtensionPointName;
|
|
import com.jetbrains.jsonSchema.impl.JsonSchemaObject;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
public interface JsonSchemaCompletionHandlerProvider {
|
|
ExtensionPointName<JsonSchemaCompletionHandlerProvider> EXTENSION_POINT_NAME = ExtensionPointName.create("com.intellij.json.jsonSchemaCompletionHandlerProvider");
|
|
|
|
default @Nullable InsertHandler<LookupElement> createHandlerForEnumValue(JsonSchemaObject schema, String value) {
|
|
return null;
|
|
}
|
|
}
|