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
ids.toArray(results);
        return findCapabilities(results);
    }
    /**
     * Checks that the collection is valid. If so, the collection is
     * ordered based on prerequisite.
     * 
     * @param capabilities the capabilities to be checked and ordered
     * @return a status object with code <code>IStatus.OK</code> if
     *		the given set of natures is valid, otherwise a status 
     *		object indicating what is wrong with the set. Also, the
     * 		collection of capabilities specified is ordered based on
     * 		prerequisite.
     */
    public IStatus validateCapabilities(Capability[] capabilities) {
        String natures[] = new String[capabilities.length];
        for (int i = 0; i < capabilities.length; i++)
            natures[i] = capabilities[i].getNatureId();
        IWorkspace workspace = ResourcesPlugin.getWorkspace();
        IStatus status = workspace.validateNatureSet(natures);
        if (status.isOK()) {
            natures = workspace.sortNatureSet(natures);
            for (int i = 0; i < natures.length; i++)
                capabilities[i] = (Capability) natureToCapability
                        .get(natures[i]);
        }
        return status;
    }
}