Examples of XBlockExpression


Examples of org.eclipse.xtext.xbase.XBlockExpression

    final Procedure1<JvmGenericType> _function = new Procedure1<JvmGenericType>() {
      public void apply(final JvmGenericType it) {
        EList<JvmTypeReference> _superTypes = it.getSuperTypes();
        JvmTypeReference _typeRef = TortoiseShellJvmModelInferrer.this._typeReferenceBuilder.typeRef(Tortoise.class);
        TortoiseShellJvmModelInferrer.this._jvmTypesBuilder.<JvmTypeReference>operator_add(_superTypes, _typeRef);
        XBlockExpression _body = program.getBody();
        boolean _notEquals = (!Objects.equal(_body, null));
        if (_notEquals) {
          EList<JvmMember> _members = it.getMembers();
          JvmTypeReference _typeRef_1 = TortoiseShellJvmModelInferrer.this._typeReferenceBuilder.typeRef(void.class);
          final Procedure1<JvmOperation> _function = new Procedure1<JvmOperation>() {
            public void apply(final JvmOperation it) {
              XBlockExpression _body = program.getBody();
              TortoiseShellJvmModelInferrer.this._jvmTypesBuilder.setBody(it, _body);
            }
          };
          JvmOperation _method = TortoiseShellJvmModelInferrer.this._jvmTypesBuilder.toMethod(program, "main", _typeRef_1, _function);
          TortoiseShellJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
        }
        EList<SubProgram> _subPrograms = program.getSubPrograms();
        for (final SubProgram subProgram : _subPrograms) {
          EList<JvmMember> _members_1 = it.getMembers();
          String _name = subProgram.getName();
          JvmTypeReference _elvis = null;
          JvmTypeReference _returnType = subProgram.getReturnType();
          if (_returnType != null) {
            _elvis = _returnType;
          } else {
            XBlockExpression _body_1 = subProgram.getBody();
            JvmTypeReference _inferredType = TortoiseShellJvmModelInferrer.this._jvmTypesBuilder.inferredType(_body_1);
            _elvis = _inferredType;
          }
          final Procedure1<JvmOperation> _function_1 = new Procedure1<JvmOperation>() {
            public void apply(final JvmOperation it) {
              EList<JvmFormalParameter> _parameters = subProgram.getParameters();
              for (final JvmFormalParameter subParameter : _parameters) {
                EList<JvmFormalParameter> _parameters_1 = it.getParameters();
                String _name = subParameter.getName();
                JvmTypeReference _parameterType = subParameter.getParameterType();
                JvmFormalParameter _parameter = TortoiseShellJvmModelInferrer.this._jvmTypesBuilder.toParameter(subParameter, _name, _parameterType);
                TortoiseShellJvmModelInferrer.this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters_1, _parameter);
              }
              XBlockExpression _body = subProgram.getBody();
              TortoiseShellJvmModelInferrer.this._jvmTypesBuilder.setBody(it, _body);
            }
          };
          JvmOperation _method_1 = TortoiseShellJvmModelInferrer.this._jvmTypesBuilder.toMethod(subProgram, _name, _elvis, _function_1);
          TortoiseShellJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members_1, _method_1);
View Full Code Here

Examples of org.eclipse.xtext.xbase.XBlockExpression

                Object _get = argumentValues.get(index);
                context.newValue(_create_1, _get);
                index = (index + 1);
              }
            }
            XBlockExpression _body = ((Executable)executable).getBody();
            final IEvaluationResult result = this.evaluate(_body, context, CancelIndicator.NullImpl);
            Throwable _exception = result.getException();
            boolean _notEquals = (!Objects.equal(_exception, null));
            if (_notEquals) {
              throw result.getException();
View Full Code Here

Examples of org.eclipse.xtext.xbase.XBlockExpression

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetBody(XBlockExpression newBody, NotificationChain msgs)
  {
    XBlockExpression oldBody = body;
    body = newBody;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TemplatePackage.TEMPLATE_FILE__BODY, oldBody, newBody);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of org.eclipse.xtext.xbase.XBlockExpression

        EList<JvmMember> _members = it.getMembers();
        JvmTypeReference _newTypeRef = TemplateJvmModelInferrer.this._jvmTypesBuilder.newTypeRef(element, CharSequence.class);
        final Procedure1<JvmOperation> _function = new Procedure1<JvmOperation>() {
          public void apply(final JvmOperation it) {
            it.setVisibility(JvmVisibility.PRIVATE);
            XBlockExpression _body = element.getBody();
            TemplateJvmModelInferrer.this._jvmTypesBuilder.setBody(it, _body);
          }
        };
        JvmOperation _method = TemplateJvmModelInferrer.this._jvmTypesBuilder.toMethod(element, "generate", _newTypeRef, _function);
        TemplateJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
View Full Code Here

Examples of org.eclipse.xtext.xbase.XBlockExpression

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetBody(XBlockExpression newBody, NotificationChain msgs)
  {
    XBlockExpression oldBody = body;
    body = newBody;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TortoiseShellPackage.EXECUTABLE__BODY, oldBody, newBody);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of org.eclipse.xtext.xbase.XBlockExpression

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetBody(XBlockExpression newBody, NotificationChain msgs)
  {
    XBlockExpression oldBody = body;
    body = newBody;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModelQueryLanguagePackage.MODEL__BODY, oldBody, newBody);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of org.eclipse.xtext.xbase.XBlockExpression

          ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.<JvmField>operator_add(_members_2, _field_2);
          EList<JvmMember> _members_3 = it.getMembers();
          JvmTypeReference _typeForName_3 = ModelQueryLanguageJvmModelInferrer.this._typeReferences.getTypeForName(Void.TYPE, model);
          final Procedure1<JvmOperation> _function = new Procedure1<JvmOperation>() {
              public void apply(final JvmOperation it) {
                XBlockExpression _body = model.getBody();
                ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.setBody(it, _body);
                EList<JvmTypeReference> _exceptions = it.getExceptions();
                JvmTypeReference _typeForName = ModelQueryLanguageJvmModelInferrer.this._typeReferences.getTypeForName(Exception.class, model);
                ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.<JvmTypeReference>operator_add(_exceptions, _typeForName);
              }
View Full Code Here

Examples of org.eclipse.xtext.xbase.XBlockExpression

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetTest(XBlockExpression newTest, NotificationChain msgs)
  {
    XBlockExpression oldTest = test;
    test = newTest;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JexTestPackage.STATE_FUNCTION__TEST, oldTest, newTest);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of org.eclipse.xtext.xbase.XBlockExpression

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetTest(XBlockExpression newTest, NotificationChain msgs)
  {
    XBlockExpression oldTest = test;
    test = newTest;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JexTestPackage.PROPERTIES_TEST_OWNER__TEST, oldTest, newTest);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of org.eclipse.xtext.xbase.XBlockExpression

                JexTestJvmModelInferrer.this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters, _parameter);
                EList<Parameter> _parameters_1 = stateFunction.getParameters();
                JexTestJvmModelInferrer.this.initParameters(it, _parameters_1);
                final Procedure1<ITreeAppendable> _function = new Procedure1<ITreeAppendable>() {
                  public void apply(final ITreeAppendable it) {
                    XBlockExpression _test = stateFunction.getTest();
                    JexTestJvmModelInferrer.this.generateTestHelperMethodCall("_test_", ((PropertiesTest) _test), it);
                  }
                };
                JexTestJvmModelInferrer.this._jvmTypesBuilder.setBody(it, _function);
              }
            };
            final JvmOperation stateMethod = JexTestJvmModelInferrer.this._jvmTypesBuilder.toMethod(stateFunction, _name_1, _newTypeRef_1, _function_2);
            EList<JvmMember> _members_2 = it.getMembers();
            JexTestJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members_2, stateMethod);
            XBlockExpression _test = stateFunction.getTest();
            boolean _notEquals_1 = (!Objects.equal(_test, null));
            if (_notEquals_1) {
              XBlockExpression _test_1 = stateFunction.getTest();
              JexTestJvmModelInferrer.this.inferPropertiesTestMethods(((PropertiesTest) _test_1), jvmClass);
            }
          }
        }
        final ArrayList<Pair<JexTestSequence,JvmOperation>> testMethods = CollectionLiterals.<Pair<JexTestSequence,JvmOperation>>newArrayList();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.