Community
Participate
Working Groups
The ModifyModulesComposite class automatically checks if addition of a module to a server can proceed. If it cannot (if canModifyModules returns false) it puts up an error preventing the addition of the module to the right side of the wizard. It does not perform this check on removal of modules. If canModifyModules(null, selectedRemoval) would return an error status, the composite never checks it and so does not block the removal. The result is that a user thinks they can remove the module. Upon pressing 'finish', the removal cannot proceed, and an error message comes up. It would be much better if the composite checks this itself, as it does for additions.
Created attachment 209425 [details] Fixes the described issue
Created attachment 210065 [details] v1.0 Thanks for submitting the patch. In org.eclipse.wst.server.ui.internal.wizard.page.ModifyModulesComposite.setEnablement(), the break at the bottom should not be called to prevent premature setting on the enablement based on one single module pass: if (requiredModules.length == 1 && requiredModules[0].equals(module)) { // this is a required module and can't be removed, exit the loop wizard.setMessage(NLS.bind(Messages.wizModuleRequiredModule, module.getName()), IMessageProvider.ERROR); enabled = false; break; } enabled = true; break; The updated patch is based on the original patch with this problem fixed and some clean up).
Code released to 33M and HEAD.
New Gerrit change created: https://git.eclipse.org/r/109090