Source:
public LaunchBarUIManager(ILaunchBarManager manager) { this.manager = manager; IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(Activator.PLUGIN_ID, "launchBarUIContributions"); IExtension[] extensions = point.getExtensions(); for (IExtension extension : extensions) { for (IConfigurationElement element : extension.getConfigurationElements()) { String elementName = element.getName(); if (elementName.equals("descriptorUI")) { try { String descriptorTypeId = element.getAttribute("descriptorTypeId"); ILabelProvider labelProvider = (ILabelProvider) element.createExecutableExtension("labelProvider"); descriptorLabelProviders.put(descriptorTypeId, labelProvider); } catch (CoreException e) { Activator.log(e.getStatus()); } } else if (elementName.equals("targetUI")) { try { String targetTypeId = element.getAttribute("targetTypeId"); String targetName = element.getAttribute("name"); String iconStr = element.getAttribute("icon"); Image icon = null; if (iconStr != null && !iconStr.isEmpty()) { try { icon = ImageDescriptor.createFromURL(new URL(iconStr)).createImage(); } catch (MalformedURLException e) { Activator.log(e); } } ILabelProvider labelProvider = (ILabelProvider) element.createExecutableExtension("labelProvider"); IHoverProvider hoverProvider = null; if (element.getAttribute("hoverProvider") != null) { hoverProvider = (IHoverProvider) element.createExecutableExtension("hoverProvider"); } String editCommandId = element.getAttribute("editCommandId"); String addNewCommandId = element.getAttribute("addNewTargetCommandId"); targetContributions.put(targetTypeId, new LaunchBarTargetContribution(targetTypeId, targetName, icon, labelProvider, hoverProvider, editCommandId, addNewCommandId)); } catch (CoreException e) { Activator.log(e.getStatus()); } } } } }

Target:
public LaunchBarUIManager(ILaunchBarManager manager) { this.manager = manager; IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint(Activator.PLUGIN_ID, "launchBarUIContributions"); IExtension[] extensions = point.getExtensions(); for (IExtension extension : extensions) { for (IConfigurationElement element : extension.getConfigurationElements()) { String elementName = element.getName(); if (elementName.equals("descriptorUI")) { try { String descriptorTypeId = element.getAttribute("descriptorTypeId"); ILabelProvider labelProvider = (ILabelProvider) element.createExecutableExtension("labelProvider"); descriptorLabelProviders.put(descriptorTypeId, labelProvider); } catch (CoreException e) { Activator.log(e.getStatus()); } } else if (elementName.equals("targetUI")) { try { String targetTypeId = element.getAttribute("targetTypeId"); String targetName = element.getAttribute("name"); String iconStr = element.getAttribute("icon"); ILabelProvider labelProvider = (ILabelProvider) element.createExecutableExtension("labelProvider"); IHoverProvider hoverProvider = null; if (element.getAttribute("hoverProvider") != null) { hoverProvider = (IHoverProvider) element.createExecutableExtension("hoverProvider"); } String editCommandId = element.getAttribute("editCommandId"); String addNewCommandId = element.getAttribute("addNewTargetCommandId"); targetContributions.put(targetTypeId, new LaunchBarTargetContribution(targetTypeId, targetName, iconStr, labelProvider, hoverProvider, editCommandId, addNewCommandId)); } catch (CoreException e) { Activator.log(e.getStatus()); } } } } }