Package fr.obeo.releng.targetplatform

Examples of fr.obeo.releng.targetplatform.Environment


      EList<Resource.Diagnostic> _errors_1 = _eResource_1.getErrors();
      boolean _isEmpty = _errors_1.isEmpty();
      Assert.assertTrue(_join, _isEmpty);
      EList<TargetContent> _contents = tp.getContents();
      Iterable<Environment> _filter = Iterables.<Environment>filter(_contents, Environment.class);
      final Environment env = IterableExtensions.<Environment>head(_filter);
      String _operatingSystem = env.getOperatingSystem();
      Assert.assertEquals("win32", _operatingSystem);
      String _architecture = env.getArchitecture();
      Assert.assertEquals("x86_64", _architecture);
      String _windowingSystem = env.getWindowingSystem();
      Assert.assertEquals("motif", _windowingSystem);
      Locale _locale = new Locale("en", "us");
      Locale _localization = env.getLocalization();
      Assert.assertEquals(_locale, _localization);
      IExecutionEnvironmentsManager _executionEnvironmentsManager = JavaRuntime.getExecutionEnvironmentsManager();
      IExecutionEnvironment _environment = _executionEnvironmentsManager.getEnvironment("JavaSE-1.7");
      IExecutionEnvironment _executionEnvironment = env.getExecutionEnvironment();
      Assert.assertEquals(_environment, _executionEnvironment);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here


      Assert.assertTrue(_join, _isEmpty);
      Resource _eResource_2 = targetPlatform.eResource();
      EList<Resource.Diagnostic> _errors_2 = _eResource_2.getErrors();
      boolean _isEmpty_1 = _errors_2.isEmpty();
      Assert.assertTrue(_isEmpty_1);
      Environment _environment = targetPlatform.getEnvironment();
      String _operatingSystem = _environment.getOperatingSystem();
      Assert.assertEquals("win32", _operatingSystem);
      Environment _environment_1 = targetPlatform.getEnvironment();
      String _windowingSystem = _environment_1.getWindowingSystem();
      Assert.assertEquals("win32", _windowingSystem);
      EList<TargetContent> _contents = targetPlatform.getContents();
      TargetContent _get = _contents.get(0);
      String _operatingSystem_1 = ((Environment) _get).getOperatingSystem();
      Assert.assertEquals("win32", _operatingSystem_1);
View Full Code Here

      Assert.assertTrue(_join, _isEmpty);
      Resource _eResource_2 = targetPlatform.eResource();
      EList<Resource.Diagnostic> _errors_2 = _eResource_2.getErrors();
      boolean _isEmpty_1 = _errors_2.isEmpty();
      Assert.assertTrue(_isEmpty_1);
      Environment _environment = targetPlatform.getEnvironment();
      String _operatingSystem = _environment.getOperatingSystem();
      Assert.assertEquals("linux", _operatingSystem);
      Environment _environment_1 = targetPlatform.getEnvironment();
      String _windowingSystem = _environment_1.getWindowingSystem();
      Assert.assertEquals("win32", _windowingSystem);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here

      Assert.assertTrue(_join, _isEmpty);
      Resource _eResource_2 = targetPlatform.eResource();
      EList<Resource.Diagnostic> _errors_2 = _eResource_2.getErrors();
      boolean _isEmpty_1 = _errors_2.isEmpty();
      Assert.assertTrue(_isEmpty_1);
      Environment _environment = targetPlatform.getEnvironment();
      String _operatingSystem = _environment.getOperatingSystem();
      Assert.assertEquals("win32", _operatingSystem);
      Environment _environment_1 = targetPlatform.getEnvironment();
      String _windowingSystem = _environment_1.getWindowingSystem();
      Assert.assertEquals("cocoa", _windowingSystem);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here

      Assert.assertTrue(_join, _isEmpty);
      Resource _eResource_2 = targetPlatform.eResource();
      EList<Resource.Diagnostic> _errors_2 = _eResource_2.getErrors();
      boolean _isEmpty_1 = _errors_2.isEmpty();
      Assert.assertTrue(_isEmpty_1);
      Environment _environment = targetPlatform.getEnvironment();
      String _operatingSystem = _environment.getOperatingSystem();
      Assert.assertEquals("linux", _operatingSystem);
      Environment _environment_1 = targetPlatform.getEnvironment();
      String _windowingSystem = _environment_1.getWindowingSystem();
      Assert.assertEquals("win32", _windowingSystem);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here

      Assert.assertTrue(_join, _isEmpty);
      Resource _eResource_2 = targetPlatform.eResource();
      EList<Resource.Diagnostic> _errors_2 = _eResource_2.getErrors();
      boolean _isEmpty_1 = _errors_2.isEmpty();
      Assert.assertTrue(_isEmpty_1);
      Environment _environment = targetPlatform.getEnvironment();
      String _operatingSystem = _environment.getOperatingSystem();
      Assert.assertEquals("win32", _operatingSystem);
      Environment _environment_1 = targetPlatform.getEnvironment();
      String _windowingSystem = _environment_1.getWindowingSystem();
      Assert.assertEquals("cocoa", _windowingSystem);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
  }
View Full Code Here

      boolean _isEmpty = _options.isEmpty();
      if (_isEmpty) {
        ICompletionProposal _createCompletionProposal = this.createCompletionProposal("with", "describe how the set of elements to add to this target is determined", TargetPlatformProposalProvider.OPTIONS, 520, context);
        acceptor.accept(_createCompletionProposal);
      }
      Environment _environment = tp.getEnvironment();
      boolean _equals = Objects.equal(_environment, null);
      if (_equals) {
        ICompletionProposal _createCompletionProposal_1 = this.createCompletionProposal("environment", "describe the system that this target is built for", TargetPlatformProposalProvider.ENVIRONMENT, 510, context);
        acceptor.accept(_createCompletionProposal_1);
      }
View Full Code Here

      int _length_1 = _text_2.length();
      boolean _lessThan = (_length_1 < currentNodeSizeToCursor);
      _or = _lessThan;
    }
    if (_or) {
      final Environment env = ((Environment) model);
      String _operatingSystem = env.getOperatingSystem();
      boolean _equals = Objects.equal(_operatingSystem, null);
      if (_equals) {
        String[] _knownOSValues = Platform.knownOSValues();
        final Procedure1<String> _function = new Procedure1<String>() {
          public void apply(final String it) {
            ICompletionProposal _createCompletionProposal = TargetPlatformProposalProvider.this.createCompletionProposal(it, "operating system", env, 340, context);
            acceptor.accept(_createCompletionProposal);
          }
        };
        IterableExtensions.<String>forEach(((Iterable<String>)Conversions.doWrapArray(_knownOSValues)), _function);
      }
      String _windowingSystem = env.getWindowingSystem();
      boolean _equals_1 = Objects.equal(_windowingSystem, null);
      if (_equals_1) {
        String[] _knownWSValues = Platform.knownWSValues();
        final Procedure1<String> _function_1 = new Procedure1<String>() {
          public void apply(final String it) {
            ICompletionProposal _createCompletionProposal = TargetPlatformProposalProvider.this.createCompletionProposal(it, "windowing system", env, 330, context);
            acceptor.accept(_createCompletionProposal);
          }
        };
        IterableExtensions.<String>forEach(((Iterable<String>)Conversions.doWrapArray(_knownWSValues)), _function_1);
      }
      String _architecture = env.getArchitecture();
      boolean _equals_2 = Objects.equal(_architecture, null);
      if (_equals_2) {
        String[] _knownOSArchValues = Platform.knownOSArchValues();
        final Procedure1<String> _function_2 = new Procedure1<String>() {
          public void apply(final String it) {
            ICompletionProposal _createCompletionProposal = TargetPlatformProposalProvider.this.createCompletionProposal(it, "architecture", env, 320, context);
            acceptor.accept(_createCompletionProposal);
          }
        };
        IterableExtensions.<String>forEach(((Iterable<String>)Conversions.doWrapArray(_knownOSArchValues)), _function_2);
      }
      IExecutionEnvironment _executionEnvironment = env.getExecutionEnvironment();
      boolean _equals_3 = Objects.equal(_executionEnvironment, null);
      if (_equals_3) {
        final IExecutionEnvironmentsManager eeManager = JavaRuntime.getExecutionEnvironmentsManager();
        boolean _notEquals = (!Objects.equal(eeManager, null));
        if (_notEquals) {
          IExecutionEnvironment[] _executionEnvironments = eeManager.getExecutionEnvironments();
          final Procedure1<IExecutionEnvironment> _function_3 = new Procedure1<IExecutionEnvironment>() {
            public void apply(final IExecutionEnvironment it) {
              String _id = it.getId();
              String _description = it.getDescription();
              ICompletionProposal _createCompletionProposal = TargetPlatformProposalProvider.this.createCompletionProposal(_id, _description, env, 310, context);
              acceptor.accept(_createCompletionProposal);
            }
          };
          IterableExtensions.<IExecutionEnvironment>forEach(((Iterable<IExecutionEnvironment>)Conversions.doWrapArray(_executionEnvironments)), _function_3);
        }
      }
      Locale _localization = env.getLocalization();
      boolean _equals_4 = Objects.equal(_localization, null);
      if (_equals_4) {
        Locale[] _availableLocales = Locale.getAvailableLocales();
        final Procedure1<Locale> _function_4 = new Procedure1<Locale>() {
          public void apply(final Locale it) {
View Full Code Here

    }
  }
 
  @Check
  public void checkNoDuplicateEnvironmentOptions(final TargetPlatform tp) {
    final Environment tpEnv = tp.getEnvironment();
    String[] _knownOSValues = Platform.knownOSValues();
    final Function1<String, String> _function = new Function1<String, String>() {
      public String apply(final String it) {
        return it.toUpperCase();
      }
    };
    final List<String> knownOSUpperValues = ListExtensions.<String, String>map(((List<String>)Conversions.doWrapArray(_knownOSValues)), _function);
    String[] _knownWSValues = Platform.knownWSValues();
    final Function1<String, String> _function_1 = new Function1<String, String>() {
      public String apply(final String it) {
        return it.toUpperCase();
      }
    };
    final List<String> knownWSUpperValues = ListExtensions.<String, String>map(((List<String>)Conversions.doWrapArray(_knownWSValues)), _function_1);
    String[] _knownOSArchValues = Platform.knownOSArchValues();
    final Function1<String, String> _function_2 = new Function1<String, String>() {
      public String apply(final String it) {
        return it.toUpperCase();
      }
    };
    final List<String> knownArchUpperValues = ListExtensions.<String, String>map(((List<String>)Conversions.doWrapArray(_knownOSArchValues)), _function_2);
    Locale[] _availableLocales = Locale.getAvailableLocales();
    final Function1<Locale, String> _function_3 = new Function1<Locale, String>() {
      public String apply(final Locale it) {
        String _string = it.toString();
        return _string.toUpperCase();
      }
    };
    final List<String> knownLocale = ListExtensions.<Locale, String>map(((List<Locale>)Conversions.doWrapArray(_availableLocales)), _function_3);
    IExecutionEnvironmentsManager _executionEnvironmentsManager = JavaRuntime.getExecutionEnvironmentsManager();
    IExecutionEnvironment[] _executionEnvironments = _executionEnvironmentsManager.getExecutionEnvironments();
    final Function1<IExecutionEnvironment, String> _function_4 = new Function1<IExecutionEnvironment, String>() {
      public String apply(final IExecutionEnvironment it) {
        String _id = it.getId();
        return _id.toUpperCase();
      }
    };
    final List<String> knownEE = ListExtensions.<IExecutionEnvironment, String>map(((List<IExecutionEnvironment>)Conversions.doWrapArray(_executionEnvironments)), _function_4);
    EList<TargetContent> _contents = tp.getContents();
    Iterable<Environment> _filter = Iterables.<Environment>filter(_contents, Environment.class);
    final Function1<Environment, EList<String>> _function_5 = new Function1<Environment, EList<String>>() {
      public EList<String> apply(final Environment it) {
        return it.getEnv();
      }
    };
    Iterable<EList<String>> _map = IterableExtensions.<Environment, EList<String>>map(_filter, _function_5);
    Iterable<String> _flatten = Iterables.<String>concat(_map);
    final Function1<String, Boolean> _function_6 = new Function1<String, Boolean>() {
      public Boolean apply(final String it) {
        boolean _isNullOrEmpty = StringExtensions.isNullOrEmpty(it);
        return Boolean.valueOf((!_isNullOrEmpty));
      }
    };
    Iterable<String> _filter_1 = IterableExtensions.<String>filter(_flatten, _function_6);
    final List<String> envList = IterableExtensions.<String>toList(_filter_1);
    final Function1<String, Boolean> _function_7 = new Function1<String, Boolean>() {
      public Boolean apply(final String it) {
        String _upperCase = it.toUpperCase();
        String _windowingSystem = tpEnv.getWindowingSystem();
        String _upperCase_1 = null;
        if (_windowingSystem!=null) {
          _upperCase_1=_windowingSystem.toUpperCase();
        }
        boolean _equals = _upperCase.equals(_upperCase_1);
        return Boolean.valueOf((!_equals));
      }
    };
    Iterable<String> _filter_2 = IterableExtensions.<String>filter(envList, _function_7);
    final Function1<String, Boolean> _function_8 = new Function1<String, Boolean>() {
      public Boolean apply(final String it) {
        String _upperCase = it.toUpperCase();
        return Boolean.valueOf(knownOSUpperValues.contains(_upperCase));
      }
    };
    Iterable<String> _filter_3 = IterableExtensions.<String>filter(_filter_2, _function_8);
    final LinkedHashMultiset<String> allOS = LinkedHashMultiset.<String>create(_filter_3);
    final Function1<String, Boolean> _function_9 = new Function1<String, Boolean>() {
      public Boolean apply(final String it) {
        String _upperCase = it.toUpperCase();
        String _operatingSystem = tpEnv.getOperatingSystem();
        String _upperCase_1 = null;
        if (_operatingSystem!=null) {
          _upperCase_1=_operatingSystem.toUpperCase();
        }
        boolean _equals = _upperCase.equals(_upperCase_1);
View Full Code Here

   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
  public Environment getEnvironment() {
    Environment environment = basicGetEnvironment();
    return environment != null && environment.eIsProxy() ? (Environment)eResolveProxy((InternalEObject)environment) : environment;
  }
View Full Code Here

TOP

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

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.