private CodeAction fixExplicitlyInheritDocument(EventCodeActionContext context, Diagnostic diagnostic) {
        Node offendingNode = CSTUtils.getSymbolAtPosition(context.document.getRootNode(), context.position);
        if (offendingNode == null) return null;

        Symbol schemaReferenceSymbol = offendingNode.getSymbol();

        String mySchemaIdentifier = offendingNode.getParent().get(1).getText();

        Optional<Symbol> myDocumentDefinition = context.schemaIndex.findSymbol(null, SymbolType.DOCUMENT, mySchemaIdentifier);

        // findSymbol on DOCUMENT may return SCHEMA. In that case we are not interested
        if (myDocumentDefinition.isEmpty() || myDocumentDefinition.get().getType() != SymbolType.DOCUMENT) return null;

        Node documentIdentifierNode = myDocumentDefinition.get().getNode();

        CodeAction action = basicQuickFix("Inherit document '" + schemaReferenceSymbol.getShortIdentifier() + "'", diagnostic);

        action.setEdit(CodeActionUtils.createInheritsEdit(context, documentIdentifierNode, inheritsDocument.class, schemaReferenceSymbol.getShortIdentifier()));

        action.setIsPreferred(true);

        return action;
    }
Provides quick fix for importing a field that is not an attribute.
@param context
@param diagnostic
@return A CodeAction that will set indexing to attribute for the original field.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/lsp/schema/codeaction/provider/QuickFixProvider.java