File tree Expand file tree Collapse file tree
src/main/kotlin/eu/ibagroup/formainframe/explorer/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -61,7 +61,8 @@ class RenameDialog(
6161 textField()
6262 .bindText(this @RenameDialog::state)
6363 .validationOnApply { validateForBlank(it) ? : validateOnInput(it) }
64- .apply { focused() }
64+ .onApply { state = state.uppercaseIfNeeded() }
65+ .focused()
6566 }
6667 }
6768 }
@@ -78,6 +79,8 @@ class RenameDialog(
7879 * Validate a new name for the selected node component
7980 */
8081 private fun validateOnInput (component : JTextField ): ValidationInfo ? {
82+ component.text = component.text.uppercaseIfNeeded()
83+
8184 val attributes = selectedNodeData.attributes
8285
8386 validateForTheSameValue(attributes?.name, component)?.let { return it }
@@ -102,4 +105,15 @@ class RenameDialog(
102105 return null
103106 }
104107
108+ /* *
109+ * Convert the string to upper case if partitioned dataset, sequential dataset or dataset member is selected
110+ */
111+ private fun String.uppercaseIfNeeded (): String {
112+ return if (node is LibraryNode || node is FileLikeDatasetNode ) {
113+ this .uppercase()
114+ } else {
115+ this
116+ }
117+ }
118+
105119}
You can’t perform that action at this time.
0 commit comments