1 11 package org.eclipse.core.internal.plugins; 12 13 import org.eclipse.core.internal.runtime.CompatibilityHelper; 14 import org.eclipse.core.internal.runtime.InternalPlatform; 15 import org.eclipse.core.runtime.IPluginDescriptor; 16 import org.eclipse.core.runtime.Platform; 17 import org.osgi.framework.BundleActivator; 18 import org.osgi.framework.BundleContext; 19 20 public class CompatibilityActivator implements BundleActivator { 21 public void start(BundleContext context) throws Exception { 22 IPluginDescriptor descriptor = CompatibilityHelper.getPluginDescriptor(Platform.PI_RUNTIME); 23 CompatibilityHelper.setPlugin(descriptor, InternalPlatform.getDefault().getRuntimeInstance()); 24 CompatibilityHelper.setActive(descriptor); 25 } 26 27 public void stop(BundleContext context) throws Exception { 28 IPluginDescriptor descriptor = CompatibilityHelper.getPluginDescriptor(Platform.PI_RUNTIME); 29 CompatibilityHelper.setPlugin(descriptor, null); 30 ((PluginRegistry) org.eclipse.core.internal.plugins.InternalPlatform.getPluginRegistry()).close(); 31 CompatibilityHelper.nullCompatibility(); 32 } 33 34 } 35 | Popular Tags |