public ForwardingDanglingReferenceResolver () { Platform.getExtensionRegistry ().addListener ( this, EXPT_DANGLING_RESOLVER ); buildCache (); }
public ForwardingDanglingReferenceResolver () { Platform.getExtensionRegistry ().addListener ( this, EXPT_DANGLING_RESOLVER ); buildCache (); }
private StructuredTextTypesCollector() { IExtensionRegistry registry = RegistryFactory.getRegistry(); if (registry != null) registry.addListener(this, EXT_POINT); }
static public PasswordProviderSelector getInstance() { if (instance == null) { instance = new PasswordProviderSelector(); IExtensionRegistry registry = RegistryFactory.getRegistry(); registry.addListener(instance, EXTENSION_POINT); } return instance; }
static public PasswordProviderSelector getInstance() { if (instance == null) { instance = new PasswordProviderSelector(); IExtensionRegistry registry = RegistryFactory.getRegistry(); registry.addListener(instance, EXTENSION_POINT); } return instance; }
/** * Creates a property sheet view. */ public PropertySheet() { super(); pinPropertySheetAction = new PinPropertySheetAction(); RegistryFactory.getRegistry().addListener(this, EXT_POINT); }
@Override public void connect(IProgressMonitor monitor) { if (monitor.isCanceled()) return; PDERuntimePlugin.getDefault().getBundleContext().addBundleListener(this); Platform.getExtensionRegistry().addListener(this); PDERuntimePlugin.getDefault().getBundleContext().addServiceListener(this); }
/** * Sole constructor. * * @param extensionRegistry * the Eclipse ExtensionRegistry * @throws NullPointerException * if the given Eclipse ExtensionRegistry is {@code null} */ GenericMApplicationElementFactoryImpl(IExtensionRegistry extensionRegistry) { if (extensionRegistry == null) throw new NullPointerException("No ExtensionRegistry given!"); //$NON-NLS-1$ emfGeneratedPackages = new MApplicationElementClassToEClass(); // A clean-up would be nice but the only using service is realized as a singleton-service // which is used throughout the running application and so this instance will also life as // long as the application is running. extensionRegistry.addListener(emfGeneratedPackages, MApplicationElementClassToEClass.EP_MODEL_DEFINITION_ENRICHMENT); emfGeneratedPackages.initialize(extensionRegistry); }
void start() { launcherTracker.open(); extensionRegistry.addListener(this, PI_RUNTIME + '.' + PT_APPLICATIONS); // need to listen for system bundle stopping context.addBundleListener(this); // register all the descriptors registerAppDescriptors(); String startDefaultProp = context.getProperty(EclipseAppContainer.PROP_ECLIPSE_APPLICATION_LAUNCH_DEFAULT); if (startDefaultProp == null || "true".equalsIgnoreCase(startDefaultProp)) { //$NON-NLS-1$ // Start the default application try { startDefaultApp(true); } catch (ApplicationException e) { Activator.log(new FrameworkLogEntry(Activator.PI_APP, FrameworkLogEntry.ERROR, 0, Messages.application_errorStartDefault, 0, e, null)); } } }
void start() { launcherTracker.open(); extensionRegistry.addListener(this, PI_RUNTIME + '.' + PT_APPLICATIONS); // need to listen for system bundle stopping context.addBundleListener(this); // register all the descriptors registerAppDescriptors(); String startDefaultProp = context.getProperty(EclipseAppContainer.PROP_ECLIPSE_APPLICATION_LAUNCH_DEFAULT); if (startDefaultProp == null || "true".equalsIgnoreCase(startDefaultProp)) { //$NON-NLS-1$ // Start the default application try { startDefaultApp(true); } catch (ApplicationException e) { Activator.log(new FrameworkLogEntry(Activator.PI_APP, FrameworkLogEntry.ERROR, 0, Messages.application_errorStartDefault, 0, e, null)); } } }
void start() { launcherTracker.open(); extensionRegistry.addListener(this, PI_RUNTIME + '.' + PT_APPLICATIONS); // need to listen for system bundle stopping context.addBundleListener(this); // register all the descriptors registerAppDescriptors(); String startDefaultProp = context.getProperty(EclipseAppContainer.PROP_ECLIPSE_APPLICATION_LAUNCH_DEFAULT); if (startDefaultProp == null || "true".equalsIgnoreCase(startDefaultProp)) { //$NON-NLS-1$ // Start the default application try { startDefaultApp(true); } catch (ApplicationException e) { Activator.log(new FrameworkLogEntry(Activator.PI_APP, FrameworkLogEntry.ERROR, 0, Messages.application_errorStartDefault, 0, e, null)); } } }
synchronized void start(final IExtensionRegistry registry) { final IExtensionPoint[] extensionPoints; // register listener first to avoid race condition if (Object.class == clazz || IConfigurationElement.class == clazz) { registry.addListener(this); extensionPoints = registry.getExtensionPoints(); } else { registry.addListener(this, point); extensionPoints = new IExtensionPoint[]{registry.getExtensionPoint(point)}; } // safety check in case there was no matching extension point if (extensionPoints.length == 0 || null == extensionPoints[0]) { return; } final Set<IConfigurationElement> ignore = getExistingConfigurationElements(); // retrieve any matching extensions for each point for (final IExtensionPoint p : extensionPoints) { for (final IExtension e : p.getExtensions()) { insertExtension(e, ignore); } } }
/** * Creates a property sheet view. */ public PropertySheet() { super(); pinPropertySheetAction = new PinPropertySheetAction(); RegistryFactory.getRegistry().addListener(this, EXT_POINT); saveablesTracker = new SaveablesTracker(); }
private void addReasonerListener(final JMenuBar menuBar) { final IExtensionRegistry registry = PluginUtilities.getInstance().getExtensionRegistry(); final IExtensionPoint point = registry.getExtensionPoint(ProtegeOWL.ID, ProtegeOWLReasonerPlugin.REASONER_PLUGIN_TYPE_ID); registry.addListener(new IRegistryEventListener() { public void added(IExtension[] extensions) { OWLReasonerManagerImpl reasonerManager = (OWLReasonerManagerImpl) getOWLModelManager().getOWLReasonerManager(); Set<ProtegeOWLReasonerPlugin> plugins = new HashSet<>(); for (IExtension extension : extensions) { plugins.add(new ProtegeOWLReasonerPluginJPFImpl(getOWLModelManager(), extension)); } reasonerManager.addReasonerFactories(plugins); rebuildReasonerMenu(menuBar); menuBar.repaint(); } public void added(IExtensionPoint[] extensionPoints) { } public void removed(IExtension[] extensions) { } public void removed(IExtensionPoint[] extensionPoints) { } }, point.getUniqueIdentifier()); }
private void addReasonerListener(final JMenuBar menuBar) { final IExtensionRegistry registry = PluginUtilities.getInstance().getExtensionRegistry(); final IExtensionPoint point = registry.getExtensionPoint(ProtegeOWL.ID, ProtegeOWLReasonerPlugin.REASONER_PLUGIN_TYPE_ID); registry.addListener(new IRegistryEventListener() { public void added(IExtension[] extensions) { OWLReasonerManagerImpl reasonerManager = (OWLReasonerManagerImpl) getOWLModelManager().getOWLReasonerManager(); Set<ProtegeOWLReasonerPlugin> plugins = new HashSet<>(); for (IExtension extension : extensions) { plugins.add(new ProtegeOWLReasonerPluginJPFImpl(getOWLModelManager(), extension)); } reasonerManager.addReasonerFactories(plugins); rebuildReasonerMenu(menuBar); menuBar.repaint(); } public void added(IExtensionPoint[] extensionPoints) { } public void removed(IExtension[] extensions) { } public void removed(IExtensionPoint[] extensionPoints) { } }, point.getUniqueIdentifier()); }
private void addReasonerListener(final JMenuBar menuBar) { final IExtensionRegistry registry = PluginUtilities.getInstance().getExtensionRegistry(); final IExtensionPoint point = registry.getExtensionPoint(ProtegeOWL.ID, ProtegeOWLReasonerPlugin.REASONER_PLUGIN_TYPE_ID); registry.addListener(new IRegistryEventListener() { public void added(IExtension[] extensions) { OWLReasonerManagerImpl reasonerManager = (OWLReasonerManagerImpl) getOWLModelManager().getOWLReasonerManager(); Set<ProtegeOWLReasonerPlugin> plugins = new HashSet<ProtegeOWLReasonerPlugin>(); for (IExtension extension : extensions) { plugins.add(new ProtegeOWLReasonerPluginJPFImpl(getOWLModelManager(), extension)); } reasonerManager.addReasonerFactories(plugins); rebuildReasonerMenu(menuBar); menuBar.repaint(); } public void added(IExtensionPoint[] extensionPoints) { } public void removed(IExtension[] extensions) { } public void removed(IExtensionPoint[] extensionPoints) { } }, point.getUniqueIdentifier()); }
private void addReasonerListener(final JMenuBar menuBar) { final IExtensionRegistry registry = PluginUtilities.getInstance().getExtensionRegistry(); final IExtensionPoint point = registry.getExtensionPoint(ProtegeOWL.ID, ProtegeOWLReasonerPlugin.REASONER_PLUGIN_TYPE_ID); registry.addListener(new IRegistryEventListener() { public void added(IExtension[] extensions) { OWLReasonerManagerImpl reasonerManager = (OWLReasonerManagerImpl) getOWLModelManager().getOWLReasonerManager(); Set<ProtegeOWLReasonerPlugin> plugins = new HashSet<ProtegeOWLReasonerPlugin>(); for (IExtension extension : extensions) { plugins.add(new ProtegeOWLReasonerPluginJPFImpl(getOWLModelManager(), extension)); } reasonerManager.addReasonerFactories(plugins); rebuildReasonerMenu(menuBar); menuBar.repaint(); } public void added(IExtensionPoint[] extensionPoints) { } public void removed(IExtension[] extensions) { } public void removed(IExtensionPoint[] extensionPoints) { } }, point.getUniqueIdentifier()); }
/** * Loads adapters registered with the adapters extension point from * the plug-in registry. Note that the actual factory implementations * are loaded lazily as they are needed. */ @Override public boolean addFactories(AdapterManager adapterManager) { IExtensionPoint point = RegistryFactory.getRegistry().getExtensionPoint(ADAPTER_POINT_ID); if (point == null) return false; boolean factoriesAdded = false; IExtension[] extensions = point.getExtensions(); for (int i = 0; i < extensions.length; i++) { IConfigurationElement[] elements = extensions[i].getConfigurationElements(); for (int j = 0; j < elements.length; j++) { AdapterFactoryProxy proxy = AdapterFactoryProxy.createProxy(elements[j]); if (proxy != null) { adapterManager.registerFactory(proxy, proxy.getAdaptableType()); factoriesAdded = true; } } } RegistryFactory.getRegistry().addListener(this, ADAPTER_POINT_ID); return factoriesAdded; }
/** * Loads adapters registered with the adapters extension point from * the plug-in registry. Note that the actual factory implementations * are loaded lazily as they are needed. */ public boolean addFactories(AdapterManager adapterManager) { IExtensionPoint point = RegistryFactory.getRegistry().getExtensionPoint(ADAPTER_POINT_ID); if (point == null) return false; boolean factoriesAdded = false; IExtension[] extensions = point.getExtensions(); for (int i = 0; i < extensions.length; i++) { IConfigurationElement[] elements = extensions[i].getConfigurationElements(); for (int j = 0; j < elements.length; j++) { AdapterFactoryProxy proxy = AdapterFactoryProxy.createProxy(elements[j]); if (proxy != null) { adapterManager.registerFactory(proxy, proxy.getAdaptableType()); factoriesAdded = true; } } } RegistryFactory.getRegistry().addListener(this, ADAPTER_POINT_ID); return factoriesAdded; }
/** * Loads adapters registered with the adapters extension point from * the plug-in registry. Note that the actual factory implementations * are loaded lazily as they are needed. */ public boolean addFactories(AdapterManager adapterManager) { IExtensionPoint point = RegistryFactory.getRegistry().getExtensionPoint(ADAPTER_POINT_ID); if (point == null) return false; boolean factoriesAdded = false; IExtension[] extensions = point.getExtensions(); for (int i = 0; i < extensions.length; i++) { IConfigurationElement[] elements = extensions[i].getConfigurationElements(); for (int j = 0; j < elements.length; j++) { AdapterFactoryProxy proxy = AdapterFactoryProxy.createProxy(elements[j]); if (proxy != null) { adapterManager.registerFactory(proxy, proxy.getAdaptableType()); factoriesAdded = true; } } } RegistryFactory.getRegistry().addListener(this, ADAPTER_POINT_ID); return factoriesAdded; }