Skip to content

Commit 17a6c03

Browse files
author
Vitaliy
authored
Merge pull request #506 from eduard13/entity-manager-capitalize-entity-name
Entity manager capitalized entity name
2 parents 0b0e6ea + 79a7744 commit 17a6c03

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)