Package org.eclipse.equinox.p2.engine

Examples of org.eclipse.equinox.p2.engine.IProfile


  @Check(value = CheckType.EXPENSIVE)
  public Object checkIUIDAndRangeInRepository(final IU iu) {
    Object _xblockexpression = null;
    {
      Object _service = this.provisioningAgent.getService(IMetadataRepositoryManager.SERVICE_NAME);
      final IMetadataRepositoryManager repositoryManager = ((IMetadataRepositoryManager) _service);
      Object _xtrycatchfinallyexpression = null;
      try {
        Location _location = iu.getLocation();
        String _uri = _location.getUri();
        java.net.URI _uRI = new java.net.URI(_uri);
        NullProgressMonitor _nullProgressMonitor = new NullProgressMonitor();
        final IMetadataRepository metadataRepository = repositoryManager.loadRepository(_uRI, _nullProgressMonitor);
        String _iD = iu.getID();
        IQuery<IInstallableUnit> _createIUQuery = QueryUtil.createIUQuery(_iD);
        NullProgressMonitor _nullProgressMonitor_1 = new NullProgressMonitor();
        IQueryResult<IInstallableUnit> _query = metadataRepository.query(_createIUQuery, _nullProgressMonitor_1);
        final Set<IInstallableUnit> idResults = _query.toUnmodifiableSet();
View Full Code Here


  private Diagnostic doGenerateTargetDefinitionFile(URI uri, TargetPlatform targetPlatform, IProgressMonitor monitor)  {
    final BasicDiagnostic ret = new BasicDiagnostic();
    SubMonitor subMonitor = SubMonitor.convert(monitor, 100);
   
    try {
      IMetadataRepositoryManager repositoryManager = (IMetadataRepositoryManager) agent.getService(IMetadataRepositoryManager.SERVICE_NAME);
      ResolvedTargetPlatform resolvedTargetPlatform = ResolvedTargetPlatform.create(targetPlatform, indexBuilder);
      subMonitor.worked(5);
     
      if (subMonitor.isCanceled()) {
        ret.merge(Diagnostic.CANCEL_INSTANCE);
View Full Code Here

        return type.cast(result);
    }

    private void loadRepository(IProvisioningAgent agent) throws CoreException
    {
        IMetadataRepositoryManager repositoryManager = (IMetadataRepositoryManager) agent
                        .getService(IMetadataRepositoryManager.SERVICE_NAME);

        IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) agent
                        .getService(IArtifactRepositoryManager.SERVICE_NAME);

        // first: remove existing repositories (preferences might have changed)
        for (URI r : repositoryManager.getKnownRepositories(IMetadataRepositoryManager.REPOSITORIES_ALL))
            repositoryManager.removeRepository(r);

        for (URI r : artifactManager.getKnownRepositories(IArtifactRepositoryManager.REPOSITORIES_ALL))
            artifactManager.removeRepository(r);

        // second: add repository as configured in preferences
        try
        {
            String updateSite = PortfolioPlugin.getDefault().getPreferenceStore()
                            .getString(PortfolioPlugin.Preferences.UPDATE_SITE);
            URI repoLocation = new URI(updateSite);
            repositoryManager.loadRepository(repoLocation, null);
            artifactManager.loadRepository(repoLocation, null);
        }
        catch (URISyntaxException e)
        {
            IStatus status = new Status(IStatus.ERROR, PortfolioPlugin.PLUGIN_ID, e.getMessage(), e);
View Full Code Here

TOP

Related Classes of org.eclipse.equinox.p2.engine.IProfile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.