Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 209698 Details for
Bug 236709
p2 should register bundle groups
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
work in progress - update repo
236709-update.txt (text/plain), 5.07 KB, created by
DJ Houghton
on 2012-01-18 13:02:33 EST
(
hide
)
Description:
work in progress - update repo
Filename:
MIME Type:
Creator:
DJ Houghton
Created:
2012-01-18 13:02:33 EST
Size:
5.07 KB
patch
obsolete
>diff --git a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/BundleGroupComponent.java b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/BundleGroupComponent.java >index 8dd577a..7234e41 100644 >--- a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/BundleGroupComponent.java >+++ b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/BundleGroupComponent.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2009, 2010 IBM Corporation and others. >+ * Copyright (c) 2009, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -21,10 +21,13 @@ import org.eclipse.core.runtime.IBundleGroupProvider; > public class BundleGroupComponent implements IBundleGroupProvider { > > public IBundleGroup[] getBundleGroups() { >+ // if we are not reconciler then defer bundle group registration >+ if (!ConfigurationActivator.isReconciling()) >+ return new IBundleGroup[0]; > ConfigurationActivator activator = ConfigurationActivator.getConfigurator(); >+ // we manually registered the group in the activator; return no groups >+ // the manually registered service will handle the groups we know about > if (activator.bundleGroupProviderSR != null) >- // we manually registered the group in the activator; return no groups >- // the manually registered service will handle the groups we know about > return new IBundleGroup[0]; > return activator.getBundleGroups(); > } >@@ -32,5 +35,4 @@ public class BundleGroupComponent implements IBundleGroupProvider { > public String getName() { > return ConfigurationActivator.getConfigurator().getName(); > } >- > } >diff --git a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationActivator.java b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationActivator.java >index 2a32318..a2c1cf4 100644 >--- a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationActivator.java >+++ b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationActivator.java >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2003, 2010 IBM Corporation and others. >+ * Copyright (c) 2003, 2011 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -10,22 +10,22 @@ > *******************************************************************************/ > package org.eclipse.update.internal.configurator; > >-import org.osgi.framework.InvalidSyntaxException; >- > import java.io.*; >-import java.net.*; >+import java.net.MalformedURLException; >+import java.net.URL; > import java.util.*; >- >-import org.eclipse.core.runtime.*; >-import org.eclipse.osgi.framework.log.*; >-import org.eclipse.osgi.service.datalocation.*; >-import org.eclipse.osgi.service.debug.*; >+import org.eclipse.core.runtime.IBundleGroup; >+import org.eclipse.core.runtime.IBundleGroupProvider; >+import org.eclipse.osgi.framework.log.FrameworkLog; >+import org.eclipse.osgi.service.datalocation.Location; >+import org.eclipse.osgi.service.debug.DebugOptions; > import org.eclipse.osgi.util.ManifestElement; > import org.eclipse.osgi.util.NLS; >-import org.eclipse.update.configurator.*; >+import org.eclipse.update.configurator.IPlatformConfiguration; >+import org.eclipse.update.configurator.IPlatformConfigurationFactory; > import org.osgi.framework.*; >-import org.osgi.service.packageadmin.*; >-import org.osgi.service.startlevel.*; >+import org.osgi.service.packageadmin.PackageAdmin; >+import org.osgi.service.startlevel.StartLevel; > > public class ConfigurationActivator implements BundleActivator, IBundleGroupProvider, IConfigurationConstants { > >@@ -87,6 +87,18 @@ public class ConfigurationActivator implements BundleActivator, IBundleGroupProv > registerBundleGroupProvider(); > } > >+ >+ public static Object getService(BundleContext context, Class clazz) { >+ if (context == null) >+ return null; >+ ServiceReference reference = context.getServiceReference(clazz); >+ if (reference == null) >+ return null; >+ Object result = context.getService(reference); >+ context.ungetService(reference); >+ return result; >+ } >+ > /** > * Returns whether the update configurator should be doing its own reconciling work > */ >@@ -97,6 +109,9 @@ public class ConfigurationActivator implements BundleActivator, IBundleGroupProv > } > > private void registerBundleGroupProvider() { >+ // don't register if p2 is present, defer to them. >+ if (!isReconciling()) >+ return; > final String serviceName = IBundleGroupProvider.class.getName(); > try { > //don't register the service if this bundle has already registered it declaratively
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 236709
:
205648
|
209697
| 209698