Skip to content

Conversation

@shivam71
Copy link
Member

@shivam71 shivam71 commented Nov 7, 2025

Dollar characters are allowed for java objects but are not recommended for user defined objects this adds a check for the same .

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Nov 7, 2025
+ client.showMessage(new MessageParams(MessageType.Error,Bundle.ERR_InvalidObjectName(name)));
+ return client.showInputBox(new ShowInputBoxParams(Bundle.CTL_TemplateUI_SelectName(), desc.getProposedName())).thenCompose(this);
+ } else if (name.contains("$")) {
+ final MessageActionItem continue_action = new MessageActionItem("Continue");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add it in the bundle so that it can be localized.

+ return client.showInputBox(new ShowInputBoxParams(Bundle.CTL_TemplateUI_SelectName(), desc.getProposedName())).thenCompose(this);
+ } else if (name.contains("$")) {
+ final MessageActionItem continue_action = new MessageActionItem("Continue");
+ final MessageActionItem try_again = new MessageActionItem("Try Again");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add it in the bundle so that it can be localized.

+ final MessageActionItem continue_action = new MessageActionItem("Continue");
+ final MessageActionItem try_again = new MessageActionItem("Try Again");
+ ShowMessageRequestParams smrp = new ShowMessageRequestParams(Arrays.asList(continue_action, try_again));
+ smrp.setMessage("Object name contains $, not recommended for user defined objects , Do you want to continue with the current name or try again ?");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add it in the bundle so that it can be localized.

Comment on lines 128 to 129
+ final MessageActionItem continue_action = new MessageActionItem("Continue");
+ final MessageActionItem try_again = new MessageActionItem("Try Again");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Try to use the camel-case codestyle for naming variables etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

OCA Verified All contributors have signed the Oracle Contributor Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants