use of org.csstudio.autocomplete.ui.util.UIHelper in project yamcs-studio by yamcs.
the class AutoCompleteUIPlugin method readExtensionRegistry.
private void readExtensionRegistry() throws Exception {
// Registry lookup
final IExtensionRegistry registry = RegistryFactory.getRegistry();
final IConfigurationElement[] configs = registry.getConfigurationElementsFor(EXT_ID);
if (configs.length > 1)
throw new Exception("Found " + configs.length + " Auto-Complete UI Helper implementations, expecting at most one");
if (configs.length == 1) {
// Use implementations from extension point
Logger.getLogger(getClass().getName()).config("UI Helper provided by " + configs[0].getContributor().getName());
AutoCompleteUIPlugin.ui = (UIHelper) configs[0].createExecutableExtension("ui");
} else {
// Use default implementations
AutoCompleteUIPlugin.ui = new UIHelper();
}
}
Aggregations