Skip to content

Commit 728a40a

Browse files
committed
Code style fixes
1 parent 5921c02 commit 728a40a

File tree

6 files changed

+44
-39
lines changed

6 files changed

+44
-39
lines changed

src/main/java/com/magento/idea/magento2plugin/actions/generation/dialog/GatherArrayValuesDialog.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,7 @@
1313
import com.magento.idea.magento2plugin.bundles.ValidatorBundle;
1414
import com.magento.idea.magento2plugin.magento.packages.DiArgumentType;
1515
import com.magento.idea.magento2plugin.ui.table.TableGroupWrapper;
16-
import org.jetbrains.annotations.Nullable;
1716
import java.awt.Color;
18-
import java.awt.event.KeyEvent;
19-
import java.awt.event.WindowAdapter;
20-
import java.awt.event.WindowEvent;
2117
import java.util.ArrayList;
2218
import java.util.Arrays;
2319
import java.util.HashMap;
@@ -30,9 +26,9 @@
3026
import javax.swing.JPanel;
3127
import javax.swing.JScrollPane;
3228
import javax.swing.JTable;
33-
import javax.swing.KeyStroke;
3429
import javax.swing.table.DefaultTableModel;
3530
import org.jetbrains.annotations.NotNull;
31+
import org.jetbrains.annotations.Nullable;
3632

3733
public class GatherArrayValuesDialog extends AbstractDialog {
3834

src/main/java/com/magento/idea/magento2plugin/actions/generation/dialog/NewArgumentInjectionDialog.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@
3636
import com.magento.idea.magento2plugin.ui.FilteredComboBox;
3737
import com.magento.idea.magento2plugin.util.php.PhpTypeMetadataParserUtil;
3838
import java.awt.event.ActionListener;
39-
import java.awt.event.KeyEvent;
40-
import java.awt.event.WindowAdapter;
41-
import java.awt.event.WindowEvent;
4239
import java.util.ArrayList;
4340
import java.util.Arrays;
4441
import java.util.Collection;
@@ -51,7 +48,6 @@
5148
import javax.swing.JRadioButton;
5249
import javax.swing.JTextArea;
5350
import javax.swing.JTextField;
54-
import javax.swing.KeyStroke;
5551
import org.jetbrains.annotations.NonNls;
5652
import org.jetbrains.annotations.NotNull;
5753
import org.jetbrains.annotations.Nullable;
@@ -353,7 +349,7 @@ protected JComponent createCenterPanel() {
353349
* Fire generation process if all fields are valid.
354350
*/
355351
protected void onWriteActionOK() {
356-
final DiArgumentData data = getDialogDataObject();
352+
final DiArgumentData data = getDialogDataObject();
357353

358354
if (data == null) {
359355
return;

src/main/java/com/magento/idea/magento2plugin/actions/generation/dialog/NewCategoryEavAttributeDialog.java

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ protected void initPropertiesTable() {
219219
/**
220220
* Get default columns values.
221221
*
222-
* @return Map<String, String>
222+
* @return Map of String to String
223223
*/
224224
protected Map<String, String> getDefaultColumnsValues() {
225225
return new HashMap<>();
@@ -228,7 +228,7 @@ protected Map<String, String> getDefaultColumnsValues() {
228228
/**
229229
* Get columns sources.
230230
*
231-
* @return Map<String, List<String>>
231+
* @return Map of String to List of String
232232
*/
233233
protected Map<String, List<String>> getColumnsSources() {
234234
return new HashMap<>();
@@ -336,7 +336,9 @@ protected void setAutocompleteListenerForDataPathNameField() {
336336
}
337337

338338
codeTextField.getDocument()
339-
.addDocumentListener(new DataPatchNameAdapter(dataPatchNameTextField, getEntityName()));
339+
.addDocumentListener(
340+
new DataPatchNameAdapter(dataPatchNameTextField, getEntityName())
341+
);
340342
}
341343

342344
/**
@@ -460,7 +462,7 @@ protected String getAttributeSource(final SourceModelData sourceModelData) {
460462
* Get attribute options.
461463
*
462464
* @param entityPropertiesTableGroupWrapper TableGroupWrapper
463-
* @return Map<Integer, String>
465+
* @return Map of Integer to String
464466
*/
465467
protected Map<Integer, String> getAttributeOptions(
466468
final TableGroupWrapper entityPropertiesTableGroupWrapper
@@ -474,7 +476,7 @@ protected Map<Integer, String> getAttributeOptions(
474476
* Get attribute options sort orders.
475477
*
476478
* @param entityPropertiesTableGroupWrapper TableGroupWrapper
477-
* @return Map<Integer, String>
479+
* @return Map of Integer to String
478480
*/
479481
protected Map<Integer, String> getAttributeOptionsSortOrders(
480482
final TableGroupWrapper entityPropertiesTableGroupWrapper
@@ -579,7 +581,9 @@ protected EavEntityDataInterface getEavEntityData() {
579581
* @param categoryEntityData CategoryEntityData
580582
* @return CategoryEntityData
581583
*/
582-
private CategoryEntityData populateCategoryEntityData(final CategoryEntityData categoryEntityData) {
584+
private CategoryEntityData populateCategoryEntityData(
585+
final CategoryEntityData categoryEntityData
586+
) {
583587
categoryEntityData.setModuleName(moduleName);
584588

585589
categoryEntityData.setDataPatchName(getDataPatchName());
@@ -620,4 +624,4 @@ protected void onWriteActionOK() {
620624

621625
exit();
622626
}
623-
}
627+
}

src/main/java/com/magento/idea/magento2plugin/actions/generation/dialog/NewCustomerEavAttributeDialog.java

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
import com.magento.idea.magento2plugin.actions.generation.generator.SourceModelGenerator;
2828
import com.magento.idea.magento2plugin.actions.generation.generator.util.GetAttributeOptionPropertiesUtil;
2929
import com.magento.idea.magento2plugin.magento.packages.eav.AttributeInput;
30-
import com.magento.idea.magento2plugin.magento.packages.eav.AttributeScope;
3130
import com.magento.idea.magento2plugin.magento.packages.eav.AttributeSourceModel;
3231
import com.magento.idea.magento2plugin.magento.packages.eav.AttributeType;
3332
import com.magento.idea.magento2plugin.ui.table.TableGroupWrapper;
@@ -222,7 +221,7 @@ protected void initPropertiesTable() {
222221
/**
223222
* Get default columns values.
224223
*
225-
* @return Map<String, String>
224+
* @return Map of String to String
226225
*/
227226
protected Map<String, String> getDefaultColumnsValues() {
228227
return new HashMap<>();
@@ -231,7 +230,7 @@ protected Map<String, String> getDefaultColumnsValues() {
231230
/**
232231
* Get columns sources.
233232
*
234-
* @return Map<String, List<String>>
233+
* @return Map of String to List of String
235234
*/
236235
protected Map<String, List<String>> getColumnsSources() {
237236
return new HashMap<>();
@@ -339,7 +338,9 @@ protected void setAutocompleteListenerForDataPathNameField() {
339338
}
340339

341340
codeTextField.getDocument()
342-
.addDocumentListener(new DataPatchNameAdapter(dataPatchNameTextField, getEntityName()));
341+
.addDocumentListener(
342+
new DataPatchNameAdapter(dataPatchNameTextField, getEntityName())
343+
);
343344
}
344345

345346
/**
@@ -451,7 +452,7 @@ protected String getAttributeSource(final SourceModelData sourceModelData) {
451452
* Get attribute options.
452453
*
453454
* @param entityPropertiesTableGroupWrapper TableGroupWrapper
454-
* @return Map<Integer, String>
455+
* @return Map of Integer to String
455456
*/
456457
protected Map<Integer, String> getAttributeOptions(
457458
final TableGroupWrapper entityPropertiesTableGroupWrapper
@@ -465,7 +466,7 @@ protected Map<Integer, String> getAttributeOptions(
465466
* Get attribute options sort orders.
466467
*
467468
* @param entityPropertiesTableGroupWrapper TableGroupWrapper
468-
* @return Map<Integer, String>
469+
* @return Map of Integer to String
469470
*/
470471
protected Map<Integer, String> getAttributeOptionsSortOrders(
471472
final TableGroupWrapper entityPropertiesTableGroupWrapper
@@ -570,7 +571,9 @@ protected EavEntityDataInterface getEavEntityData() {
570571
* @param customerEntityData CustomerEntityData
571572
* @return CustomerEntityData
572573
*/
573-
private CustomerEntityData populateCustomerEntityData(final CustomerEntityData customerEntityData) {
574+
private CustomerEntityData populateCustomerEntityData(
575+
final CustomerEntityData customerEntityData
576+
) {
574577
customerEntityData.setModuleName(moduleName);
575578

576579
customerEntityData.setDataPatchName(getDataPatchName());
@@ -593,10 +596,18 @@ private CustomerEntityData populateCustomerEntityData(final CustomerEntityData c
593596
customerEntityData.setVisibleInGrid(visibleInGridCheckBox.isSelected());
594597
customerEntityData.setFilterableInGrid(filterableInGridCheckBox.isSelected());
595598
customerEntityData.setSystem(systemAttributeCheckBox.isSelected());
596-
customerEntityData.setUseInAdminhtmlCustomerForm(useInAdminhtmlCustomerCheckBox.isSelected());
597-
customerEntityData.setUseInAdminhtmlCheckoutForm(useInAdminhtmlCheckoutCheckBox.isSelected());
598-
customerEntityData.setUseInCustomerAccountCreateForm(useInCustomerAccountCreateCheckBox.isSelected());
599-
customerEntityData.setUseInCustomerAccountEditForm(useInCustomerAccountEditCheckBox.isSelected());
599+
customerEntityData.setUseInAdminhtmlCustomerForm(
600+
useInAdminhtmlCustomerCheckBox.isSelected()
601+
);
602+
customerEntityData.setUseInAdminhtmlCheckoutForm(
603+
useInAdminhtmlCheckoutCheckBox.isSelected()
604+
);
605+
customerEntityData.setUseInCustomerAccountCreateForm(
606+
useInCustomerAccountCreateCheckBox.isSelected()
607+
);
608+
customerEntityData.setUseInCustomerAccountEditForm(
609+
useInCustomerAccountEditCheckBox.isSelected()
610+
);
600611

601612
return customerEntityData;
602613
}
@@ -614,4 +625,4 @@ protected void onWriteActionOK() {
614625

615626
exit();
616627
}
617-
}
628+
}

src/main/java/com/magento/idea/magento2plugin/actions/generation/dialog/NewProductEavAttributeDialog.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ protected void initPropertiesTable() {
245245
/**
246246
* Get default columns values.
247247
*
248-
* @return Map<String, String>
248+
* @return Map of String to String
249249
*/
250250
protected Map<String, String> getDefaultColumnsValues() {
251251
return new HashMap<>();
@@ -254,7 +254,7 @@ protected Map<String, String> getDefaultColumnsValues() {
254254
/**
255255
* Get columns sources.
256256
*
257-
* @return Map<String, List<String>>
257+
* @return Map of String to List of String
258258
*/
259259
protected Map<String, List<String>> getColumnsSources() {
260260
return new HashMap<>();
@@ -362,7 +362,9 @@ protected void setAutocompleteListenerForDataPathNameField() {
362362
}
363363

364364
codeTextField.getDocument()
365-
.addDocumentListener(new DataPatchNameAdapter(dataPatchNameTextField, getEntityName()));
365+
.addDocumentListener(
366+
new DataPatchNameAdapter(dataPatchNameTextField, getEntityName())
367+
);
366368
}
367369

368370
/**
@@ -505,7 +507,7 @@ protected String getAttributeSource(final SourceModelData sourceModelData) {
505507
* Get attribute options.
506508
*
507509
* @param entityPropertiesTableGroupWrapper TableGroupWrapper
508-
* @return Map<Integer, String>
510+
* @return Map of Integer to String
509511
*/
510512
protected Map<Integer, String> getAttributeOptions(
511513
final TableGroupWrapper entityPropertiesTableGroupWrapper
@@ -519,7 +521,7 @@ protected Map<Integer, String> getAttributeOptions(
519521
* Get attribute options sort orders.
520522
*
521523
* @param entityPropertiesTableGroupWrapper TableGroupWrapper
522-
* @return Map<Integer, String>
524+
* @return Map of Integer to String
523525
*/
524526
protected Map<Integer, String> getAttributeOptionsSortOrders(
525527
final TableGroupWrapper entityPropertiesTableGroupWrapper

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,15 @@
2020
import com.magento.idea.magento2plugin.magento.packages.WebApiResource;
2121
import com.magento.idea.magento2plugin.util.magento.GetAclResourcesListUtil;
2222
import com.magento.idea.magento2plugin.util.magento.GetModuleNameByDirectoryUtil;
23-
import org.jetbrains.annotations.Nullable;
24-
import java.awt.event.KeyEvent;
25-
import java.awt.event.WindowAdapter;
26-
import java.awt.event.WindowEvent;
2723
import java.util.List;
2824
import javax.swing.JButton;
2925
import javax.swing.JComboBox;
3026
import javax.swing.JComponent;
3127
import javax.swing.JLabel;
3228
import javax.swing.JPanel;
3329
import javax.swing.JTextField;
34-
import javax.swing.KeyStroke;
3530
import org.jetbrains.annotations.NotNull;
31+
import org.jetbrains.annotations.Nullable;
3632

3733
@SuppressWarnings("PMD.TooManyFields")
3834
public class NewWebApiDeclarationDialog extends AbstractDialog {

0 commit comments

Comments
 (0)