Bug 96114 [IDE] should remove dependency on IPluginRegistry
We should remove our dependency on IPluginRegistry in favour of the new IExtensionRegistry. This should be a trivial migration.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/registry/CapabilityRegistry.java
cat = findCategory(catPath);
            if (cat != null) {
                cat.addElement(cap);
            } else {
                if (miscCategory == null)
                    miscCategory = new Category();
                miscCategory.addElement(cap);
            }
        }
        
        natureToCapability.put(cap.getNatureId(), cap);
    }
    /**
     * Removes from the capability collection all capabilities
     * whose UI is handle by another capability in the collection.
     * The provided collection must be in proper prerequisite order.
     * 
     * @param capabilities the capabilities to be pruned
     * @return a collection of capabilities pruned
     */
    public Capability[] pruneCapabilities(Capability[] capabilities) {
        ArrayList ids = new ArrayList(capabilities.length);
        for (int i = 0; i < capabilities.length; i++)
            ids.add(capabilities[i].getId());
        for (int i = 0; i < capabilities.length; i++) {
            ArrayList handleIds = capabilities[i].getHandleUIs();
            if (handleIds != null)
                ids.removeAll(handleIds);
        }
        String[] results = new String[ids.size()];