Package org.eclipse.equinox.p2.engine

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


        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(11, 0, 2, "v201303041551");
            MockIU _mockIU = new MockIU("com.google.guava", _createOSGi);
            Version _createOSGi_1 = Version.createOSGi(4, 10, 0, "v4_10_0_v20130308-0414");
            MockIU _mockIU_1 = new MockIU("org.junit", _createOSGi_1);
            _xifexpression = CollectionLiterals.<IInstallableUnit>newImmutableList(_mockIU, _mockIU_1);
          } else {
            return CollectionLiterals.<IInstallableUnit>emptyList();
          }
          return _xifexpression;
        }
      });
      NullProgressMonitor _nullProgressMonitor = new NullProgressMonitor();
      targetDef.resolve(_mockMetadataRepositoryManager, _nullProgressMonitor);
      List<ResolvedLocation> _locations = targetDef.getLocations();
      int _size = _locations.size();
      Assert.assertEquals(1, _size);
      List<ResolvedLocation> _locations_1 = targetDef.getLocations();
      final ResolvedLocation loc = IterableExtensions.<ResolvedLocation>head(_locations_1);
      List<IInstallableUnit> _resolvedIUs = loc.getResolvedIUs();
      int _size_1 = _resolvedIUs.size();
      Assert.assertEquals(2, _size_1);
      List<IInstallableUnit> _resolvedIUs_1 = loc.getResolvedIUs();
      final Function1<IInstallableUnit, String> _function = new Function1<IInstallableUnit, String>() {
        public String apply(final IInstallableUnit it) {
          return it.getId();
        }
      };
      final String[] ids = ((String[])Conversions.unwrapArray(ListExtensions.<IInstallableUnit, String>map(_resolvedIUs_1, _function), String.class));
      List<IInstallableUnit> _resolvedIUs_2 = loc.getResolvedIUs();
      final Function1<IInstallableUnit, Version> _function_1 = new Function1<IInstallableUnit, Version>() {
        public Version apply(final IInstallableUnit it) {
          return it.getVersion();
        }
      };
      final Version[] versions = ((Version[])Conversions.unwrapArray(ListExtensions.<IInstallableUnit, Version>map(_resolvedIUs_2, _function_1), Version.class));
      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)));
      Version _parseVersion = Version.parseVersion("11.0.2.v201303041551");
      int _compareTo = _head_1.compareTo(_parseVersion);
      Assert.assertEquals(0, _compareTo);
      Object _get = ids[1];
      Assert.assertEquals("org.junit", _get);
      Version _get_1 = versions[1];
      Version _parseVersion_1 = Version.parseVersion("4.10.0.v4_10_0_v20130308-0414");
      int _compareTo_1 = _get_1.compareTo(_parseVersion_1);
      Assert.assertEquals(0, _compareTo_1);
    } 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/modeling/emf/compare/updates/releases/2.1/R201310031412/".equals(_string);
          if (_equals) {
            Version _createOSGi = Version.createOSGi(1, 0, 0);
            MockIU _mockIU = new MockIU("org.eclipse.emf.compare.rcp.ui.feature.group", _createOSGi);
            Version _createOSGi_1 = Version.createOSGi(1, 0, 0);
            MockIU _mockIU_1 = new MockIU("org.eclipse.emf.compare.ide.ui.feature.group", _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(1, 0, 0);
            MockIU _mockIU = new MockIU("org.eclipse.emf.compare.rcp.ui.feature.group", _createOSGi);
            Version _createOSGi_1 = Version.createOSGi(1, 0, 0);
            MockIU _mockIU_1 = new MockIU("org.eclipse.emf.compare.ide.ui.feature.group", _createOSGi_1);
            _xifexpression = CollectionLiterals.<IInstallableUnit>newImmutableList(_mockIU, _mockIU_1);
          } else {
            List<IInstallableUnit> _xifexpression_1 = null;
            String _string_1 = location.toString();
            boolean _equals_1 = "http://download.eclipse.org/modeling/emf/emf/updates/2.9.x/core/R201402030812/".equals(_string_1);
            if (_equals_1) {
              Version _createOSGi_2 = Version.createOSGi(1, 0, 0);
              MockIU _mockIU_2 = new MockIU("org.eclipse.emf.sdk.feature.group", _createOSGi_2);
              _xifexpression_1 = CollectionLiterals.<IInstallableUnit>newImmutableList(_mockIU_2);
            } 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(1, 0, 0);
            MockIU _mockIU = new MockIU("org.eclipse.emf.compare.rcp.ui.feature.group", _createOSGi);
            Version _createOSGi_1 = Version.createOSGi(1, 0, 0);
            MockIU _mockIU_1 = new MockIU("org.eclipse.emf.compare.ide.ui.feature.group", _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(1, 0, 0);
            MockIU _mockIU = new MockIU("org.eclipse.emf.compare.rcp.ui.feature.group", _createOSGi);
            Version _createOSGi_1 = Version.createOSGi(1, 0, 0);
            MockIU _mockIU_1 = new MockIU("org.eclipse.emf.compare.ide.ui.feature.group", _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(1, 0, 0);
            MockIU _mockIU = new MockIU("org.eclipse.emf.compare.rcp.ui.feature.group", _createOSGi);
            Version _createOSGi_1 = Version.createOSGi(1, 0, 0);
            MockIU _mockIU_1 = new MockIU("org.eclipse.emf.compare.ide.ui.feature.group", _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(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(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(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("11.0.2", _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(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("11.0.2", _string);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_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.