/** * Returns a list of project names referenced in the team project set <code>input</code> for the * provider <code>prooviderType</code>. * * @throws CoreException */ public static List<String> readProjectReferences( InputStream input, RepositoryProviderType providerType) throws CoreException { try { List<String> referenceStrings = new ArrayList<String>(); XmlMemento[] providers = importProjectSet(input); for (XmlMemento provider : providers) { if (provider.getString("id").equals(providerType.getID())) { // $NON-NLS-1$ XmlMemento[] projects = provider.getChildren("project"); // $NON-NLS-1$ for (XmlMemento project : projects) { referenceStrings.add(project.getString("reference")); // $NON-NLS-1$ } } } return referenceStrings; } catch (Exception e) { throw new CoreException( new Status( IStatus.ERROR, ScmInternal.ID_PLUGIN, "Unexpected error reading project sets.", e)); //$NON-NLS-1$ } }