Skip to content

Commit

Permalink
feat: new action names
Browse files Browse the repository at this point in the history
- action id: asyncapi.createSchema -> asyncapi.createSpecification
- rename CreateAsyncAPISchema -> CreateAsyncAPISpecification
- replace AsyncAPI Schema -> AsyncAPI Specification
- replace Create a AsyncAPI schema -> Create AsyncAPI specification
- replace AsyncAPI schema (yaml) -> AsyncAPI 2 (.yaml)
- replace AsyncAPI schema (json) -> AsyncAPI 3 (.json)
  • Loading branch information
Pakisan committed Aug 3, 2023
1 parent 5f41358 commit a3dac6a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ import com.intellij.psi.PsiDirectory
/**
* @author Pavel Bodiachevskii
*/
class CreateAsyncAPISchema: CreateFileFromTemplateAction(
"AsyncAPI schema",
"Create a AsyncAPI schema from the specified template",
class CreateAsyncAPISpecification: CreateFileFromTemplateAction(
"AsyncAPI Specification",
"Create AsyncAPI specification from the specified template",
Icons.ASYNCAPI_ICON
), DumbAware {

override fun buildDialog(project: Project, directory: PsiDirectory, builder: CreateFileFromTemplateDialog.Builder) {
builder
.setTitle("New API Specification")
.addKind("AsyncAPI schema (yaml)", Icons.ASYNCAPI_ICON, "AsyncAPI schema (yaml).yaml")
.addKind("AsyncAPI schema (json)", Icons.ASYNCAPI_ICON, "AsyncAPI schema (json).json")
.addKind("AsyncAPI 2 (.yaml)", Icons.ASYNCAPI_ICON, "AsyncAPI schema (yaml).yaml")
.addKind("AsyncAPI 2 (.json)", Icons.ASYNCAPI_ICON, "AsyncAPI schema (json).json")
}

override fun getActionName(directory: PsiDirectory?, newName: String, templateName: String?): String {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

<actions>
<!-- Add your actions here -->
<action id="asyncapi.createSchema" class="com.asyncapi.plugin.idea.actions.CreateAsyncAPISchema" text="AsyncAPI Schema" description="Create a AsyncAPI schema">
<action id="asyncapi.createSpecification" class="com.asyncapi.plugin.idea.actions.CreateAsyncAPISpecification" text="AsyncAPI Specification" description="Create AsyncAPI specification">
<add-to-group group-id="NewGroup" relative-to-action="NewFromTemplate" anchor="after"/>
</action>
</actions>
Expand Down

0 comments on commit a3dac6a

Please sign in to comment.