Community
Participate
Working Groups
This is a follow-on from bug 236077. We should change the I*RepositoryManager APIs so that addRepository() will enable the resulting repository, even if it was already present and disabled.
In this case the UI should handle the RepositoryEvent.CHANGED event. Open question would be whether the UI code would also load the repo and make it visible as it does when a repo is added. The risk in doing so is that other changes could occur to a repo and in those cases we wouldn't want to make the repo content visible. We need to think about how to communicate what CHANGED in the event, because ideally the UI wants to be able to distinguish the changing of enablement (which looks visually like a repo was added) from other kinds of changes (which might just require updating of a repo label).
sorry, I fumble-fingered a radio button and accidentally reassigned this bug. Assigning back to John.
*** Bug 246876 has been marked as a duplicate of this bug. ***
I have released an initial fix for this. Adding a repository that is already known but disabled will now cause the repository to be enabled. A new event RepositoryEvent#ENABLEMENT is fired when the enablement of a repository is changed. I'm leaving this open to add more tests for it. Susan: presumably the UI will need to be updated to respond to enablement changes. I'm not sure if you already have a bug for this. My rationale for creating a new event type is that enablement is a property of the repository manager rather than a property of the repository itself. Leaving this open to write some more tests.
> Susan: presumably the UI will need to be updated to respond to enablement > changes. I'm not sure if you already have a bug for this. My rationale for > creating a new event type is that enablement is a property of the repository > manager rather than a property of the repository itself. Opened bug 248989 for the UI side. The UI does not respond to CHANGED events either, so this would have required UI change regardless of the event type.
I have added general tests of the enablement event, as well as specific tests for the case of re-adding a disabled repository to both ArtifactRepositoryManagerTest and MetadataRepositoryManagerTest.
Any chance this can be fixed in 3.4.2 as well? Big usability problem for projects/products with multiple update site dependencies for which their associated sites are already listed but are not enabled (eg., Ganymede projects).
Bug 236077 tracks a UI workaround that was committed in the 3.4.2 stream.