Skip to content

Add a new context dependent Action for the system.xml file generation #977

Closed
@bohdan-harniuk

Description

@bohdan-harniuk

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

We should add system.xml file generation to the context actions, so that we can generate a system.xml file wherever it can be generated depending on the clicked file or directory.

The original idea came from the #861.

Describe the solution you'd like (*)

We have developed a new context dependent actions group in the #958.

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.3.0-develop

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions