-
Notifications
You must be signed in to change notification settings - Fork 102
539 add apply to property #540
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
Merged
eduard13
merged 5 commits into
magento:mainline-eav-attr-code-genearators
from
ProkopovVitaliy:539-add-apply-to-property
Apr 15, 2021
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
4fa88f8
Added apply_to property for attribute generation
ProkopovVitaliy 250390c
Added test for apply_to property
ProkopovVitaliy 631cae5
Added test for apply_to property
ProkopovVitaliy 1ea811d
Fixed panel size
ProkopovVitaliy 731b667
Added indexer for product types
ProkopovVitaliy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...m/magento/idea/magento2plugin/actions/generation/dialog/event/ApplyToVisibleListener.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
package com.magento.idea.magento2plugin.actions.generation.dialog.event; | ||
|
||
import javax.swing.JCheckBox; | ||
import javax.swing.JPanel; | ||
import javax.swing.event.ChangeEvent; | ||
import javax.swing.event.ChangeListener; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
public class ApplyToVisibleListener implements ChangeListener { | ||
|
||
private final JPanel applyToPanel; | ||
|
||
public ApplyToVisibleListener(@NotNull final JPanel applyToPanel) { | ||
this.applyToPanel = applyToPanel; | ||
} | ||
|
||
@Override | ||
public void stateChanged(final ChangeEvent changeEvent) { | ||
final JCheckBox checkBox = (JCheckBox) changeEvent.getSource(); | ||
|
||
if (checkBox.isSelected()) { | ||
applyToPanel.setVisible(false); | ||
} else { | ||
applyToPanel.setVisible(true); | ||
} | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...dea/magento2plugin/actions/generation/dialog/validator/rule/CommaSeparatedStringRule.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
package com.magento.idea.magento2plugin.actions.generation.dialog.validator.rule; | ||
|
||
import com.magento.idea.magento2plugin.util.RegExUtil; | ||
|
||
public class CommaSeparatedStringRule implements ValidationRule { | ||
public static final String MESSAGE = "validator.commaSeparatedString.isNotValid"; | ||
private static final ValidationRule INSTANCE = new CommaSeparatedStringRule(); | ||
|
||
@Override | ||
public boolean check(final String value) { | ||
return value.isEmpty() || value.matches(RegExUtil.Magento.COMMA_SEPARATED_STRING); | ||
} | ||
|
||
public static ValidationRule getInstance() { | ||
return INSTANCE; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/com/magento/idea/magento2plugin/magento/files/ProductTypeXml.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright © Magento, Inc. All rights reserved. | ||
* See COPYING.txt for license details. | ||
*/ | ||
|
||
package com.magento.idea.magento2plugin.magento.files; | ||
|
||
import com.intellij.lang.Language; | ||
import com.intellij.lang.xml.XMLLanguage; | ||
|
||
public class ProductTypeXml implements ModuleFileInterface { | ||
public static final String FILE_NAME = "product_types.xml"; | ||
public static final String TEMPLATE = "Magento Product Types"; | ||
|
||
//attributes | ||
public static final String XML_TAG_TYPE = "type"; | ||
public static final String XML_ATTRIBUTE_NAME = "name"; | ||
|
||
@Override | ||
public String getFileName() { | ||
return FILE_NAME; | ||
} | ||
|
||
@Override | ||
public String getTemplate() { | ||
return TEMPLATE; | ||
} | ||
|
||
@Override | ||
public Language getLanguage() { | ||
return XMLLanguage.INSTANCE; | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
@ProkopovVitaliy, just want to bring your attention, that breaking a multiple arguments to a new line, should move all the arguments to a new empty line, like following.
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 Thanks for recommendation, really it's looks better in your variant. I will take this into account.
Thanks!