-
Notifications
You must be signed in to change notification settings - Fork 102
#Issue-142: Action/Code Generation. New CLI command Generation #240
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
#Issue-142: Action/Code Generation. New CLI command Generation #240
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @coderimus, really great job so far 👍. I've left couple of notices, please check them as well.
Thank you.
</constraints> | ||
<properties> | ||
<labelFor value="61353"/> | ||
<text resource-bundle="magento2/common" key="common.cli.class.name"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use common.className
instead of adding a new one. Please adjust everywhere where it is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@eduard13 thank you for the review! Got your point and totally agree with it 👍 Will apply changes with the next push.
resources/magento2/common.properties
Outdated
@@ -27,3 +27,10 @@ common.notAvailable=N/A | |||
common.classInheritance=Inherit Class | |||
common.license.proprietary=Proprietary | |||
common.description=Description | |||
common.cli.class.name=Class Name | |||
common.cli.parent.directory=Parent Directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use it like this common.parentDirectory
as it may reused in some other components.
</constraints> | ||
<properties> | ||
<labelFor value="d786e"/> | ||
<text resource-bundle="magento2/common" key="common.cli.cli.description"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We already have common.description
.
<text resource-bundle="magento2/common" key="common.cli.cli.description"/> | |
<text resource-bundle="magento2/common" key="common.description"/> |
</constraints> | ||
<properties> | ||
<labelFor value="a06d9"/> | ||
<text resource-bundle="magento2/common" key="common.cli.cli.name"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
<text resource-bundle="magento2/common" key="common.cli.cli.name"/> | |
<text resource-bundle="magento2/common" key="common.name"/> |
</constraints> | ||
<properties> | ||
<labelFor value="82342"/> | ||
<text resource-bundle="magento2/common" key="common.cli.parent.directory"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<text resource-bundle="magento2/common" key="common.cli.parent.directory"/> | |
<text resource-bundle="magento2/common" key="common.parentDirectory"/> |
"validator.file.cantBeCreated", | ||
commonBundle.message("common.cli.class.title") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's have some indents here
"validator.file.cantBeCreated", | |
commonBundle.message("common.cli.class.title") | |
"validator.file.cantBeCreated", | |
commonBundle.message("common.cli.class.title") |
protected CommonBundle bundle; | ||
|
||
public AbstractDialog() { | ||
this.bundle = new CommonBundle(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point 👍
…ento2-phpstorm-plugin into 142/cli-command-generation
@@ -13,22 +13,27 @@ | |||
import com.magento.idea.magento2plugin.magento.packages.Package; | |||
import com.magento.idea.magento2plugin.util.CamelCaseToSnakeCase; | |||
|
|||
@SuppressWarnings({ | |||
"PMD.FieldNamingConventions", | |||
"PMD.LongVariable", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's suppress the LongVariable
on a global level. I believe variable names should be descriptive and self-explanatory.
…s to exclude pattern
@eduard13 requested change added and the work completed in the scope of the PR issue. Please, review this PR 😃 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @coderimus it works really great ✅. Could you please check on minor note and share your thought regarding that one?
Also looks like something is wrong with the dialog elements, probably with JPanels. Check the following screenshot (but it's also visible in PR description)
Let's make it to looks like this:
resources/magento2/common.properties
Outdated
@@ -27,3 +27,10 @@ common.notAvailable=N/A | |||
common.classInheritance=Inherit Class | |||
common.license.proprietary=Proprietary | |||
common.description=Description | |||
common.parentDirectory=Parent Directory | |||
common.cliCommandName=CLI Command Name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think if we'll keep it just Command Name
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, will change :)
@eduard13 thank you for your review and suggestions 👍 I implemented them. Please, review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome.
Good job 💯
Description (*)

This PR provides a new action: Magento 2 CLI Command
This new action has the next form

All fields are required. The
Console
is a predefined valueFor example, the next data set

The result of its generation will be
CLI PHP CLass

di.xml settings

If a developer decided to add one more CLI command in the scope of the current module the result will be next:

Fixed Issues (if relevant)
#142
Questions or comments
Contribution checklist (*)