Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Arthorne2008-04-22 17:24:58 -0400
committerJohn Arthorne2008-04-22 17:24:58 -0400
commit9f448921727255d585cf4d0c92f79f3fd86260be (patch)
tree6f6c5bb0e5eb1c7f35dfc08dd67f8483b61072c1 /bundles/org.eclipse.equinox.p2.directorywatcher
parent485b913cb4f2f50f3f6601c9d4325e0833b978fc (diff)
downloadrt.equinox.p2-9f448921727255d585cf4d0c92f79f3fd86260be.tar.gz
rt.equinox.p2-9f448921727255d585cf4d0c92f79f3fd86260be.tar.xz
rt.equinox.p2-9f448921727255d585cf4d0c92f79f3fd86260be.zip
Bug 228046 Add discovery site for features installed via p2 UI
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.directorywatcher')
-rw-r--r--bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
index da78ce5d4..11a91e951 100644
--- a/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
+++ b/bundles/org.eclipse.equinox.p2.directorywatcher/src/org/eclipse/equinox/internal/provisional/p2/directorywatcher/RepositoryListener.java
@@ -95,20 +95,20 @@ public class RepositoryListener extends DirectoryChangeListener {
return;
URLEntry[] discoverySites = feature.getDiscoverySites();
for (int i = 0; i < discoverySites.length; i++)
- publishSite(feature, bus, discoverySites[i].getURL());
+ publishSite(feature, bus, discoverySites[i].getURL(), false);
String updateSite = feature.getUpdateSiteURL();
if (updateSite != null)
- publishSite(feature, bus, updateSite);
+ publishSite(feature, bus, updateSite, true);
}
/**
* Broadcast a discovery event for the given repository location.
*/
- private void publishSite(Feature feature, IProvisioningEventBus bus, String locationString) {
+ private void publishSite(Feature feature, IProvisioningEventBus bus, String locationString, boolean isEnabled) {
try {
URL location = new URL(locationString);
- bus.publishEvent(new RepositoryEvent(location, IRepository.TYPE_METADATA, RepositoryEvent.DISCOVERED));
- bus.publishEvent(new RepositoryEvent(location, IRepository.TYPE_ARTIFACT, RepositoryEvent.DISCOVERED));
+ bus.publishEvent(new RepositoryEvent(location, IRepository.TYPE_METADATA, RepositoryEvent.DISCOVERED, isEnabled));
+ bus.publishEvent(new RepositoryEvent(location, IRepository.TYPE_ARTIFACT, RepositoryEvent.DISCOVERED, isEnabled));
} catch (MalformedURLException e) {
LogHelper.log(new Status(IStatus.WARNING, Activator.ID, "Feature references invalid site: " + feature.getId(), e)); //$NON-NLS-1$
}

Back to the top