From f22b233ddfd14212701034b83c4109546becb47f Mon Sep 17 00:00:00 2001 From: Yevhen Zvieriev Date: Tue, 23 Apr 2024 21:48:03 +0300 Subject: [PATCH] removed full text search when creating new entity and GRID causing error --- resources/magento2/common.properties | 1 - .../data/UiComponentGridToolbarData.java | 13 -- .../UiComponentGridToolbarDtoConverter.java | 1 - .../data/dialog/NewEntityDialogData.java | 13 -- .../generation/dialog/NewEntityDialog.form | 35 +----- .../generation/dialog/NewEntityDialog.java | 2 - .../dialog/NewLayoutTemplateDialog.java | 114 ++++++------------ .../dialog/NewSetupDataPatchDialog.java | 91 +++++--------- .../dialog/NewUiComponentGridDialog.form | 26 +--- .../dialog/NewUiComponentGridDialog.java | 7 -- .../UiComponentGridXmlGenerator.java | 4 - .../custom_entity_grid.xml | 1 - .../UiComponentGridXmlGeneratorTest.java | 2 - .../pool/NewEntityGeneratorPoolTest.java | 1 - 14 files changed, 67 insertions(+), 244 deletions(-) diff --git a/resources/magento2/common.properties b/resources/magento2/common.properties index 01ad830e0..561a36da9 100644 --- a/resources/magento2/common.properties +++ b/resources/magento2/common.properties @@ -60,7 +60,6 @@ common.entityIdField=Entity ID Field common.addToolbar=Add Toolbar common.addToolbarListingPaging=Add Toolbar Listing Paging common.addToolbarListingFilters=Add Toolbar Listing Filters -common.addToolbarFullTextSearch=Add Toolbar Full Text Search common.addToolbarColumnsControl=Add Toolbar Columns Control common.addToolbarBookmarks=Add Toolbar Bookmarks common.argument=Argument name diff --git a/src/com/magento/idea/magento2plugin/actions/generation/data/UiComponentGridToolbarData.java b/src/com/magento/idea/magento2plugin/actions/generation/data/UiComponentGridToolbarData.java index 17907e70d..171fb3851 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/data/UiComponentGridToolbarData.java +++ b/src/com/magento/idea/magento2plugin/actions/generation/data/UiComponentGridToolbarData.java @@ -10,7 +10,6 @@ public class UiComponentGridToolbarData { private final boolean addToolbar; private final boolean addBookmarks; private final boolean addColumnsControls; - private final boolean addFulltextSearch; private final boolean addListingFilters; private final boolean addListingPaging; @@ -20,7 +19,6 @@ public class UiComponentGridToolbarData { * @param addToolbar Add toolbar * @param addBookmarks Add bookmarks * @param addColumnsControls Add columns controls - * @param addFulltextSearch Add fulltext search * @param addListingFilters Add listing filters * @param addListingPaging Add listing paging */ @@ -28,14 +26,12 @@ public UiComponentGridToolbarData( final boolean addToolbar, final boolean addBookmarks, final boolean addColumnsControls, - final boolean addFulltextSearch, final boolean addListingFilters, final boolean addListingPaging ) { this.addToolbar = addToolbar; this.addBookmarks = addBookmarks; this.addColumnsControls = addColumnsControls; - this.addFulltextSearch = addFulltextSearch; this.addListingFilters = addListingFilters; this.addListingPaging = addListingPaging; } @@ -76,15 +72,6 @@ public boolean isAddColumnsControls() { return addColumnsControls; } - /** - * Is add fulltext search. - * - * @return Boolean - */ - public boolean isAddFulltextSearch() { - return addFulltextSearch; - } - /** * Is add listing filters. * diff --git a/src/com/magento/idea/magento2plugin/actions/generation/data/converter/newentitydialog/UiComponentGridToolbarDtoConverter.java b/src/com/magento/idea/magento2plugin/actions/generation/data/converter/newentitydialog/UiComponentGridToolbarDtoConverter.java index e033a9247..d8345d1b4 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/data/converter/newentitydialog/UiComponentGridToolbarDtoConverter.java +++ b/src/com/magento/idea/magento2plugin/actions/generation/data/converter/newentitydialog/UiComponentGridToolbarDtoConverter.java @@ -29,7 +29,6 @@ public UiComponentGridToolbarDtoConverter( newEntityDialogData.hasToolbar(), newEntityDialogData.hasToolbarBookmarks(), newEntityDialogData.hasToolbarColumnsControl(), - newEntityDialogData.hasToolbarFullTextSearch(), newEntityDialogData.hasToolbarListingFilters(), newEntityDialogData.hasToolbarListingPaging() diff --git a/src/com/magento/idea/magento2plugin/actions/generation/data/dialog/NewEntityDialogData.java b/src/com/magento/idea/magento2plugin/actions/generation/data/dialog/NewEntityDialogData.java index 19360cb98..628c4ebe5 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/data/dialog/NewEntityDialogData.java +++ b/src/com/magento/idea/magento2plugin/actions/generation/data/dialog/NewEntityDialogData.java @@ -30,7 +30,6 @@ public class NewEntityDialogData implements DialogData { private final boolean toolbarColumnsControl; private final boolean toolbarListingFilters; private final boolean toolbarListingPaging; - private final boolean toolbarFullTextSearch; // Acl tab data. private final String parentAclId; @@ -66,7 +65,6 @@ public class NewEntityDialogData implements DialogData { * @param hasToolbarColumnsControl boolean * @param hasToolbarListingFilters boolean * @param hasToolbarListingPaging boolean - * @param hasToolbarFullTextSearch boolean * @param parentAclId String * @param aclId String * @param aclTitle String @@ -94,7 +92,6 @@ public NewEntityDialogData( final boolean hasToolbarColumnsControl, final boolean hasToolbarListingFilters, final boolean hasToolbarListingPaging, - final boolean hasToolbarFullTextSearch, final @NotNull String parentAclId, final @NotNull String aclId, final @NotNull String aclTitle, @@ -121,7 +118,6 @@ public NewEntityDialogData( this.toolbarColumnsControl = hasToolbarColumnsControl; this.toolbarListingFilters = hasToolbarListingFilters; this.toolbarListingPaging = hasToolbarListingPaging; - this.toolbarFullTextSearch = hasToolbarFullTextSearch; this.parentAclId = parentAclId; this.aclId = aclId; this.aclTitle = aclTitle; @@ -285,15 +281,6 @@ public boolean hasToolbarListingPaging() { return toolbarListingPaging; } - /** - * Check if has toolbar fulltext search. - * - * @return boolean - */ - public boolean hasToolbarFullTextSearch() { - return toolbarFullTextSearch; - } - /** * Get parent acl id. * diff --git a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewEntityDialog.form b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewEntityDialog.form index e5f18d401..99dac0aa5 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewEntityDialog.form +++ b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewEntityDialog.form @@ -46,9 +46,6 @@ - - - @@ -59,9 +56,6 @@ - - - @@ -80,9 +74,6 @@ - - - @@ -203,9 +194,6 @@ - - - @@ -264,9 +252,6 @@ - - - @@ -294,9 +279,6 @@ - - - @@ -327,15 +309,6 @@ - - - - - - - - - @@ -447,9 +420,6 @@ - - - @@ -548,9 +518,6 @@ - - - @@ -678,4 +645,4 @@ - + \ No newline at end of file diff --git a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewEntityDialog.java b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewEntityDialog.java index 04f2c931f..894331c43 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewEntityDialog.java +++ b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewEntityDialog.java @@ -123,7 +123,6 @@ public class NewEntityDialog extends AbstractDialog { private JCheckBox addToolBar; private JCheckBox addBookmarksCheckBox; private JCheckBox addColumnsControlCheckBox; - private JCheckBox addFullTextSearchCheckBox; private JCheckBox addListingFiltersCheckBox; private JCheckBox addListingPagingCheckBox; private JComboBox tableEngine; @@ -740,7 +739,6 @@ private NewEntityDialogData getNewEntityDialogData() { addColumnsControlCheckBox.isSelected(), addListingFiltersCheckBox.isSelected(), addListingPagingCheckBox.isSelected(), - addFullTextSearchCheckBox.isSelected(), getParentAcl(), acl.getText().trim(), aclTitle.getText().trim(), diff --git a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewLayoutTemplateDialog.java b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewLayoutTemplateDialog.java index da77f82d6..f83842768 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewLayoutTemplateDialog.java +++ b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewLayoutTemplateDialog.java @@ -18,25 +18,19 @@ import com.magento.idea.magento2plugin.actions.generation.generator.LayoutXmlTemplateGenerator; import com.magento.idea.magento2plugin.magento.packages.Areas; import com.magento.idea.magento2plugin.util.magento.GetModuleNameByDirectoryUtil; + +import javax.swing.*; import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.util.HashMap; import java.util.Map; -import javax.swing.JButton; -import javax.swing.JComboBox; -import javax.swing.JComponent; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JTextField; -import javax.swing.KeyStroke; -import org.jetbrains.annotations.NotNull; public class NewLayoutTemplateDialog extends AbstractDialog { private static final String LAYOUT_NAME = "Layout Name"; - private final @NotNull Project project; + private final Project project; private final String moduleName; private final PsiDirectory directory; @@ -45,27 +39,17 @@ public class NewLayoutTemplateDialog extends AbstractDialog { private JButton buttonCancel; @FieldValidation(rule = RuleRegistry.NOT_EMPTY, message = {NotEmptyRule.MESSAGE, LAYOUT_NAME}) - @FieldValidation(rule = RuleRegistry.LAYOUT_NAME, - message = {IdentifierRule.MESSAGE, LAYOUT_NAME}) + @FieldValidation(rule = RuleRegistry.LAYOUT_NAME, message = {IdentifierRule.MESSAGE, LAYOUT_NAME}) private JTextField layoutName; private JComboBox area; // labels - private JLabel layoutNameLabel; // NOPMD - private JLabel areaLabel; // NOPMD - private JLabel layoutNameErrorMessage; // NOPMD - - /** - * NewLayoutTemplateDialog constructor. - * - * @param project Project - * @param directory PsiDirectory - */ - public NewLayoutTemplateDialog( - final @NotNull Project project, - final @NotNull PsiDirectory directory - ) { + private JLabel layoutNameLabel; + private JLabel areaLabel; + private JLabel layoutNameErrorMessage; + + public NewLayoutTemplateDialog(Project project, PsiDirectory directory) { super(); this.project = project; @@ -84,12 +68,11 @@ public NewLayoutTemplateDialog( setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { @Override - public void windowClosing(final WindowEvent event) { + public void windowClosing(WindowEvent event) { onCancel(); } }); - // call onCancel() on ESCAPE contentPane.registerKeyboardAction( event -> onCancel(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), @@ -100,104 +83,77 @@ public void windowClosing(final WindowEvent event) { autoSelectCurrentArea(); } - /** - * Open a new layout template dialog. - * - * @param project Project - * @param directory Directory - */ - public static void open( - final @NotNull Project project, - final @NotNull PsiDirectory directory - ) { - final NewLayoutTemplateDialog dialog = new NewLayoutTemplateDialog(project, directory); + public static void open(Project project, PsiDirectory directory) { + NewLayoutTemplateDialog dialog = new NewLayoutTemplateDialog(project, directory); dialog.pack(); dialog.centerDialog(dialog); dialog.setVisible(true); } - /** - * Fire generation process if all fields are valid. - */ private void onOK() { if (validateFormFields()) { - final String[] layoutNameParts = getLayoutNameParts(); - new LayoutXmlTemplateGenerator( - new LayoutXmlData( - getArea(), - layoutNameParts[0], - moduleName, - layoutNameParts[1], - layoutNameParts[2] - ), - project - ).generate(NewLayoutXmlAction.ACTION_NAME, true); + String[] layoutNameParts = getLayoutNameParts(); + LayoutXmlData layoutXmlData = new LayoutXmlData( + getArea(), + layoutNameParts[0], + moduleName, + layoutNameParts[1], + layoutNameParts[2] + ); + new LayoutXmlTemplateGenerator(layoutXmlData, project) + .generate(NewLayoutXmlAction.ACTION_NAME, true); exit(); } } - /** - * Create custom components and fill their entries. - */ @SuppressWarnings({"PMD.UnusedPrivateMethod", "PMD.AvoidInstantiatingObjectsInLoops"}) private void createUIComponents() { area = new ComboBox<>(); - for (final Areas areaEntry : Areas.values()) { - if (!areaEntry.equals(Areas.adminhtml) && !areaEntry.equals(Areas.frontend)) { - continue; + for (Areas areaEntry : Areas.values()) { + if (areaEntry.equals(Areas.adminhtml) || areaEntry.equals(Areas.frontend)) { + area.addItem(new ComboBoxItemData(areaEntry.toString(), areaEntry.toString())); } - area.addItem(new ComboBoxItemData(areaEntry.toString(), areaEntry.toString())); } } private void autoSelectCurrentArea() { - final String selectedDirName = directory.getName(); - final Map areaIndexMap = new HashMap<>(); + String selectedDirName = directory.getName(); + Map areaIndexMap = new HashMap<>(); for (int i = 0; i < area.getItemCount(); i++) { - final ComboBoxItemData item = area.getItemAt(i); + ComboBoxItemData item = area.getItemAt(i); areaIndexMap.put(item.getKey(), i); } - if (areaIndexMap.containsKey(selectedDirName)) { - area.setSelectedIndex(areaIndexMap.get(selectedDirName)); + Integer selectedIndex = areaIndexMap.get(selectedDirName); + if (selectedIndex != null) { + area.setSelectedIndex(selectedIndex); } } - /** - * Get parts of inserted layout name. - * - * @return String[] - */ private String[] getLayoutNameParts() { - - final String[] layoutNameParts = layoutName.getText().trim().split("_"); + String[] layoutNameParts = layoutName.getText().trim().split("_"); String routeName = ""; String controllerName = ""; String actionName = ""; - if (layoutNameParts.length >= 1) { // NOPMD + if (layoutNameParts.length >= 1) { routeName = layoutNameParts[0]; } - if (layoutNameParts.length == 3) { // NOPMD + if (layoutNameParts.length == 3) { controllerName = layoutNameParts[1]; actionName = layoutNameParts[2]; } - if (layoutNameParts.length == 2 || layoutNameParts.length > 3) { // NOPMD + if (layoutNameParts.length == 2 || layoutNameParts.length > 3) { routeName = layoutName.getText().trim(); } return new String[]{routeName, controllerName, actionName}; } - /** - * Get area. - * - * @return String - */ private String getArea() { return area.getSelectedItem().toString(); } diff --git a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewSetupDataPatchDialog.java b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewSetupDataPatchDialog.java index eb23df3a1..bccc31de6 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewSetupDataPatchDialog.java +++ b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewSetupDataPatchDialog.java @@ -17,22 +17,16 @@ import com.magento.idea.magento2plugin.actions.generation.generator.ModuleSetupDataPatchGenerator; import com.magento.idea.magento2plugin.actions.generation.generator.util.DirectoryGenerator; import com.magento.idea.magento2plugin.magento.files.ModuleSetupDataPatchFile; -import com.magento.idea.magento2plugin.magento.packages.File; -import java.awt.event.ActionEvent; + +import javax.swing.*; import java.awt.event.KeyEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; -import javax.swing.JButton; -import javax.swing.JComponent; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JTextField; -import javax.swing.KeyStroke; -import org.jetbrains.annotations.NotNull; public class NewSetupDataPatchDialog extends AbstractDialog { private static final String CLASS_NAME = "Class Name"; + private final Project project; private final PsiDirectory baseDir; private final String moduleName; @@ -42,27 +36,17 @@ public class NewSetupDataPatchDialog extends AbstractDialog { private JButton buttonOK; private JButton buttonCancel; - @FieldValidation(rule = RuleRegistry.NOT_EMPTY, - message = {NotEmptyRule.MESSAGE, CLASS_NAME}) - @FieldValidation(rule = RuleRegistry.PHP_CLASS, - message = {PhpClassRule.MESSAGE, CLASS_NAME}) + @FieldValidation(rule = RuleRegistry.NOT_EMPTY, message = {NotEmptyRule.MESSAGE, CLASS_NAME}) + @FieldValidation(rule = RuleRegistry.PHP_CLASS, message = {PhpClassRule.MESSAGE, CLASS_NAME}) private JTextField className; - private JLabel classNameLabel;//NOPMD - private JLabel classNameErrorMessage;//NOPMD + private JLabel classNameLabel; + private JLabel classNameErrorMessage; /** - * Constructor. - * - * @param project Project - * @param directory PsiDirectory + * Constructor */ - public NewSetupDataPatchDialog( - final @NotNull Project project, - final @NotNull PsiDirectory directory, - final String modulePackage, - final String moduleName - ) { + public NewSetupDataPatchDialog(Project project, PsiDirectory directory, String modulePackage, String moduleName) { super(); this.project = project; @@ -75,53 +59,41 @@ public NewSetupDataPatchDialog( setTitle(NewSetupDataPatchAction.ACTION_DESCRIPTION); getRootPane().setDefaultButton(buttonOK); - buttonOK.addActionListener((final ActionEvent event) -> onOK()); - buttonCancel.addActionListener((final ActionEvent event) -> onCancel()); + buttonOK.addActionListener(event -> onOK()); + buttonCancel.addActionListener(event -> onCancel()); // call onCancel() when cross is clicked setDefaultCloseOperation(DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { @Override - public void windowClosing(final WindowEvent event) { + public void windowClosing(WindowEvent event) { onCancel(); } }); // call onCancel() on ESCAPE contentPanel.registerKeyboardAction( - (final ActionEvent event) -> onCancel(), + event -> onCancel(), KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT ); - addComponentListener( - new FocusOnAFieldListener(() -> className.requestFocusInWindow()) - ); + addComponentListener(new FocusOnAFieldListener(() -> className.requestFocusInWindow())); } /** - * Open dialog. - * - * @param project Project - * @param directory PsiDirectory + * Open dialog */ - public static void open( - final @NotNull Project project, - final @NotNull PsiDirectory directory, - final String modulePackage, - final String moduleName - ) { - final NewSetupDataPatchDialog dialog = new NewSetupDataPatchDialog( - project, - directory, - modulePackage, - moduleName - ); + public static void open(Project project, PsiDirectory directory, String modulePackage, String moduleName) { + NewSetupDataPatchDialog dialog = new NewSetupDataPatchDialog(project, directory, modulePackage, moduleName); dialog.pack(); dialog.centerDialog(dialog); dialog.setVisible(true); } + /** + * Fire generation process if all fields are valid. + */ protected void onOK() { if (validateFields()) { generateFile(); @@ -130,12 +102,11 @@ protected void onOK() { } private void generateFile() { - final PsiDirectory directory = DirectoryGenerator.getInstance().findOrCreateSubdirectories( + PsiDirectory directory = DirectoryGenerator.getInstance().findOrCreateSubdirectories( baseDir, - NewSetupDataPatchAction.PATCH_DIRECTORY + File.separator - + NewSetupDataPatchAction.DATA_DIRECTORY + NewSetupDataPatchAction.PATCH_DIRECTORY + "/" + NewSetupDataPatchAction.DATA_DIRECTORY ); - final ModuleSetupDataPatchGenerator generator = new ModuleSetupDataPatchGenerator( + ModuleSetupDataPatchGenerator generator = new ModuleSetupDataPatchGenerator( new ModuleSetupDataPatchData( modulePackage, moduleName, @@ -153,9 +124,7 @@ public String getClassName() { } private boolean validateFields() { - final PsiDirectory patchDirectory = baseDir.findSubdirectory( - NewSetupDataPatchAction.PATCH_DIRECTORY - ); + PsiDirectory patchDirectory = baseDir.findSubdirectory(NewSetupDataPatchAction.PATCH_DIRECTORY); PsiDirectory directory = null; if (patchDirectory != null) { @@ -163,17 +132,11 @@ private boolean validateFields() { } if (directory != null) { - for (final PsiFile file : directory.getFiles()) { - final String className = ModuleSetupDataPatchFile.resolveClassNameFromInput( - getClassName() - ); + for (PsiFile file : directory.getFiles()) { + String className = ModuleSetupDataPatchFile.resolveClassNameFromInput(getClassName()); if (file.getName().equals(className + ModuleSetupDataPatchFile.EXTENSION)) { - showErrorMessage( - fieldsValidationsList.get(0).getField(), - "Class name `" + className + "` already exist." - ); - + showErrorMessage(fieldsValidationsList.get(0).getField(), "Class name `" + className + "` already exists."); return false; } } diff --git a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentGridDialog.form b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentGridDialog.form index 456fb6e51..192290ff8 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentGridDialog.form +++ b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentGridDialog.form @@ -427,9 +427,6 @@ - - - @@ -440,9 +437,6 @@ - - - @@ -451,9 +445,6 @@ - - - @@ -632,7 +623,7 @@ - + @@ -658,18 +649,9 @@ - - - - - - - - - - + @@ -678,7 +660,7 @@ - + @@ -700,4 +682,4 @@ - + \ No newline at end of file diff --git a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentGridDialog.java b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentGridDialog.java index b48bfe96c..b8e568bfd 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentGridDialog.java +++ b/src/com/magento/idea/magento2plugin/actions/generation/dialog/NewUiComponentGridDialog.java @@ -95,7 +95,6 @@ public class NewUiComponentGridDialog extends AbstractDialog { private JCheckBox addToolBar; private JCheckBox addBookmarksCheckBox; private JCheckBox addColumnsControlCheckBox; - private JCheckBox addFullTextSearchCheckBox; private JCheckBox addListingFiltersCheckBox; private JCheckBox addListingPagingCheckBox; private FilteredComboBox collection; @@ -294,7 +293,6 @@ public UiComponentGridToolbarData getUiComponentGridToolbarData() { getAddToolBar(), getAddBookmarksCheckBox(), getAddColumnsControlCheckBox(), - getAddFullTextSearchCheckBox(), getAddListingFiltersCheckBox(), getAddListingPagingCheckBox() ); @@ -472,7 +470,6 @@ private void onAddToolBarChange() { addBookmarksCheckBox.setEnabled(enabled); addColumnsControlCheckBox.setEnabled(enabled); - addFullTextSearchCheckBox.setEnabled(enabled); addListingFiltersCheckBox.setEnabled(enabled); addListingPagingCheckBox.setEnabled(enabled); } @@ -594,10 +591,6 @@ private Boolean getAddColumnsControlCheckBox() { return addColumnsControlCheckBox.isSelected(); } - private Boolean getAddFullTextSearchCheckBox() { - return addFullTextSearchCheckBox.isSelected(); - } - private Boolean getAddListingFiltersCheckBox() { return addListingFiltersCheckBox.isSelected(); } diff --git a/src/com/magento/idea/magento2plugin/actions/generation/generator/UiComponentGridXmlGenerator.java b/src/com/magento/idea/magento2plugin/actions/generation/generator/UiComponentGridXmlGenerator.java index 4b75ed7f5..1a2054ba6 100644 --- a/src/com/magento/idea/magento2plugin/actions/generation/generator/UiComponentGridXmlGenerator.java +++ b/src/com/magento/idea/magento2plugin/actions/generation/generator/UiComponentGridXmlGenerator.java @@ -135,10 +135,6 @@ protected void fillAttributes(final @NotNull Properties attributes) { phpClassTypesBuilder.appendProperty("COLUMNS_CONTROLS", TRUE); } - if (toolbarData.isAddFulltextSearch()) { - phpClassTypesBuilder.appendProperty("FULLTEXT_SEARCH", TRUE); - } - if (toolbarData.isAddListingFilters()) { phpClassTypesBuilder.appendProperty("LISTING_FILTERS", TRUE); } diff --git a/testData/actions/generation/generator/UiComponentGridXmlGenerator/generateUiGridWithoutToolbar/custom_entity_grid.xml b/testData/actions/generation/generator/UiComponentGridXmlGenerator/generateUiGridWithoutToolbar/custom_entity_grid.xml index 12c11dbc2..5e62805fe 100644 --- a/testData/actions/generation/generator/UiComponentGridXmlGenerator/generateUiGridWithoutToolbar/custom_entity_grid.xml +++ b/testData/actions/generation/generator/UiComponentGridXmlGenerator/generateUiGridWithoutToolbar/custom_entity_grid.xml @@ -38,7 +38,6 @@ - diff --git a/tests/com/magento/idea/magento2plugin/actions/generation/generator/UiComponentGridXmlGeneratorTest.java b/tests/com/magento/idea/magento2plugin/actions/generation/generator/UiComponentGridXmlGeneratorTest.java index 223544ee5..99403088f 100644 --- a/tests/com/magento/idea/magento2plugin/actions/generation/generator/UiComponentGridXmlGeneratorTest.java +++ b/tests/com/magento/idea/magento2plugin/actions/generation/generator/UiComponentGridXmlGeneratorTest.java @@ -85,7 +85,6 @@ private PsiFile generateComponentGridXml( true, true, true, - true, true ); final UiComponentGridData uiGridData = new UiComponentGridData( @@ -122,7 +121,6 @@ private PsiFile generateComponentGridXmlWithActionsColumn( true, true, true, - true, true ); final UiComponentGridData uiGridData = new UiComponentGridData( diff --git a/tests/com/magento/idea/magento2plugin/actions/generation/generator/pool/NewEntityGeneratorPoolTest.java b/tests/com/magento/idea/magento2plugin/actions/generation/generator/pool/NewEntityGeneratorPoolTest.java index 53b6a0580..f6a7c2773 100644 --- a/tests/com/magento/idea/magento2plugin/actions/generation/generator/pool/NewEntityGeneratorPoolTest.java +++ b/tests/com/magento/idea/magento2plugin/actions/generation/generator/pool/NewEntityGeneratorPoolTest.java @@ -87,7 +87,6 @@ private NewEntityDialogData getMockNewEntityDialogData() { true, true, true, - true, "test", "test", "test",