Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[platform-core-dev] About PlatformActivator private member ServiceRegistration

Hi team,

I checkout the PlatformActivator code, found a private ServiceRegistration, only refered in a private method. And in stop method, comment it with:
unregister the EntryLocator to prevent the Framework from calling it
But it's a null object. no more functionalilty.

And I checkout CVS history, revision 1.66 do call a registerSerivce, but after that, no more need.

If it should be remove from the class?


The code block as follows:

org.eclipse.core.internal.runtime.PlatformActivator.java

public class PlatformActivator extends Plugin implements BundleActivator {
    private static BundleContext context;
    private ServiceRegistration entryLocatorRegistration;
    public void stop(BundleContext runtimeContext) {
        // unregister the EntryLocator to prevent the Framework from calling it
        unregisterEntryLocator();
     ...
   }

private void unregisterEntryLocator() {
        if (entryLocatorRegistration != null) {
            entryLocatorRegistration.unregister();
            entryLocatorRegistration = null;
        }
    }

--
致敬
向雅

Back to the top