Description of problem: When you try to rename or copy plugin to existing plugin name, exception is displayed instead of correct error. For example "Plugin name already exists.". Version-Release number of selected component (if applicable): 6.1.0.ER5 How reproducible: - Steps to Reproduce: 1. Create two plugins. (Extensions -> Plugin Management -> New...) 2. Open second plugin and try to rename or copy it to name of the first plugin. Actual results: "Unable to complete your request. The following exception occurred: org.uberfire.java.nio.file.FileAlreadyExistsException." error is diplayed Expected results: "help-inline" error is displayed below or next to the "New name input". (It should be same as in case of illegal name when you try to create new plugin.) Additional info: -
Eder, see here: https://github.com/uberfire/uberfire-extensions/blob/master/uberfire-commons-editor/uberfire-commons-editor-client/src/main/java/org/uberfire/ext/editor/commons/client/menu/BasicFileMenuBuilderImpl.java#L144 This is the "default" renaming implementation we use for most editors. The important bit (if you cannot use BasicFileMenuBuilder) is to have HasBusyIndicatorDefaultErrorCallback in the "error" callback in your client code. If VFS throws a File Already Exists exception HasBusyIndicatorDefaultErrorCallback will show a popup with a i18n'ed message.
Additional info: Same problem appears when you try to rename or copy plugin with name containing only space chars.
Still appears in 6.2.0.ER3.
Fixed by Paulo: https://github.com/uberfire/uberfire-extensions/commit/a3eb059bec04a5152c8779e5d28eb223ace610b2
Verified on 6.3.0.DR2.