Skip to content

Commit f636b1e

Browse files
committedJun 23, 2021
Merge branch '4.0.0-develop' of github.com:magento/magento2-phpstorm-plugin into entity-web-api-generation
2 parents 639858b + 87216d7 commit f636b1e

File tree

2 files changed

+42
-4
lines changed

2 files changed

+42
-4
lines changed
 

‎src/com/magento/idea/magento2plugin/actions/generation/dialog/NewWebApiDeclarationDialog.java

+12-3
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@
1818
import com.magento.idea.magento2plugin.actions.generation.generator.xml.WebApiDeclarationGenerator;
1919
import com.magento.idea.magento2plugin.magento.packages.HttpMethod;
2020
import com.magento.idea.magento2plugin.magento.packages.WebApiResource;
21-
import com.magento.idea.magento2plugin.ui.FilteredComboBox;
21+
import com.magento.idea.magento2plugin.util.magento.GetAclResourcesListUtil;
2222
import com.magento.idea.magento2plugin.util.magento.GetModuleNameByDirectoryUtil;
2323
import java.awt.event.KeyEvent;
2424
import java.awt.event.WindowAdapter;
2525
import java.awt.event.WindowEvent;
26+
import java.util.List;
2627
import javax.swing.JButton;
2728
import javax.swing.JComboBox;
2829
import javax.swing.JComponent;
@@ -54,7 +55,7 @@ public class NewWebApiDeclarationDialog extends AbstractDialog {
5455
private JComboBox<ComboBoxItemData> httpMethod;
5556
private JTextField serviceClass;
5657
private JTextField serviceMethod;
57-
private JComboBox aclResource;
58+
private JComboBox<ComboBoxItemData> aclResource;
5859

5960
// labels
6061
private JLabel routeUrlLabel;//NOPMD
@@ -170,11 +171,19 @@ private void fillPredefinedValuesAndDisableInputs() {
170171
@SuppressWarnings({"PMD.UnusedPrivateMethod", "PMD.AvoidInstantiatingObjectsInLoops"})
171172
private void createUIComponents() {
172173
httpMethod = new ComboBox<>();
174+
aclResource = new ComboBox<>();
173175

174176
for (final String method : HttpMethod.getHttpMethodList()) {
175177
httpMethod.addItem(new ComboBoxItemData(method, method));
176178
}
177-
aclResource = new FilteredComboBox(WebApiResource.getDefaultResourcesList());
179+
180+
final List<String> aclResources = GetAclResourcesListUtil.execute(project);
181+
final List<String> defaultResources = WebApiResource.getDefaultResourcesList();
182+
defaultResources.addAll(aclResources);
183+
184+
for (final String acl : defaultResources) {
185+
aclResource.addItem(new ComboBoxItemData(acl, acl));
186+
}
178187
}
179188

180189
/**

‎src/com/magento/idea/magento2plugin/actions/generation/generator/pool/provider/NewEntityGeneratorsProviderUtil.java

+30-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,36 @@
3636
import com.magento.idea.magento2plugin.actions.generation.data.dialog.EntityCreatorContextData;
3737
import com.magento.idea.magento2plugin.actions.generation.data.dialog.NewEntityDialogData;
3838
import com.magento.idea.magento2plugin.actions.generation.generator.pool.GeneratorPoolHandler;
39-
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.*;
39+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.AclXmlGeneratorHandler;
40+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.CollectionModelGeneratorHandler;
41+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.DataModelGeneratorHandler;
42+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.DataModelInterfaceGeneratorHandler;
43+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.DataModelPreferenceGeneratorHandler;
44+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.DataProviderGeneratorHandler;
45+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.DbSchemaWhitelistGeneratorHandler;
46+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.DbSchemaXmlGeneratorHandler;
47+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.DeleteByIdCommandGeneratorHandler;
48+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.EntityDataMapperGeneratorHandler;
49+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.FormDeleteControllerGeneratorHandler;
50+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.FormEditControllerGeneratorHandler;
51+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.FormGenericButtonBlockGeneratorHandler;
52+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.FormLayoutGeneratorHandler;
53+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.FormSaveControllerGeneratorHandler;
54+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.GetListQueryGeneratorHandler;
55+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.GridActionColumnGeneratorHandler;
56+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.GridLayoutXmlGeneratorHandler;
57+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.IndexActionGeneratorHandler;
58+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.MenuXmlGeneratorHandler;
59+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.ModelGeneratorHandler;
60+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.NewControllerGeneratorHandler;
61+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.NewEntityLayoutGeneratorHandler;
62+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.ResourceModelGeneratorHandler;
63+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.RoutesXmlGeneratorHandler;
64+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.SaveCommandGeneratorHandler;
65+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.SearchResultsGeneratorHandler;
66+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.SearchResultsInterfaceGeneratorHandler;
67+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.UiComponentFormLayoutGeneratorHandler;
68+
import com.magento.idea.magento2plugin.actions.generation.generator.pool.handler.UiComponentGridGeneratorHandler;
4069
import org.jetbrains.annotations.NotNull;
4170

4271
@SuppressWarnings({

0 commit comments

Comments
 (0)
Please sign in to comment.