Search in sources :

Example 1 with Type

use of org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Type in project xtext-core by eclipse.

the class OperationImpl method basicSetReturnType.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetReturnType(Type newReturnType, NotificationChain msgs) {
    Type oldReturnType = returnType;
    returnType = newReturnType;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TestLanguagePackage.OPERATION__RETURN_TYPE, oldReturnType, newReturnType);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : Type(org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Type) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 2 with Type

use of org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Type in project xtext-core by eclipse.

the class SignatureHelpServiceImpl method _getLabel.

private String _getLabel(final Operation it) {
    StringConcatenation _builder = new StringConcatenation();
    String _name = EcoreUtil2.<TypeDeclaration>getContainerOfType(it, TypeDeclaration.class).getName();
    _builder.append(_name);
    _builder.append(".");
    String _name_1 = it.getName();
    _builder.append(_name_1);
    _builder.append("(");
    {
        EList<Parameter> _params = it.getParams();
        boolean _hasElements = false;
        for (final Parameter p : _params) {
            if (!_hasElements) {
                _hasElements = true;
            } else {
                _builder.appendImmediate(", ", "");
            }
            String _name_2 = p.getName();
            _builder.append(_name_2);
            _builder.append(": ");
            String _label = this.getLabel(p.getType());
            _builder.append(_label);
        }
    }
    _builder.append("): ");
    {
        Type _returnType = it.getReturnType();
        boolean _tripleEquals = (_returnType == null);
        if (_tripleEquals) {
            _builder.append("void");
        } else {
            String _label_1 = this.getLabel(it.getReturnType());
            _builder.append(_label_1);
        }
    }
    return _builder.toString();
}
Also used : Type(org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Type) PrimitiveType(org.eclipse.xtext.ide.tests.testlanguage.testLanguage.PrimitiveType) EList(org.eclipse.emf.common.util.EList) StringConcatenation(org.eclipse.xtend2.lib.StringConcatenation) Parameter(org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Parameter) TypeDeclaration(org.eclipse.xtext.ide.tests.testlanguage.testLanguage.TypeDeclaration)

Example 3 with Type

use of org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Type in project xtext-core by eclipse.

the class ParameterImpl method basicSetType.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetType(Type newType, NotificationChain msgs) {
    Type oldType = type;
    type = newType;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TestLanguagePackage.PARAMETER__TYPE, oldType, newType);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : Type(org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Type) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 4 with Type

use of org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Type in project xtext-core by eclipse.

the class PropertyImpl method basicSetType.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetType(Type newType, NotificationChain msgs) {
    Type oldType = type;
    type = newType;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TestLanguagePackage.PROPERTY__TYPE, oldType, newType);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : Type(org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Type) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Aggregations

Type (org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Type)4 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)3 EList (org.eclipse.emf.common.util.EList)1 StringConcatenation (org.eclipse.xtend2.lib.StringConcatenation)1 Parameter (org.eclipse.xtext.ide.tests.testlanguage.testLanguage.Parameter)1 PrimitiveType (org.eclipse.xtext.ide.tests.testlanguage.testLanguage.PrimitiveType)1 TypeDeclaration (org.eclipse.xtext.ide.tests.testlanguage.testLanguage.TypeDeclaration)1