Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: new actions names #34

Merged
merged 1 commit into from
Aug 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading