Tabnine Logo
IExtensionRegistry.addListener
Code IndexAdd Tabnine to your IDE (free)

How to use
addListener
method
in
org.eclipse.core.runtime.IExtensionRegistry

Best Java code snippets using org.eclipse.core.runtime.IExtensionRegistry.addListener (Showing top 20 results out of 432)

origin: de.dentrassi.eclipse.neoscada.ide/org.eclipse.scada.configuration.component.lib

public ForwardingDanglingReferenceResolver ()
{
  Platform.getExtensionRegistry ().addListener ( this, EXPT_DANGLING_RESOLVER );
  buildCache ();
}
origin: org.eclipse.neoscada.ide/org.eclipse.scada.configuration.component.lib

public ForwardingDanglingReferenceResolver ()
{
  Platform.getExtensionRegistry ().addListener ( this, EXPT_DANGLING_RESOLVER );
  buildCache ();
}
origin: org.eclipse.platform/org.eclipse.equinox.bidi

private StructuredTextTypesCollector() {
  IExtensionRegistry registry = RegistryFactory.getRegistry();
  if (registry != null)
    registry.addListener(this, EXT_POINT);
}
origin: org.eclipse.platform/org.eclipse.equinox.security

static public PasswordProviderSelector getInstance() {
  if (instance == null) {
    instance = new PasswordProviderSelector();
    IExtensionRegistry registry = RegistryFactory.getRegistry();
    registry.addListener(instance, EXTENSION_POINT);
  }
  return instance;
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.security

static public PasswordProviderSelector getInstance() {
  if (instance == null) {
    instance = new PasswordProviderSelector();
    IExtensionRegistry registry = RegistryFactory.getRegistry();
    registry.addListener(instance, EXTENSION_POINT);
  }
  return instance;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.views

/**
 * Creates a property sheet view.
 */
public PropertySheet() {
  super();
  pinPropertySheetAction = new PinPropertySheetAction();
  RegistryFactory.getRegistry().addListener(this, EXT_POINT);
}
origin: org.eclipse.pde/org.eclipse.pde.runtime

@Override
public void connect(IProgressMonitor monitor) {
  if (monitor.isCanceled())
    return;
  PDERuntimePlugin.getDefault().getBundleContext().addBundleListener(this);
  Platform.getExtensionRegistry().addListener(this);
  PDERuntimePlugin.getDefault().getBundleContext().addServiceListener(this);
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.e4.ui.workbench

/**
 * 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);
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.app

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));
    }
  }
}
origin: org.eclipse.platform/org.eclipse.equinox.app

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));
    }
  }
}
origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.app

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));
    }
  }
}
origin: ops4j/peaberry

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);
  }
 }
}
origin: org.eclipse.platform/org.eclipse.ui.views

/**
 * Creates a property sheet view.
 */
public PropertySheet() {
  super();
  pinPropertySheetAction = new PinPropertySheetAction();
  RegistryFactory.getRegistry().addListener(this, EXT_POINT);
  saveablesTracker = new SaveablesTracker();
}
origin: protegeproject/protege

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());
}
origin: edu.stanford.protege/protege-editor-owl

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());
}
origin: edu.stanford.protege/org.protege.editor.owl

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());
}
origin: org.protege/protege-editor-owl

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());
  
}
origin: org.eclipse.platform/org.eclipse.equinox.registry

/**
 * 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;
}
origin: org.eclipse.equinox/registry

/**
 * 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;
}
origin: at.bestsolution.efxclipse.eclipse/org.eclipse.equinox.registry

/**
 * 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;
}
org.eclipse.core.runtimeIExtensionRegistryaddListener

Javadoc

Adds the given listener for registry change events. Listener will be notified on changes to all extension points and underlying extensions.

Depending on activity, listners of this type might receive a large number of modifications and negatively impact overall system performance. Whenever possible, consider registering listener specific to an extension point rather than a "global" listener.

Once registered, a listener starts receiving notification of changes to the registry. Registry change notifications are sent asynchronously. The listener continues to receive notifications until it is removed.

This method has no effect if the listener is already registered.

Popular methods of IExtensionRegistry

  • getExtensionPoint
    Returns the extension point in this extension registry with the given namespace and extension point
  • getConfigurationElementsFor
    Returns all configuration elements from the identified extension. Returns an empty array if the exte
  • addRegistryChangeListener
    Note: for new implementations consider using #addListener(IRegistryEventListener,String). Adds the g
  • removeRegistryChangeListener
    Removes the given registry change listener from this registry. Has no effect if an identical listene
  • removeListener
    Removes the given registry change listener from this registry. This method has no effect if the list
  • getExtension
    Returns the specified extension in this extension registry, or null if there is no such extension. T
  • getExtensionPoints
    Returns all extension points supplied by the contributor, or null if there are no such extension poi
  • addContribution
    Adds to this extension registry an extension point(s), extension(s), or a combination of those descr
  • getExtensions
    Returns all extensions supplied by the contributor, or null if there are no such extensions.
  • stop
    Call this method to properly stop the registry. The method stops registry event processing and write
  • getNamespaces
    Returns all namespaces currently used by extensions and extension points in this registry. Returns a
  • getNamespaces

Popular in Java

  • Start an intent from android
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • requestLocationUpdates (LocationManager)
  • compareTo (BigDecimal)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JTable (javax.swing)
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now