1. Click Window > Preferences > JBoss Tools > JBoss Tools Runtime Detection
2. Click Add and select a random directory without a runtime
3. Next window displays 'No runtime found' (as expected!)
4. Click Cancel
5. Despite no runtime being found this path has been added to the list of paths to scan.
I can understand that some users might want to add paths despite runtimes not being found - hence current behavior. But some users might just be searching for a runtime location using trial and error and it can become frustrating to have to then select the path and click Remove.
Could this be improved by adding a step between 4 and 5? So after clicking Cancel a message is displayed to say 'No runtime was found. Are you sure you want to add this path?' with yes/no options, where yes adds the path and no doesn't add it.