Package org.eclipse.equinox.p2.metadata

Examples of org.eclipse.equinox.p2.metadata.Version


    injectors = Collections.synchronizedMap(Maps.<String, Injector> newHashMapWithExpectedSize(1));
  }
 
  @Override
  public void stop(BundleContext context) throws Exception {
    IProvisioningAgent oldAgent = agent;
    agent = null;
    if (oldAgent != null) {
      oldAgent.stop();
    }
   
    injectors.clear();
   
    context = null;
View Full Code Here


      //updateRoamingProperties(profile);
      invokePrivate("updateRoamingProperties",
          new Class[]{IProfile.class}, new Object[]{profile});

      // EV: pull in private fields
      IProvisioningAgent targetAgent = (IProvisioningAgent)this.getPrivateField("targetAgent");
      List<URI> metadataRepositoryLocations = (List<URI>)this.getPrivateField("metadataRepositoryLocations");
      List<URI> artifactRepositoryLocations = (List<URI>)this.getPrivateField("artifactRepositoryLocations");
      boolean followReferences = ((Boolean)this.getPrivateField("followReferences")).booleanValue();
      String FOLLOW_ARTIFACT_REPOSITORY_REFERENCES = (String)this.getPrivateField("FOLLOW_ARTIFACT_REPOSITORY_REFERENCES");
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) {
View Full Code Here

  }

  private IProvisioningAgent getProvisioningAgent() throws ProvisionException {
    ServiceReference<?> reference = Activator.getContext()
        .getServiceReference(IProvisioningAgent.SERVICE_NAME);
    IProvisioningAgent agent = (IProvisioningAgent) Activator.getContext()
        .getService(reference);
    return agent;
  }
View Full Code Here

 
  public IProvisioningAgent getProvisioningAgent() {
    if (agent == null) {
      ServiceReference<?> serviceReference = context.getServiceReference(IProvisioningAgentProvider.class.getName());
      if (serviceReference != null) {
        IProvisioningAgentProvider agentProvider = (IProvisioningAgentProvider) context.getService(serviceReference);
        if (agentProvider != null) {
          try {
            agent = agentProvider.createAgent(getStateLocation().toFile().toURI());
          } catch (ProvisionException e) {
            getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, e.getMessage(), e));
          } catch (IllegalStateException e) {
            getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, e.getMessage(), e));
          }
View Full Code Here

            }
          } catch (final Throwable _t) {
            if (_t instanceof IllegalStateException) {
              final IllegalStateException e = (IllegalStateException)_t;
            } else if (_t instanceof ProvisionException) {
              final ProvisionException e_1 = (ProvisionException)_t;
            } else if (_t instanceof OperationCanceledException) {
              final OperationCanceledException e_2 = (OperationCanceledException)_t;
            } else {
              throw Exceptions.sneakyThrow(_t);
            }
View Full Code Here

    boolean _startsWith = _string.startsWith("bad");
    if (_startsWith) {
      String _string_1 = location.toString();
      String _plus = ("Bad location uri \'" + _string_1);
      String _plus_1 = (_plus + "\'");
      throw new ProvisionException(_plus_1);
    }
    return new MockMetadataRepository(location, this.resultProvider);
  }
View Full Code Here

        public IMetadataRepository loadRepository(final URI location, final IProgressMonitor monitor) throws ProvisionException, OperationCanceledException {
          IMetadataRepository _xifexpression = null;
          String _string = location.toString();
          boolean _equals = "unknownHost".equals(_string);
          if (_equals) {
            throw new ProvisionException("Unknown Host");
          } else {
            _xifexpression = super.loadRepository(location, monitor);
          }
          return _xifexpression;
        }
View Full Code Here

        boolean hasNoRepositoryFound = ((Boolean)invokePrivate(
              "hasNoRepositoryFound",
              new Class[]{IStatus.class},
              new Object[]{operationStatus})).booleanValue();
        if (noArtifactRepositorySpecified && hasNoRepositoryFound)
          throw new ProvisionException(Messages.Application_NoRepositories);
        throw new CoreException(operationStatus);
      }
    }
  }
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.
    IEngine engine = (IEngine)this.getPrivateField("engine");
    boolean verifyOnly = ((Boolean)this.getPrivateField("verifyOnly")).booleanValue();
    boolean noArtifactRepositorySpecified = ((Boolean)this.getPrivateField("noArtifactRepositorySpecified")).booleanValue();

    IStatus operationStatus;
    if (!verifyOnly) {
View Full Code Here

TOP

Related Classes of org.eclipse.equinox.p2.metadata.Version

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.