Package fr.obeo.releng.targetplatform

Examples of fr.obeo.releng.targetplatform.Location


 
  @Fix(TargetPlatformValidator.CHECK__NO_OPTIONS_ON_LOCATIONS_IF_GLOBAL_OPTIONS)
  public void removeAllLocationSpecificOptions(final Issue issue, final IssueResolutionAcceptor acceptor) {
    final ISemanticModification _function = new ISemanticModification() {
      public void apply(final EObject element, final IModificationContext context) throws Exception {
        final Location location = ((Location) element);
        TargetPlatform _targetPlatform = location.getTargetPlatform();
        EList<Location> _locations = _targetPlatform.getLocations();
        final Procedure1<Location> _function = new Procedure1<Location>() {
          public void apply(final Location it) {
            EList<Option> _options = it.getOptions();
            _options.clear();
View Full Code Here


      public void apply(final EObject element, final IModificationContext context) throws Exception {
        final String id = ((Location) element).getID();
        final String uri = ((Location) element).getUri();
        boolean _notEquals = (!Objects.equal(uri, null));
        if (_notEquals) {
          final Location location = ((Location) element);
          TargetPlatform _targetPlatform = location.getTargetPlatform();
          EList<Location> _locations = _targetPlatform.getLocations();
          final Function1<Location, Boolean> _function = new Function1<Location, Boolean>() {
            public Boolean apply(final Location it) {
              boolean _and = false;
              boolean _notEquals = (!Objects.equal(uri, null));
View Full Code Here

      public void apply(final EObject element, final IModificationContext context) throws Exception {
        String[] _data = issue.getData();
        final String id = _data[0];
        String[] _data_1 = issue.getData();
        final String uri = _data_1[1];
        final Location location = ((Location) element);
        TargetPlatform _targetPlatform = location.getTargetPlatform();
        EList<Location> _locations = _targetPlatform.getLocations();
        final Function1<Location, Boolean> _function = new Function1<Location, Boolean>() {
          public Boolean apply(final Location it) {
            boolean _and = false;
            boolean _notEquals = (!Objects.equal(uri, null));
View Full Code Here

        int _length_1 = _text_2.length();
        boolean _lessThan = (_length_1 < currentNodeSizeToCursor);
        _or = _lessThan;
      }
      if (_or) {
        final Location location = ((Location) model);
        final String uri = location.getUri();
        TargetPlatformActivator _instance = TargetPlatformActivator.getInstance();
        IWorkbench _workbench = _instance.getWorkbench();
        final IWorkbenchWindow window = _workbench.getActiveWorkbenchWindow();
        final IRunnableWithProgress _function = new IRunnableWithProgress() {
          public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
            Shell _shell = window.getShell();
            Display _display = _shell.getDisplay();
            ReadAndDispatchProgressMonitorWrapper _readAndDispatchProgressMonitorWrapper = new ReadAndDispatchProgressMonitorWrapper(monitor, _display);
            final SubMonitor wpm = SubMonitor.convert(_readAndDispatchProgressMonitorWrapper, ("Creating content assist for " + uri), 100);
            try {
              Object _service = TargetPlatformProposalProvider.this.provisioningAgent.getService(IMetadataRepositoryManager.SERVICE_NAME);
              final IMetadataRepositoryManager repositoryManager = ((IMetadataRepositoryManager) _service);
              URI _uRI = new URI(uri);
              SubMonitor _newChild = wpm.newChild(90);
              final IMetadataRepository metadataRepository = repositoryManager.loadRepository(_uRI, _newChild);
              IQuery<IInstallableUnit> _iUAssistQuery = TargetPlatformProposalProvider.this.getIUAssistQuery();
              SubMonitor _newChild_1 = wpm.newChild(5);
              IQueryResult<IInstallableUnit> _query = metadataRepository.query(_iUAssistQuery, _newChild_1);
              final Set<IInstallableUnit> results = _query.toUnmodifiableSet();
              final Function1<IInstallableUnit, Boolean> _function = new Function1<IInstallableUnit, Boolean>() {
                public Boolean apply(final IInstallableUnit it) {
                  EList<IU> _ius = location.getIus();
                  final Function1<IU, String> _function = new Function1<IU, String>() {
                    public String apply(final IU it) {
                      return it.getID();
                    }
                  };
View Full Code Here

        boolean _lessThan = (_length_2 < currentNodeSizeToCursor);
        _or = _lessThan;
      }
      if (_or) {
        final IU iu = ((IU) model);
        Location _location = iu.getLocation();
        final String uri = _location.getUri();
        TargetPlatformActivator _instance = TargetPlatformActivator.getInstance();
        IWorkbench _workbench = _instance.getWorkbench();
        final IWorkbenchWindow window = _workbench.getActiveWorkbenchWindow();
        Shell _shell = window.getShell();
        Display _display = _shell.getDisplay();
View Full Code Here

  public void checkOptionsOnLocationAreIdentical(final TargetPlatform targetPlatform) {
    EList<Option> _options = targetPlatform.getOptions();
    boolean _isEmpty = _options.isEmpty();
    if (_isEmpty) {
      final EList<Location> listOptions = targetPlatform.getLocations();
      final Location first = IterableExtensions.<Location>head(listOptions);
      Iterable<Location> _tail = IterableExtensions.<Location>tail(listOptions);
      final Function1<Location, Boolean> _function = new Function1<Location, Boolean>() {
        public Boolean apply(final Location _) {
          EList<Option> _options = _.getOptions();
          Set<Option> _set = IterableExtensions.<Option>toSet(_options);
          EList<Option> _options_1 = first.getOptions();
          Set<Option> _set_1 = IterableExtensions.<Option>toSet(_options_1);
          Sets.SetView<Option> _symmetricDifference = Sets.<Option>symmetricDifference(_set, _set_1);
          boolean _isEmpty = _symmetricDifference.isEmpty();
          return Boolean.valueOf((!_isEmpty));
        }
View Full Code Here

            };
            Iterable<Location> _filter = IterableExtensions.<Location>filter(internalLocations, _function_9);
            final Procedure1<Location> _function_10 = new Procedure1<Location>() {
              public void apply(final Location it) {
                String _head = IterableExtensions.<String>head(externalIDs);
                Location _head_1 = IterableExtensions.<Location>head(externalLocations);
                String _uri = _head_1.getUri();
                TargetPlatformValidator.this.error(msg_1, it, TargetPlatformPackage.Literals.LOCATION__ID, TargetPlatformValidator.CHECK__INCLUDED_LOCATION_CONFLICTUAL_ID, _head, _uri);
              }
            };
            IterableExtensions.<Location>forEach(_filter, _function_10);
          }
View Full Code Here

    {
      Object _service = this.provisioningAgent.getService(IMetadataRepositoryManager.SERVICE_NAME);
      final IMetadataRepositoryManager repositoryManager = ((IMetadataRepositoryManager) _service);
      Object _xtrycatchfinallyexpression = null;
      try {
        Location _location = iu.getLocation();
        String _uri = _location.getUri();
        java.net.URI _uRI = new java.net.URI(_uri);
        NullProgressMonitor _nullProgressMonitor = new NullProgressMonitor();
        final IMetadataRepository metadataRepository = repositoryManager.loadRepository(_uRI, _nullProgressMonitor);
        String _iD = iu.getID();
        IQuery<IInstallableUnit> _createIUQuery = QueryUtil.createIUQuery(_iD);
        NullProgressMonitor _nullProgressMonitor_1 = new NullProgressMonitor();
        IQueryResult<IInstallableUnit> _query = metadataRepository.query(_createIUQuery, _nullProgressMonitor_1);
        final Set<IInstallableUnit> idResults = _query.toUnmodifiableSet();
        boolean _isEmpty = idResults.isEmpty();
        if (_isEmpty) {
          StringConcatenation _builder = new StringConcatenation();
          _builder.append("No installable unit with ID \'");
          String _iD_1 = iu.getID();
          _builder.append(_iD_1, "");
          _builder.append("\' can be found in \'");
          Location _location_1 = iu.getLocation();
          String _uri_1 = _location_1.getUri();
          _builder.append(_uri_1, "");
          _builder.append("\'.");
          this.error(_builder.toString(), iu, TargetPlatformPackage.Literals.IU__ID, TargetPlatformValidator.CHECK__IU_IN_LOCATION);
        } else {
          boolean _and = false;
View Full Code Here

          _builder_1.append(_join_2, "");
          _builder_1.append("\'.");
          _xifexpression = _builder_1.toString();
        }
        final String msg = _xifexpression;
        Location _location = entry.getLocation();
        Location _location_1 = entry.getLocation();
        EList<IU> _ius = _location_1.getIus();
        int _indexOf = _ius.indexOf(entry);
        TargetPlatformValidator.this.warning(msg, _location, TargetPlatformPackage.Literals.LOCATION__IUS, _indexOf, TargetPlatformValidator.CHECK__NO_DUPLICATED_IU);
      }
    };
    IterableExtensions.<IU>forEach(_filter, _function_7);
View Full Code Here

            ids.add(iu.getID());
            ius.add(new UnresolvedIU(iu.getID(), Strings.emptyToNull(iu.getVersion())));
          }
        }
      }
      Location firstLocation = locationIndex.get(locationUri).get(0);
      ResolvedLocation resolvedLocation = new ResolvedLocation(firstLocation.getID(), firstLocation.getUri(), ius, getOptionSet(firstLocation.getOptions()));
      locations.addFirst(resolvedLocation);
    }
   
    final EnumSet<Option> options = getOptionSet(targetPlatform.getOptions());
    return new ResolvedTargetPlatform(targetPlatform.getName(), locations, options, Environment.create(targetPlatform));
View Full Code Here

TOP

Related Classes of fr.obeo.releng.targetplatform.Location

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.