Package fr.obeo.releng.targetplatform.resolved

Examples of fr.obeo.releng.targetplatform.resolved.ResolvedTargetPlatform


      _builder_1.newLine();
      _builder_1.append("}");
      _builder_1.newLine();
      org.eclipse.emf.common.util.URI _createURI_1 = org.eclipse.emf.common.util.URI.createURI("tmp:/tp2.tpd");
      this.parser.parse(_builder_1, _createURI_1, resourceSet);
      final ResolvedTargetPlatform targetDef = ResolvedTargetPlatform.create(tp1, this.indexBuilder);
      MockMetadataRepositoryManager _mockMetadataRepositoryManager = new MockMetadataRepositoryManager(new IQueryResultProvider<IInstallableUnit>() {
        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();
            }
            _xifexpression = _xifexpression_1;
          }
          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(2, _size);
      List<ResolvedLocation> _locations_1 = targetDef.getLocations();
      ResolvedLocation _head = IterableExtensions.<ResolvedLocation>head(_locations_1);
      URI _uRI = _head.getURI();
      String _string = _uRI.toString();
      Assert.assertEquals("http://download.eclipse.org/modeling/emf/emf/updates/2.9.x/core/R201402030812/", _string);
      List<ResolvedLocation> _locations_2 = targetDef.getLocations();
      ResolvedLocation _get = _locations_2.get(1);
      URI _uRI_1 = _get.getURI();
      String _string_1 = _uRI_1.toString();
      Assert.assertEquals("http://download.eclipse.org/modeling/emf/compare/updates/releases/2.1/R201310031412/", _string_1);
      List<ResolvedLocation> _locations_3 = 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) {
View Full Code Here


      _builder_1.newLine();
      _builder_1.append("}");
      _builder_1.newLine();
      org.eclipse.emf.common.util.URI _createURI_1 = org.eclipse.emf.common.util.URI.createURI("tmp:/tp2.tpd");
      this.parser.parse(_builder_1, _createURI_1, resourceSet);
      final ResolvedTargetPlatform targetDef = ResolvedTargetPlatform.create(tp1, this.indexBuilder);
      MockMetadataRepositoryManager _mockMetadataRepositoryManager = new MockMetadataRepositoryManager(new IQueryResultProvider<IInstallableUnit>() {
        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();
          }
          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) {
View Full Code Here

TOP

Related Classes of fr.obeo.releng.targetplatform.resolved.ResolvedTargetPlatform

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.