This site is maintained for archival purposes only. Eclipse projects have transitioned to GitHub and Eclipse GitLab. Use the Projects search tool to locate your project and access its latest code and issue tracker.
Bug 241307 - repository manager add should always enable the repository
Summary: repository manager add should always enable the repository
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.5 M3   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 246876 (view as bug list)
Depends on:
Blocks: 248989
  Show dependency tree
 
Reported: 2008-07-17 15:02 EDT by John Arthorne CLA
Modified: 2010-02-19 14:59 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Arthorne CLA 2008-07-17 15:02:19 EDT
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.
Comment 1 Susan McCourt CLA 2008-07-31 18:19:39 EDT
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).
Comment 2 Susan McCourt CLA 2008-07-31 18:20:14 EDT
sorry, I fumble-fingered a radio button and accidentally reassigned this bug.  Assigning back to John.
Comment 3 John Arthorne CLA 2008-09-10 12:05:32 EDT
*** Bug 246876 has been marked as a duplicate of this bug. ***
Comment 4 John Arthorne CLA 2008-09-26 17:21:44 EDT
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.
Comment 5 Susan McCourt CLA 2008-09-29 13:49:18 EDT
> 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.
Comment 6 John Arthorne CLA 2008-09-29 21:08:17 EDT
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.
Comment 7 Nick Boldt CLA 2008-12-12 15:46:30 EST
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).
Comment 8 Susan McCourt CLA 2008-12-12 21:59:21 EST
Bug 236077 tracks a UI workaround that was committed in the 3.4.2 stream.