Search in sources :

Example 1 with URLVersionSpecifier

use of org.eclipse.n4js.semver.Semver.URLVersionSpecifier in project n4js by eclipse.

the class URLVersionRequirementImpl method getSimpleVersion.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public SimpleVersion getSimpleVersion() {
    URLVersionSpecifier _versionSpecifier = this.getVersionSpecifier();
    if ((_versionSpecifier instanceof URLSemver)) {
        URLVersionSpecifier _versionSpecifier_1 = this.getVersionSpecifier();
        final URLSemver urlSemver = ((URLSemver) _versionSpecifier_1);
        return urlSemver.getSimpleVersion();
    }
    return null;
}
Also used : URLSemver(org.eclipse.n4js.semver.Semver.URLSemver) URLVersionSpecifier(org.eclipse.n4js.semver.Semver.URLVersionSpecifier)

Example 2 with URLVersionSpecifier

use of org.eclipse.n4js.semver.Semver.URLVersionSpecifier in project n4js by eclipse.

the class URLVersionRequirementImpl method basicSetVersionSpecifier.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public NotificationChain basicSetVersionSpecifier(URLVersionSpecifier newVersionSpecifier, NotificationChain msgs) {
    URLVersionSpecifier oldVersionSpecifier = versionSpecifier;
    versionSpecifier = newVersionSpecifier;
    if (eNotificationRequired()) {
        ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, SemverPackage.URL_VERSION_REQUIREMENT__VERSION_SPECIFIER, oldVersionSpecifier, newVersionSpecifier);
        if (msgs == null)
            msgs = notification;
        else
            msgs.add(notification);
    }
    return msgs;
}
Also used : URLVersionSpecifier(org.eclipse.n4js.semver.Semver.URLVersionSpecifier) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Aggregations

URLVersionSpecifier (org.eclipse.n4js.semver.Semver.URLVersionSpecifier)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 URLSemver (org.eclipse.n4js.semver.Semver.URLSemver)1