Java 类org.eclipse.core.runtime.IRegistryChangeListener 实例源码

项目:eclipse-avro    文件:RegistryReader.java   
/**
 * Reads from the plugin registry and parses it.
 */
public void readRegistry()
{
  final IExtensionPoint point = pluginRegistry.getExtensionPoint(pluginID, extensionPointID);
  if (point != null)
  {
    IConfigurationElement[] elements = point.getConfigurationElements();
    for (int i = 0; i < elements.length; i++)
    {
      internalReadElement(elements[i], true);
    }

    pluginRegistry.addRegistryChangeListener
      (new IRegistryChangeListener()
       {
         public void registryChanged(IRegistryChangeEvent event)
         {
           IExtensionDelta[] deltas = event.getExtensionDeltas();
           for (int i = 0; i < deltas.length; ++i) 
           {
             IExtensionDelta delta = deltas[i];
             if (point.equals(delta.getExtensionPoint()))
             {
               boolean add = delta.getKind() == IExtensionDelta.ADDED;
               IExtension extension = delta.getExtension();
               IConfigurationElement[] configurationElement = extension.getConfigurationElements();
               for (int j = 0; j < configurationElement.length; ++j) 
               {
                 internalReadElement(configurationElement[j], add);
               }
             }
           }
         }
       });
    }
}
项目:clickwatch    文件:RegistryReader.java   
/**
 * Reads from the plugin registry and parses it.
 */
public void readRegistry()
{
  IExtensionPoint point = pluginRegistry.getExtensionPoint(pluginID, extensionPointID);
  if (point != null)
  {
    IConfigurationElement[] elements = point.getConfigurationElements();
    for (int i = 0; i < elements.length; i++)
    {
      internalReadElement(elements[i], true);
    }
  }

  pluginRegistry.addRegistryChangeListener
    (new IRegistryChangeListener()
     {
       public void registryChanged(IRegistryChangeEvent event)
       {
         IExtensionDelta[] deltas = event.getExtensionDeltas();
         for (int i = 0; i < deltas.length; ++i) 
         {
           IExtensionDelta delta = deltas[i];
           if (delta.getExtensionPoint().getUniqueIdentifier().equals(qualifiedExtensionPointID))
           {
             boolean add = delta.getKind() == IExtensionDelta.ADDED;
             IExtension extension = delta.getExtension();
             IConfigurationElement[] configurationElement = extension.getConfigurationElements();
             for (int j = 0; j < configurationElement.length; ++j) 
             {
               internalReadElement(configurationElement[j], add);
             }
           }
         }
       }
     });
}
项目:birt    文件:ExtensionRegistry.java   
public void addRegistryChangeListener( IRegistryChangeListener arg0 )
{
    throw new UnsupportedOperationException(
            "addRegistryChangeListener is not implemented yet" );
}
项目:birt    文件:ExtensionRegistry.java   
public void addRegistryChangeListener( IRegistryChangeListener listener,
        String token )
{
    throw new UnsupportedOperationException(
            "addRegistryChangeListener is not implemented yet" );
}
项目:birt    文件:ExtensionRegistry.java   
public void removeRegistryChangeListener( IRegistryChangeListener listener )
{
    throw new UnsupportedOperationException(
            "removeRegistryChangeListener is not implemented yet" );
}