Editor
ApiHug IDEA plugin how to use shortcut & live templates to speed up
⚠️Please always keep upgrading your piHug plugin to latest version.⚠️
💝 Plugin home: ApiHug - API design Copilot
😆 Video guide:
Since ApiHug Plugin: 0.2.7
Preconditions:
proto
kind file;option
, for example: option (hope.domain.kind) = IDL
for IDL
file;Seems almost all the shortcut keys are occupied(if any conflict with your local settings, you can find them from your right click menu context):
Shortcut | Comment | Tip | File |
---|---|---|---|
ctl + alt +shift + M | Add Message | M for Message | BEAN |
ctl + alt +shift + F | Add Field | F for Field | BEAN |
ctl + alt +shift + K | Add Field(Reference) | K for ? | BEAN |
ctl + alt +shift + U | Add Enum | U for Unique constant | ENUM |
ctl + alt +shift + A | Add Enum Field | A for ? | ENUM |
ctl + alt +shift + X | Add Error | X for X - wrong | ERROR |
ctl + alt +shift + Z | Add Error Field | Z for ? | ERROR |
ctl + alt +shift + R | Add Service | R for Resource | IDL |
ctl + alt +shift + P | Add Path | P for Path | IDL |
ctl + alt +shift + Y | Add Entity | Y for Yummy 😋? | ENTITY |
ctl + alt +shift + O | Add Entity Field | O for ? | ENTITY |
Also refer to the Editor Assistant
Since ApiHug Plugin: 0.4.4 2024-06-14
Settings > Editor > Live Templates
find ApiHug
you will find the pre-definition of the templates;CTL + J
will trigger the show up of the template selector or:Type | Comment | Condition | File |
---|---|---|---|
bean | Add Bean | outside the message block | BEAN |
beef | Add Bean Field | inside the message block | BEAN |
svc | Add Service | outside the service block | IDL |
path | Add Path | inside the service block | IDL |
pas | Add Parameters | inside the method option block(no duplicates detect) | IDL |
pa | Add Parameter | inside the method option block(no duplicates detect) | IDL |
auth | Add Auth | inside the method option block(no duplicates detect) | IDL |
auth2 | Add Auth(RBAC Base) | inside the method option block(no duplicates detect) | IDL |
cst | Add Enum | outside the enum block | ENUM |
cit | Add Enum Field | inside the enum block | ENUM |
err | Add Error | outside the error block | ERROR |
eit | Add Error Field | inside the error block | ERROR |
ety | Add Entity | outside the message block | ENTITY |
eit | Add Entity Field | inside the message block | ENTITY |
eix | Add Entity Index | inside the message option block(no duplicates detect) | ENTITY |
eux | Add Entity Unique | inside the message option block(no duplicates detect) | ENTITY |
Reference Jetbrains: Live templates