Package org.eclipse.equinox.p2.metadata

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


        public List<IInstallableUnit> listIUs(final URI location) {
          List<IInstallableUnit> _xifexpression = null;
          String _string = location.toString();
          boolean _equals = "http://download.eclipse.org/tools/orbit/downloads/drops/R20130517111416/repository/".equals(_string);
          if (_equals) {
            Version _createOSGi = Version.createOSGi(10, 0, 0);
            MockIU _mockIU = new MockIU("com.google.guava", _createOSGi);
            Version _createOSGi_1 = Version.createOSGi(11, 0, 2);
            MockIU _mockIU_1 = new MockIU("com.google.guava", _createOSGi_1);
            Version _createOSGi_2 = Version.createOSGi(12, 0, 0);
            MockIU _mockIU_2 = new MockIU("com.google.guava", _createOSGi_2);
            _xifexpression = CollectionLiterals.<IInstallableUnit>newImmutableList(_mockIU, _mockIU_1, _mockIU_2);
          } else {
            return CollectionLiterals.<IInstallableUnit>emptyList();
          }
          return _xifexpression;
        }
      });
      NullProgressMonitor _nullProgressMonitor = new NullProgressMonitor();
      targetDef.resolve(_mockMetadataRepositoryManager, _nullProgressMonitor);
      String _name = targetDef.getName();
      Assert.assertEquals("TP1", _name);
      List<ResolvedLocation> _locations = targetDef.getLocations();
      int _size = _locations.size();
      Assert.assertEquals(1, _size);
      List<ResolvedLocation> _locations_1 = targetDef.getLocations();
      final Function1<ResolvedLocation, List<String>> _function = new Function1<ResolvedLocation, List<String>>() {
        public List<String> apply(final ResolvedLocation it) {
          List<IInstallableUnit> _resolvedIUs = it.getResolvedIUs();
          final Function1<IInstallableUnit, String> _function = new Function1<IInstallableUnit, String>() {
            public String apply(final IInstallableUnit it) {
              return it.getId();
            }
          };
          return ListExtensions.<IInstallableUnit, String>map(_resolvedIUs, _function);
        }
      };
      List<List<String>> _map = ListExtensions.<ResolvedLocation, List<String>>map(_locations_1, _function);
      final String[] ids = ((String[])Conversions.unwrapArray(Iterables.<String>concat(_map), String.class));
      List<ResolvedLocation> _locations_2 = targetDef.getLocations();
      final Function1<ResolvedLocation, List<Version>> _function_1 = new Function1<ResolvedLocation, List<Version>>() {
        public List<Version> apply(final ResolvedLocation it) {
          List<IInstallableUnit> _resolvedIUs = it.getResolvedIUs();
          final Function1<IInstallableUnit, Version> _function = new Function1<IInstallableUnit, Version>() {
            public Version apply(final IInstallableUnit it) {
              return it.getVersion();
            }
          };
          return ListExtensions.<IInstallableUnit, Version>map(_resolvedIUs, _function);
        }
      };
      List<List<Version>> _map_1 = ListExtensions.<ResolvedLocation, List<Version>>map(_locations_2, _function_1);
      final Version[] versions = ((Version[])Conversions.unwrapArray(Iterables.<Version>concat(_map_1), Version.class));
      int _size_1 = ((List<String>)Conversions.doWrapArray(ids)).size();
      Assert.assertEquals(1, _size_1);
      Object _head = IterableExtensions.<Object>head(((Iterable<Object>)Conversions.doWrapArray(ids)));
      Assert.assertEquals("com.google.guava", _head);
      Version _head_1 = IterableExtensions.<Version>head(((Iterable<Version>)Conversions.doWrapArray(versions)));
      String _string = _head_1.toString();
      Assert.assertEquals("12.0.0", _string);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here


        public List<IInstallableUnit> listIUs(final URI location) {
          List<IInstallableUnit> _xifexpression = null;
          String _string = location.toString();
          boolean _equals = "http://download.eclipse.org/tools/orbit/downloads/drops/R20130517111416/repository/".equals(_string);
          if (_equals) {
            Version _createOSGi = Version.createOSGi(10, 0, 0);
            MockIU _mockIU = new MockIU("com.google.guava", _createOSGi);
            Version _createOSGi_1 = Version.createOSGi(10, 0, 0);
            MockIU _mockIU_1 = new MockIU("com.google.guava.source", _createOSGi_1);
            _xifexpression = CollectionLiterals.<IInstallableUnit>newImmutableList(_mockIU, _mockIU_1);
          } else {
            return CollectionLiterals.<IInstallableUnit>emptyList();
          }
View Full Code Here

        public List<IInstallableUnit> listIUs(final URI location) {
          List<IInstallableUnit> _xifexpression = null;
          String _string = location.toString();
          boolean _equals = "http://download.eclipse.org/tools/orbit/downloads/drops/R20130517111416/repository/".equals(_string);
          if (_equals) {
            Version _createOSGi = Version.createOSGi(10, 0, 0);
            MockIU _mockIU = new MockIU("com.google.guava", _createOSGi);
            Version _createOSGi_1 = Version.createOSGi(10, 0, 0);
            MockIU _mockIU_1 = new MockIU("com.google.guava.source", _createOSGi_1);
            _xifexpression = CollectionLiterals.<IInstallableUnit>newImmutableList(_mockIU, _mockIU_1);
          } else {
            return CollectionLiterals.<IInstallableUnit>emptyList();
          }
View Full Code Here

        public List<IInstallableUnit> listIUs(final URI location) {
          List<IInstallableUnit> _xifexpression = null;
          String _string = location.toString();
          boolean _equals = "http://download.eclipse.org/modeling/emf/compare/updates/releases/2.1/R201310031412/".equals(_string);
          if (_equals) {
            Version _createOSGi = Version.createOSGi(10, 0, 0);
            MockIU _createFeature = MockIU.createFeature("org.eclipse.emf.compare.rcp.ui.feature.group", _createOSGi);
            Version _createOSGi_1 = Version.createOSGi(10, 0, 0);
            MockIU _createFeature_1 = MockIU.createFeature("org.eclipse.emf.compare.rcp.ui.source.feature.group", _createOSGi_1);
            _xifexpression = CollectionLiterals.<IInstallableUnit>newImmutableList(_createFeature, _createFeature_1);
          } else {
            return CollectionLiterals.<IInstallableUnit>emptyList();
          }
View Full Code Here

        public List<IInstallableUnit> listIUs(final URI location) {
          List<IInstallableUnit> _xifexpression = null;
          String _string = location.toString();
          boolean _equals = "http://download.eclipse.org/modeling/emf/compare/updates/releases/2.1/R201310031412/".equals(_string);
          if (_equals) {
            Version _createOSGi = Version.createOSGi(10, 0, 0);
            MockIU _createFeature = MockIU.createFeature("org.eclipse.emf.compare.rcp.ui.feature.group", _createOSGi);
            Version _createOSGi_1 = Version.createOSGi(10, 0, 0);
            MockIU _createFeature_1 = MockIU.createFeature("org.eclipse.emf.compare.rcp.ui.source.feature.group", _createOSGi_1);
            _xifexpression = CollectionLiterals.<IInstallableUnit>newImmutableList(_createFeature, _createFeature_1);
          } else {
            return CollectionLiterals.<IInstallableUnit>emptyList();
          }
View Full Code Here

        public List<IInstallableUnit> listIUs(final URI location) {
          List<IInstallableUnit> _xifexpression = null;
          String _string = location.toString();
          boolean _equals = "http://download.eclipse.org/egit/updates-3.3".equals(_string);
          if (_equals) {
            Version _createOSGi = Version.createOSGi(3, 3, 2);
            MockIU _createFeature = MockIU.createFeature("org.eclipse.egit.feature.group", _createOSGi);
            Version _createOSGi_1 = Version.createOSGi(3, 3, 2);
            MockIU _createFeature_1 = MockIU.createFeature("org.eclipse.egit.mylyn.feature.group", _createOSGi_1);
            _xifexpression = CollectionLiterals.<IInstallableUnit>newImmutableList(_createFeature, _createFeature_1);
          } else {
            List<IInstallableUnit> _xifexpression_1 = null;
            String _string_1 = location.toString();
            boolean _equals_1 = "http://download.eclipse.org/tools/orbit/downloads/drops/R20130517111416/repository/".equals(_string_1);
            if (_equals_1) {
              Version _createOSGi_2 = Version.createOSGi(10, 0, 0);
              MockIU _createFeature_2 = MockIU.createFeature("com.google.guava", _createOSGi_2);
              Version _createOSGi_3 = Version.createOSGi(11, 0, 2);
              MockIU _createFeature_3 = MockIU.createFeature("com.google.guava", _createOSGi_3);
              Version _createOSGi_4 = Version.createOSGi(12, 0, 0);
              MockIU _createFeature_4 = MockIU.createFeature("com.google.guava", _createOSGi_4);
              _xifexpression_1 = CollectionLiterals.<IInstallableUnit>newImmutableList(_createFeature_2, _createFeature_3, _createFeature_4);
            } else {
              List<IInstallableUnit> _xifexpression_2 = null;
              String _string_2 = location.toString();
              boolean _equals_2 = "http://download.eclipse.org/modeling/emf/compare/updates/releases/2.1/R201310031412/".equals(_string_2);
              if (_equals_2) {
                Version _createOSGi_5 = Version.createOSGi(5, 0, 0);
                MockIU _createFeature_5 = MockIU.createFeature("org.eclipse.emf.compare.rcp.ui.feature.group", _createOSGi_5);
                _xifexpression_2 = CollectionLiterals.<IInstallableUnit>newImmutableList(_createFeature_5);
              } else {
                return CollectionLiterals.<IInstallableUnit>emptyList();
              }
View Full Code Here

    }
    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

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.