Package org.eclipse.equinox.p2.engine

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


    }
    boolean _equalsIgnoreCase = "lazy".equalsIgnoreCase(string);
    boolean _not = (!_equalsIgnoreCase);
    if (_not) {
      try {
        final VersionRange value = new VersionRange(string);
        return value.toString();
      } catch (final Throwable _t) {
        if (_t instanceof IllegalArgumentException) {
          final IllegalArgumentException e = (IllegalArgumentException)_t;
          throw new ValueConverterException((("Couldn\'t convert \'" + string) + "\' to a VersionRange value."), node, e);
        } else {
View Full Code Here


            _and = _not_1;
          }
          if (_and) {
            String _iD_2 = iu.getID();
            String _version_2 = iu.getVersion();
            VersionRange _versionRange = new VersionRange(_version_2);
            IQuery<IInstallableUnit> _createQuery = QueryUtil.createQuery("latest(x | x.id == $0 && x.version ~= $1)", _iD_2, _versionRange);
            NullProgressMonitor _nullProgressMonitor_2 = new NullProgressMonitor();
            final IQueryResult<IInstallableUnit> versionResult = metadataRepository.query(_createQuery, _nullProgressMonitor_2);
            boolean _isEmpty_1 = versionResult.isEmpty();
            if (_isEmpty_1) {
View Full Code Here

  public UnresolvedIU(String id, String versionRange) {
    if ("lazy".equalsIgnoreCase(versionRange)) {
      this.versionRange = LAZY_RANGE;
    } else {
      this.versionRange = new VersionRange(versionRange);
    }
    this.id = id;
    this.query = createQuery();
  }
View Full Code Here

    private void runUpdateOperation(IProgressMonitor monitor) throws OperationCanceledException, CoreException
    {
        if (operation == null)
            checkForUpdates(monitor);

        ProvisioningJob job = operation.getProvisioningJob(null);
        IStatus status = job.runModal(monitor);
        if (status.getSeverity() == IStatus.CANCEL)
            throw new OperationCanceledException();
    }
View Full Code Here

    private NewVersion checkForUpdates(IProgressMonitor monitor) throws OperationCanceledException, CoreException
    {
        loadRepository(agent);

        ProvisioningSession session = new ProvisioningSession(agent);
        operation = new UpdateOperation(session);

        IStatus status = operation.resolveModal(monitor);

        if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE)
View Full Code Here

  @Override
  public void checkUpdate(final Callback<UpdateCheckData> callback) {
    try {
      IProvisioningAgent agent = getProvisioningAgent();
      final ProvisioningSession session = new ProvisioningSession(agent);
      Job o = new Job("Check for Updates") {
       
        @Override
        protected IStatus run(IProgressMonitor monitor) {
          UpdateOperation o = new UpdateOperation(session);
View Full Code Here

        if (status.getSeverity() == IStatus.ERROR)
            throw new CoreException(status);

        Update[] possibleUpdates = operation.getPossibleUpdates();
        Update update = possibleUpdates.length > 0 ? possibleUpdates[0] : null;

        if (update == null)
        {
            return new NewVersion(Messages.LabelUnknownVersion, null, null);
        }
View Full Code Here

    private NewVersion checkForUpdates(IProgressMonitor monitor) throws OperationCanceledException, CoreException
    {
        loadRepository(agent);

        ProvisioningSession session = new ProvisioningSession(agent);
        operation = new UpdateOperation(session);

        IStatus status = operation.resolveModal(monitor);

        if (status.getCode() == UpdateOperation.STATUS_NOTHING_TO_UPDATE)
            return null;
View Full Code Here

      final ProvisioningSession session = new ProvisioningSession(agent);
      Job o = new Job("Check for Updates") {
       
        @Override
        protected IStatus run(IProgressMonitor monitor) {
          UpdateOperation o = new UpdateOperation(session);
          IStatus s = o.resolveModal(monitor);
          State state = fromStatus(s);
          callback.call(new P2UpdateCheckRV(o, state, s.getMessage(), state == State.OK,s.getException()));
          return Status.OK_STATUS;
        }
      };
      o.schedule();
    } catch (ProvisionException e) {
      getLogger().error(e.getMessage(), e);
      callback.call(new P2UpdateCheckRV(null, State.ERROR,"Failure while try to collect updateable units", null, e));
    }
  }
View Full Code Here

    // EV: throw a regular Exception to account for reflection exceptions
    //throws CoreException
    throws Exception
  {
    // EV: pull some private vars in to local scope.
    IPlanner planner = (IPlanner)this.getPrivateField("planner");

    IProvisioningPlan result = planner.getProvisioningPlan(
        request, context, new NullProgressMonitor());
    IStatus operationStatus = result.getStatus();
    if (!operationStatus.isOK())
      throw new CoreException(operationStatus);
    executePlan(context, result);
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.