@Override
	public List<Either<Command, CodeAction>> getActions(EventCodeActionContext context) {
        List<Either<Command, CodeAction>> result = new ArrayList<>();

        for (Diagnostic diagnostic : context.diagnostics) {
            if (diagnostic.getCode() == null) {
                // unhandled
                continue;
            }

            if (diagnostic.getCode().isLeft()) continue; // we don't to string codes

            DiagnosticCode code = SchemaDiagnostic.codeFromInt(diagnostic.getCode().getRight());

            switch (code) {
                case SCHEMA_NAME_SAME_AS_FILE:
                    result.add(Either.forRight(fixSchemaNameSameAsFile(context, diagnostic)));
                    break;
                case DOCUMENT_NAME_SAME_AS_SCHEMA:
                    result.add(Either.forRight(fixDocumentNameSameAsSchema(context, diagnostic)));
                    break;
                case ACCESS_UNIMPORTED_FIELD:
                    result.add(Either.forRight(fixAccessUnimportedField(context, diagnostic)));
                    break;
                case DOCUMENTLESS_SCHEMA:
                    result.add(Either.forRight(fixDocumentlessSchema(context, diagnostic)));
                    break;
                case DOCUMENT_REFERENCE_ATTRIBUTE:
                    result.add(Either.forRight(fixDocumentReferenceAttribute(context, diagnostic)));
                    break;
                case IMPORT_FIELD_ATTRIBUTE:
                    result.add(Either.forRight(fixImportFieldAttribute(context, diagnostic)));
                    break;
                case EXPLICITLY_INHERIT_DOCUMENT:
                    result.add(Either.forRight(fixExplicitlyInheritDocument(context, diagnostic)));
                    break;
                case INHERITS_STRUCT_FIELD_REDECLARED:
                    result.add(Either.forRight(fixInheritsStructFieldRedeclared(context, diagnostic)));
                    break;
                case ANNOTATION_REFERENCE_OUTSIDE_ANNOTATION:
                    result.add(Either.forRight(fixAnnotationReferenceOutsideAnnotation(context, diagnostic)));
                    break;
                case DEPRECATED_ARRAY_SYNTAX:
                    result.add(Either.forRight(fixDeprecatedArraySyntax(context, diagnostic)));
                    break;
                case DEPRECATED_TOKEN_SEARCH:
                    result.add(Either.forRight(fixDeprecatedTokenSearch(context, diagnostic)));
                    break;
                case DEPRECATED_TOKEN_ATTRIBUTE:
                case DEPRECATED_TOKEN_INDEX:
                    result.add(Either.forRight(fixDeprecatedTokenAttributeOrIndex(context, diagnostic, code)));
                    break;
                case FEATURES_INHERITS_NON_PARENT:
                    result.add(Either.forRight(fixFeaturesInheritsNonParent(context, diagnostic)));
                    break;
                case FIELD_ARGUMENT_MISSING_INDEXING_TYPE:
                    result.add(Either.forRight(fixFieldArgumentMissingIndexingType(context, diagnostic)));
                    break;
                default:
                    break;
            }
        }

        return result;
	}
Quick fix for using attribute some_name_other_than_field_name in a field. Will create a new field outside 
the document with the specified attribute, using the original field as input and type.
@param context
@param diagnostic
@param code
@return CodeAction supplying the edits.
integration/schema-language-server/language-server/src/main/java/ai/vespa/schemals/lsp/schema/codeaction/provider/QuickFixProvider.java