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
return EMPTY_ID_LIST;
        String[] natureIds = desc.getRequiredNatureIds();
        if (natureIds.length == 0)
            return EMPTY_ID_LIST;
        ArrayList results = new ArrayList(natureIds.length);
        for (int i = 0; i < natureIds.length; i++) {
            Capability cap = (Capability) natureToCapability.get(natureIds[i]);
            if (cap != null)
                results.add(cap.getId());
        }
        if (results.size() == 0) {
            return EMPTY_ID_LIST;
        } else {
            String[] ids = new String[results.size()];
            results.toArray(ids);
            return ids;
        }
    }
    /**
     * Returns the capabilities assigned to the specified project
     */
    public Capability[] getProjectCapabilities(IProject project) {
        try {
            String[] natureIds = project.getDescription().getNatureIds();
            ArrayList results = new ArrayList(natureIds.length);
            for (int i = 0; i < natureIds.length; i++) {
                Capability cap = (Capability) natureToCapability
                        .get(natureIds[i]);
                if (cap == null) {
                    cap = new Capability(natureIds[i]);