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

A lot of file templates are missing on new menu #861

Closed
AboElnoor opened this issue Dec 18, 2021 · 24 comments · Fixed by #958
Closed

A lot of file templates are missing on new menu #861

AboElnoor opened this issue Dec 18, 2021 · 24 comments · Fixed by #958

Comments

@AboElnoor
Copy link

AboElnoor commented Dec 18, 2021

Hi,

I'm using PHPStorm on Ubuntu 20.04.

And many file templates are not showing in the new file menu, despite it existing in the settings. (Screenshots attached)

This is all files that show up in the new file menu:
Screenshot from 2021-12-18 23-05-47

Some of those files are not showing in the new files menu, and many more:
Screenshot-20211218223543-226x567

Regards,

Mainline branch: 4.3.0-develop

@m2-assistant
Copy link

m2-assistant bot commented Dec 18, 2021

Hi @AboElnoor. 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


@bohdan-harniuk bohdan-harniuk self-assigned this Dec 20, 2021
@bohdan-harniuk
Copy link
Collaborator

Hello, @AboElnoor!

Those files are generated during in the scope of listed on the first screenshot. As for an example, try to generate Magento 2 Entity. You will see, that it is generating not a single file, but more than 30 files. Those files are listed on the second screenshot that you provided in the ticket description.

I hope, that it is clearly for you now.

Thanks, Bohdan

@bohdan-harniuk
Copy link
Collaborator

@AboElnoor, can I help you with anything else?

If not, I will close this issue.

@AboElnoor
Copy link
Author

@bohdan-harniuk But sometimes, I just need to use just one file.
For example: sometimes I might need to create a web API XML file or maybe a routes file.
You know many files could be needed separately.

Regards,

@bohdan-harniuk
Copy link
Collaborator

@AboElnoor but referenced by you features have nothing with it. They designed to generate Magento 2 related files by their purposes.

You can read about file and code templates here https://www.jetbrains.com/help/idea/using-file-and-code-templates.html

@bohdan-harniuk
Copy link
Collaborator

It seems that you want us to develop a lot of new generators.

@bohdan-harniuk
Copy link
Collaborator

@AboElnoor, if you want, I can show you how to generate those files with the built in intellij idea feature file and code templates.

@AboElnoor
Copy link
Author

@bohdan-harniuk I believe I can just duplicate those files to be available in the new files menu.
But I think it's a part of the plugin's responsibility. we can open a voting for this.

If not, it's okay to close this issue.
Regards,

@bohdan-harniuk
Copy link
Collaborator

@AboElnoor, yes, as you know, it is easy to do what you want to achieve via IntelliJ Idea itself. So, there is no to add from the plugin side.

If you have clear vision, how we can make it better, please, share it with us.

We can implement it, if it will simplify usage and won't make it less convenient.

@bohdan-harniuk
Copy link
Collaborator

You can share your concept here.

@AboElnoor
Copy link
Author

@bohdan-harniuk I'm thinking about making standalone files available too.
as you've mentioned that generating Magento 2 Entity will generate about 30 files, but if I just need 1 or 2 files of it? should I delete the remaining files of 30 files?

So don't you think it will be much work to do which violates the purpose of making the generators?

So I think that some files need to be available out of groups too.

for example, I can create a new file for web API XML, routes XML, DI XML, and all standalone files .. etc.

@AboElnoor
Copy link
Author

AboElnoor commented Dec 20, 2021

For me, I just copied those files to be able to use them singularly. (Screenshot attached)

Screenshot-20211220205858-286x531

But I think it's not a good solution because I need to duplicate more files every time I need a new file that I can't create singularly. I wish my point it clear now.

Regards,

@bohdan-harniuk
Copy link
Collaborator

@AboElnoor, it makes sense.

I will try to do so. Let’s keep this issue open until I will create the concept for this improvement.

@bohdan-harniuk
Copy link
Collaborator

@AboElnoor, I want to add, that you can create WEB API xml already. It doesn’t make sense to create an empty WEB API xml file, but you can declare new WEB API endpoint: https://github.com/magento/magento2-phpstorm-plugin/wiki/4.0.0-Release#web-api-declaration-generation

@AboElnoor
Copy link
Author

AboElnoor commented Dec 20, 2021

@bohdan-harniuk Thanks for taking my request in your consideration.
And thanks also for the release notes, it is extremely valuable and easy.

Regards,

@SilinMykola
Copy link

@magento I am working on this

@bohdan-harniuk
Copy link
Collaborator

Hello, @SilinMykola!

Let's use this code snippet:

<group id="MagentoContextBasedActionsGroup" class="com.intellij.ide.actions.NonEmptyActionGroup" text="Context Actions" popup="false" compact="true" searchable="true">
    <separator/>
    <!-- Context dependent actions -->
    <separator/>
    <add-to-group group-id="NewGroup" anchor="before" relative-to-action="NewXml"/>
</group>

To achieve similar output:

Screenshot 2022-02-03 at 18 04 38

Regards,

@bohdan-harniuk
Copy link
Collaborator

Hello, @AboElnoor!

We have started implementation of the requested feature.
It will be available in the upcoming release: 4.3.0.

We will try to provide as many files as we can to this release.
Rest of them we will provide in the future releases.
This issue will be closed after the corresponding PR is merged.
For each new file generation will be opened separate issue, this issue will be mentioned.

Regards,

@AboElnoor
Copy link
Author

@bohdan-harniuk Thank you so much for taking my request into your consideration.
Your effort is extremely appreciated.

Regards,

Community Backlog automation moved this from Dev in Progress to Done Feb 7, 2022
@bohdan-harniuk bohdan-harniuk reopened this Feb 7, 2022
@bohdan-harniuk
Copy link
Collaborator

bohdan-harniuk commented Feb 10, 2022

Hello, @AboElnoor!

Could you please help us to make a decision which files to add to the context actions group?

We have already created tasks for the next files:

  • di.xml (done)
  • acl.xml (done)
  • layout xml files
  • webapi.xml (done)
  • system.xml (done)
  • config.xml (done)

Thank you in advance!

Regards,

@DmitryFurs
Copy link
Contributor

Hi @bohdan-harniuk!

Sorry to interfere, but most likely it should be possible to generate almost all files that have their own xsd schema.
But it will probably be too cumbersome and you can do with only the most frequently used files, for example:

  • routes.xml
  • page_types.xml
  • sections.xml
  • extension_attributes.xml
  • fieldset.xml
  • email_templates.xml
  • crontab.xml
  • indexer.xml
  • mview.xml
  • view.xml
  • widget.xml

Thanks!

@bohdan-harniuk
Copy link
Collaborator

Hello, @DmitryFurs!

Thank you for your suggestions!
We will use it as a roadmap.

Regards,

@bohdan-harniuk
Copy link
Collaborator

Hello, @AboElnoor, @DmitryFurs!

We have finished development here!
All improvements will be delivered in the upcoming release: 4.3.0.

Regards,

Community Backlog automation moved this from Pull Request in Progress to Done Mar 11, 2022
@AboElnoor
Copy link
Author

Hi, @bohdan-harniuk

Have those changes been released, I still see that individual files do not exist even when my extension version is 4.3.1

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment