Repository Location field should suggest previously known sites - #1114
Conversation
|
Just reading on my phone, it sounds like add will suggest repositories that are already present and don’t need to be added because they are already present. Maybe I overlooked something? |
That is a good point. You are right that re-adding an already enabled repository would effectively be a no-op. The primary use case I had in mind was adding a new repository URL that's similar to an existing one. For example, if I was thinking of it as being similar to a browser's address bar, where previously used URLs are suggested even if the user intends to navigate to a slightly different one. |
|
Thank you for the detailed explanation. I hadn't considered that the "Work with:" combo already supports editing the selected URL in place. You are right that it already covers the URL variation scenario I had in mind. I agree that including enabled repositories does not seem to add much value. I will update the implementation to suggest only disabled repositories, since those are not discoverable through the existing UI. That keeps the feature focused on the remaining gap. I will update the patch accordingly. |
fcf8477 to
51dc32a
Compare
|
I have updated the implementation. Now, only disabled repository URLs are shown in the autocomplete suggestions. |
I have to admit that a I'm not sure if this relatively large change carries it's own weight by providing assistance for a very specific use-case. Furthermore did you write the tests yourself or are they AI generated? In case of the latter, please check if they are really useful. AI often generates tests that are basically getter-tests. |
The Location field in RepositoryNameAndLocationDialog was a plain text box with no autocomplete, unlike the "Work with:" combo on the Available Software page. This change adds content assist to the Location field using a new TextAutoCompleteField helper, similar to the existing ComboAutoCompleteField. The autocomplete suggestions are populated with disabled repository URLs, allowing users to easily re-add repositories that were previously disabled but are no longer available through the existing UI. Fixes: eclipse-equinox#1113
51dc32a to
9746410
Compare
|
Thank you for the feedback. I revisited the tests and removed a few that did not add much value. I should also mention that I used AI to help write the tests by providing it with the exact scenarios I wanted to cover. I reviewed the generated tests before including them, but your comment made me take another look, and I realised a few of them were indeed unnecessary. I have removed those and retained only the ones that validate the intended behaviour. You are right that the use case is quite specific. The intention was to help users who had previously added a repository, later disabled it, and now want to add it again. Since disabled repositories are no longer available through the "Work with:" combo, and the Repository Explorer is intended for discovering repositories rather than recalling previously disabled ones, I thought this would help close that small gap. That said, I agree it's a fairly narrow use case. If you feel the feature does not justify the additional code, I'm perfectly happy to drop the change. |
|
I would prefer we don't add complexity to support this. If one disables an update site, it's even less likely one wants to use it, and of course one can easily enable it. |
|
Thank you for the review and the feedback. I understand your reasoning. I will close the PR. |



When adding or editing a repository, the Location field offered no suggestions, requiring users to remember and retype repository URLs manually. This change adds content assist to RepositoryNameAndLocationDialog.createLocationField() using a new TextAutoCompleteField helper.
The content assist suggests previously disabled repository URLs, making it easier to re-add repositories that are no longer discoverable through the existing UI. Implementing this in RepositoryNameAndLocationDialog automatically covers the Add Repository, Edit Repository.
Fixes: #1113