Bug 71640 [IDE] use of deprecated IExtension.getDeclaringPluginDescriptor()
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/registry/Capability.java
}
    /* (non-Javadoc)
     * Method declared on IWorkbenchAdapter.
     */
    public ImageDescriptor getImageDescriptor(Object object) {
        return getIconDescriptor();
    }
    /* (non-Javadoc)
     * Method declared on IWorkbenchAdapter.
     */
    public String getLabel(Object o) {
        return getName();
    }
    public String getName() {
        if (isValid())
            return natureDescriptor.getLabel();
		else
			return NLS.bind(IDEWorkbenchMessages.Capability_nameMissing, id);
    }
    public ImageDescriptor getIconDescriptor() {
        if (icon == null && isValid()) {
            IExtension extension = element.getDeclaringExtension();
            String extendingPluginId = extension.getDeclaringPluginDescriptor()
                    .getUniqueIdentifier();
            String location = element.getAttribute(ATT_ICON);
            if (location != null && location.length() > 0)
                icon = AbstractUIPlugin.imageDescriptorFromPlugin(
                        extendingPluginId, location);
        }
        return icon;