Skip to content

Commit 79a7744

Browse files
committed
Capitalizing the entity name in order to correctly use it for generating all the php classes
1 parent 0b0e6ea commit 79a7744

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/com/magento/idea/magento2plugin/actions/generation/dialog/NewEntityDialog.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@
111111
import com.magento.idea.magento2plugin.util.magento.GetAclResourcesListUtil;
112112
import com.magento.idea.magento2plugin.util.magento.GetModuleNameByDirectoryUtil;
113113
import java.awt.event.ActionEvent;
114+
import java.awt.event.KeyAdapter;
114115
import java.awt.event.KeyEvent;
115116
import java.awt.event.WindowAdapter;
116117
import java.awt.event.WindowEvent;
@@ -275,6 +276,13 @@ public void windowClosing(final WindowEvent event) {
275276
JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT
276277
);
277278

279+
entityName.addKeyListener(new KeyAdapter() {
280+
@Override
281+
public void keyReleased(KeyEvent e) {
282+
entityName.setText(StringUtils.capitalize(entityName.getText()));
283+
}
284+
});
285+
278286
entityName.getDocument().addDocumentListener(new DocumentAdapter() {
279287
@SuppressWarnings("PMD.AccessorMethodGeneration")
280288
@Override

0 commit comments

Comments
 (0)