Editor

Use the Editor Assistant

Use the ApiHug editor context menu to create and edit proto files faster inside IntelliJ IDEA.

What This Page Covers

This page explains the editor-side context actions provided by the ApiHug IntelliJ plugin.

Use these actions when you want to create or edit proto structures directly from the IDE instead of writing every block by hand.

Also see the Shortcut Cheatsheet.

When To Use It

Use the editor assistant when you need to:

  • create a new proto file quickly
  • add messages, fields, services, enums, errors, or entities with the correct structure
  • keep editing flow inside the IDE without switching to external generators or templates

Add a Proto File

  1. Open the proto module and locate src/main/proto.
  2. Right-click the target directory.
  3. Choose Add Proto File.
  4. Select the correct proto file type for the document you want to create.
ApiHug editor assistant add file

Edit a Message File

Use this flow in files that declare a bean-style document such as:

Proto
option (hope.domain.kind) = BEAN;

Available actions include:

  • Add Message
  • Add Field
  • Add Field(Reference)
ApiHug editor assistant add message

Edit a Service File

Use this flow in files that declare an IDL-style document such as:

Proto
option (hope.domain.kind) = IDL;

Available actions include:

  • Add Service
  • Add Method
ApiHug editor assistant add service

Edit an Enum File

Use this flow in files that declare an enum document such as:

Proto
option (hope.domain.kind) = ENUM;

Available actions include:

  • Add Enum
  • Add Enum Item
ApiHug editor assistant add enum

Edit an Error File

Use this flow in files that declare an error document such as:

Proto
option (hope.domain.kind) = ERROR;

Available actions include:

  • Add Error
  • Add Error Item
ApiHug editor assistant add error

Edit an Entity File

Use this flow in files that declare an entity document such as:

Proto
option (hope.domain.kind) = ENTITY;

Available actions include:

  • Add Entity
  • Add Column
ApiHug editor assistant add entity

Result

The editor assistant removes a large amount of repetitive proto scaffolding work and helps keep document structure consistent while you are designing contracts.

References

  1. ApiHug101 on Bilibili
  2. ApiHug101 on YouTube
Copyright © 2026 ApiHug·AI-native Enterprise Architecture Factory