-
Couldn't load subscription status.
- Fork 102
1023: Added an additional path field for UCT configuration dialog (to cover theme folder scanning) #1024
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
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.
| import javax.swing.JLabel; | ||
| import javax.swing.JPanel; | ||
| import javax.swing.KeyStroke; | ||
| import javax.swing.*; |
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.
Please, do not use wildcard imports.
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.
Thanks for your code review. I fixed. Please check.
| private JLabel modulePathError;//NOPMD | ||
| private JLabel enableComment;//NOPMD | ||
| private JLabel enableCommentPath;//NOPMD | ||
| private JCheckBox hasAdditionalPath; |
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.
Please, keep labels separately from other elements. Move this one ☝️
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.
Thanks for your code review. I fixed. Please check.
| final String basePath = Settings.getMagentoPath(project); | ||
|
|
||
| if (basePath != null) { | ||
| additionalPath.getComponent().setText(basePath); |
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.
Why did you do that? What is business goal here?
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 @bohdan-harniuk , the functionality was duplicated as for the field modulePath so that you can specify an additional path
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.
Thanks for your code review. I fixed. Please check.
| } | ||
|
|
||
| private void refreshAdditionalFields(final boolean isEnabled) { | ||
| additionalPath.setEnabled(isEnabled); |
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.
You can add additionalPath.setVisible(isEnabled);
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.
Thanks for your code review. I fixed. Please check.
| setTitle(ConfigureUctAction.ACTION_NAME); | ||
| getRootPane().setDefaultButton(buttonOk); | ||
|
|
||
| hasAdditionalPath.addActionListener(event -> refreshAdditionalFields(hasAdditionalPath.isSelected())); |
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.
Please, call this method refreshAdditionalFields in the constructor. So we will get saved state of this component.
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.
Pay attention, this method should be called after setDefaultValues.
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.
Thanks for your code review. I fixed. Please check.
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.
Great work!
Thank you, @doninAtwix!
267b88c
into
magento:mainline/uct-1023-theme-scanning-feature


Description (*)
Added additional fields to UCT configuration dialog. When you click on checkbox "Add additional path to analyse" an additional field "Path To Analyse" will become available for selection.
Fixed Issues (if relevant)
Contribution checklist (*)