Skip to content

Add a new context dependent action for the README.md file generation #1111

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

Closed
makzef opened this issue Jun 9, 2022 · 2 comments · Fixed by #1133
Closed

Add a new context dependent action for the README.md file generation #1111

makzef opened this issue Jun 9, 2022 · 2 comments · Fixed by #1133
Assignees

Comments

@makzef
Copy link

makzef commented Jun 9, 2022

Is your feature request related to a problem? Please describe.

Add README.md file generation to the context actions, so that user can generate a README.md file wherever it can be generated depending on the clicked file or directory.

Describe the solution you'd like (*)

Similar features have already been developed, for example #978.

So the solution will be similar. To add new file generation action that depends on context:

  1. create an action class that extends com.magento.idea.magento2plugin.actions.context.AbstractContextAction
  2. register it in the plugin.xml file inside the MagentoContextBasedActionsGroup group
  3. implement the isVisible method to define condition where to show this action
  4. implement the getProperties method to specify properties that should be auto-populated from the known context (leave empty for user-defined values)

Additional context

ℹ️ New internal file template should be created.

Look at those files for examples:

  • resources/fileTemplates/internal/Magento Web API XML.xml.ft
  • resources/fileTemplates/internal/Magento Routes XML.xml.html
  • src/com/magento/idea/magento2plugin/magento/files/ModuleWebApiXmlFile.java

Mainline branch: 4.4.0-develop

@m2-assistant
Copy link

m2-assistant bot commented Jun 9, 2022

Hi @makzef. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


@makzef
Copy link
Author

makzef commented Jun 9, 2022

@magento I am working on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant