public Collection<IInstallableUnit> parse(InputStream stream) throws IOException { try { getParser(); iusHandler = new IUOnlyHandler(); xmlReader.setContentHandler(iusHandler); xmlReader.parse(new InputSource(stream)); if (isValidXML()) { return Arrays.asList(iusHandler.getInstallableUnits()); } throw new IOException(status.toString()); } catch (ParserConfigurationException configException) { throw new IOException(configException.getMessage()); } catch (SAXException saxException) { throw new IOException(saxException.getMessage()); } }
public Collection<IInstallableUnit> parse(InputStream stream) throws IOException { try { getParser(); iusHandler = new IUOnlyHandler(); xmlReader.setContentHandler(iusHandler); xmlReader.parse(new InputSource(stream)); if (isValidXML()) { return Arrays.asList(iusHandler.getInstallableUnits()); } throw new IOException(status.toString()); } catch (ParserConfigurationException configException) { IOException ioException = new IOException(configException.getMessage()); ioException.initCause(configException); throw ioException; } catch (SAXException saxException) { IOException ioException = new IOException(saxException.getMessage()); ioException.initCause(saxException); throw ioException; } }
public Collection<IInstallableUnit> parse(InputStream stream) throws IOException { try { getParser(); iusHandler = new IUOnlyHandler(); xmlReader.setContentHandler(iusHandler); xmlReader.parse(new InputSource(stream)); if (isValidXML()) { return Arrays.asList(iusHandler.getInstallableUnits()); } throw new IOException(status.toString()); } catch (ParserConfigurationException configException) { throw new IOException(configException.getMessage()); } catch (SAXException saxException) { throw new IOException(saxException.getMessage()); } }
@Override public Collection<IInstallableUnit> resolve(Map<String, String> properties, IProgressMonitor monitor) { Set<IInstallableUnit> result = new LinkedHashSet<>(); LinkedHashSet<IStatus> errors = new LinkedHashSet<>(); if (logger.isExtendedDebugEnabled()) { logger.debug("Available IUs:\n" + ResolverDebugUtils.toDebugString(data.getAvailableIUs(), false)); logger.debug("Root IUs:\n" + ResolverDebugUtils.toDebugString(data.getRootIUs(), true)); } result.addAll(data.getRootIUs()); QueryableCollection availableUIsQueryable = new QueryableCollection(data.getAvailableIUs()); for (IInstallableUnit iu : data.getRootIUs()) { collectIncludedIUs(availableUIsQueryable, result, errors, iu, true, monitor); } if (logger.isExtendedDebugEnabled()) { logger.debug("Collected IUs:\n" + ResolverDebugUtils.toDebugString(result, false)); } // TODO additionalRequirements if (!errors.isEmpty()) { MultiStatus status = new MultiStatus(Activator.PLUGIN_ID, 0, errors.toArray(new IStatus[errors.size()]), "Missing dependencies", null); throw new RuntimeException(status.toString(), new ProvisionException(status)); } return result; }
DebugHelper.debug(ENGINE, "Rolling back engine operation for profile=" + profile.getProfileId() + ". Reason was: " + result.toString()); //$NON-NLS-1$ //$NON-NLS-2$ IStatus status = session.rollback(monitor, result.getSeverity()); if (status.matches(IStatus.ERROR))
DebugHelper.debug(ENGINE, "Rolling back engine operation for profile=" + profile.getProfileId() + ". Reason was: " + result.toString()); //$NON-NLS-1$ //$NON-NLS-2$ IStatus status = session.rollback(monitor, result.getSeverity()); if (status.matches(IStatus.ERROR))