AIP Support

March 9, 2026 · View on GitHub

Package: io.kanro.idea.plugin.protobuf.aip Config: Registered in main plugin.xml

Overview

Implements support for Google API Improvement Proposals (AIP) — a set of design guidelines for Google APIs. The AIP spec defines conventions for resource types, standard methods, and field behaviors that this module validates and assists with.

Features

Annotations

AipAnnotator validates AIP conventions in proto files:

  • Resource definition correctness
  • Standard method patterns (Create, Get, List, Update, Delete)
  • Field behavior annotations

Completion

AipCompletionContributor provides:

  • Resource type name completion
  • AIP method pattern suggestions
  • Standard field names for AIP resources

Resource References

Resolves (google.api.resource_reference) type strings to their target resource definitions. This allows navigation from a resource reference in one proto file to the resource definition in another.

Quick Fixes

  • AddResourceImportFix — Auto-import missing resource type definitions

Spec Methods

AipSpecMethod defines the standard AIP method patterns and their expected signatures.

Key Files

FilePurpose
AipOptions.ktAIP option definitions and constants
Extension.ktExtension declarations
annotator/AipAnnotator.ktAIP convention validation
completion/AipCompletionContributor.ktAIP-aware completion
method/AipSpecMethod.ktStandard method patterns
quickfix/AddResourceImportFix.ktAuto-import fix
reference/AipResourceReference.ktResource reference resolution
reference/AipResourceResolver.ktResource type resolver