ProtoBuf

Proto file cannot be recognized

Currently, there are two popular Proto buffer plugins supported by IDEs:

  1. Built-in IDE plugin, provided by JetBrains s.r.o. ✅✅✅
  2. Third-party HIGAN plugin ❌❌❌

These two plugins conflict with each other and only one can be enabled at a time. ⚠️

The ApiHug Plugin relies on the IDE’s built-in Proto Editor plugin for AST parsing, so the JetBrains s.r.o. ✅ Proto plugin must be enabled:

ApiHug plugin

Proto file import fails, cannot recognize the proto import

ApiHug SDK proto import import "swagger/annotations.proto"; fails with an error:

ApiHug SDK proto import import "swagger/annotations.proto"; fails:

ApiHug plugin SDK import error

01: Compile the project (via markdown or gradle task)

ApiHug 2 ways build project

02: After successful compilation, check the build cache of the proto project:

{PROJECT}/{PROTO-MODULE}/build/extracted-include-protos:

ApiHug success build

03: If the import still fails, manually configure the proto import path; if imports are still not recognized, please add the path manually:

  1. Open the Settings panel
  2. Locate Protocol Buffers
  3. Un-check Configure Automatically
  4. Add {PROJECT}/{PROTO-MODULE}/build/extracted-include-protos to the Import Paths:

Since Plugin version 0.7.6, these predefined protos are included by the plugin.

ApiHug import finally

Eventually, all import statements should turn green!

⚠️ Occasionally, the official proto editor may crash; please pay attention to any crash notifications.

If the issue persists even after restarting IDEA, please report it to us: report issue

Gradle

Cannot recognize as Gradle project

The IDE should display a Load Gradle Project notification. If notifications are disabled, open the Notification panel to trigger it manually.

IDE should pop up a notification: Load Gradle Project; if the notification was disabled, please open the Notification panel to load it manually!

ApiHug Load gradle project

Gradle compile failure

  1. report issue
  2. Visit the Homepage to find the QR code and join our chat group.

API Design tree not present/refresh

  1. Refresh the tree
  2. Rebuild the tree (heavy operation): recompile and then refresh
ApiHug Rebuild

If the error persists, please report issue!

Check version

Check the installed version of the ApiHug IDE plugin:

Top Menu: ApiHug -> About:

ApiHug version check

Plugin 0.2+ issue

Milestone 20240222 — Includes Spring Boot upgrade!

Latest

Reference

  1. ApiHug101-Bilibili
  2. ApiHug101-Youtube