本文整理汇总了Java中org.eclipse.core.runtime.IRegistryChangeListener类的典型用法代码示例。如果您正苦于以下问题:Java IRegistryChangeListener类的具体用法?Java IRegistryChangeListener怎么用?Java IRegistryChangeListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IRegistryChangeListener类属于org.eclipse.core.runtime包,在下文中一共展示了IRegistryChangeListener类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: readRegistry
import org.eclipse.core.runtime.IRegistryChangeListener; //导入依赖的package包/类
/**
* 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);
}
}
}
}
});
}
}
示例2: readRegistry
import org.eclipse.core.runtime.IRegistryChangeListener; //导入依赖的package包/类
/**
* 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);
}
}
}
}
});
}
示例3: addRegistryChangeListener
import org.eclipse.core.runtime.IRegistryChangeListener; //导入依赖的package包/类
public void addRegistryChangeListener( IRegistryChangeListener arg0 )
{
throw new UnsupportedOperationException(
"addRegistryChangeListener is not implemented yet" );
}
示例4: removeRegistryChangeListener
import org.eclipse.core.runtime.IRegistryChangeListener; //导入依赖的package包/类
public void removeRegistryChangeListener( IRegistryChangeListener listener )
{
throw new UnsupportedOperationException(
"removeRegistryChangeListener is not implemented yet" );
}