Search in sources :

Example 1 with ScreenKind

use of org.applause.lang.applauseDsl.ScreenKind in project applause by applause.

the class ScreenCompiler method doGenerate.

public void doGenerate(final Resource resource, final IFileSystemAccess fsa) {
    TreeIterator<EObject> _allContents = resource.getAllContents();
    Iterable<EObject> _iterable = IteratorExtensions.<EObject>toIterable(_allContents);
    Iterable<Screen> _filter = Iterables.<Screen>filter(_iterable, Screen.class);
    final Procedure1<Screen> _function = new Procedure1<Screen>() {

        public void apply(final Screen it) {
            ScreenKind _kind = it.getKind();
            final ScreenKind getKind = _kind;
            boolean _matched = false;
            if (!_matched) {
                if (Objects.equal(getKind, ScreenKind.DEFAULT_LIST)) {
                    _matched = true;
                    ScreenCompiler.this.defaultListScreenCompiler.doGenerate(it, fsa);
                }
            }
            if (!_matched) {
                if (Objects.equal(getKind, ScreenKind.DEFAULT_DETAILS)) {
                    _matched = true;
                    ScreenCompiler.this.defaultDetailsScreenCompiler.doGenerate(it, fsa);
                }
            }
        }
    };
    IterableExtensions.<Screen>forEach(_filter, _function);
}
Also used : Screen(org.applause.lang.applauseDsl.Screen) EObject(org.eclipse.emf.ecore.EObject) Procedure1(org.eclipse.xtext.xbase.lib.Procedures.Procedure1) ScreenKind(org.applause.lang.applauseDsl.ScreenKind)

Example 2 with ScreenKind

use of org.applause.lang.applauseDsl.ScreenKind in project applause by applause.

the class ScreenImpl method setKind.

/**
   * <!-- begin-user-doc -->
   * <!-- end-user-doc -->
   * @generated
   */
public void setKind(ScreenKind newKind) {
    ScreenKind oldKind = kind;
    kind = newKind == null ? KIND_EDEFAULT : newKind;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.SCREEN__KIND, oldKind, kind));
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) ScreenKind(org.applause.lang.applauseDsl.ScreenKind)

Aggregations

ScreenKind (org.applause.lang.applauseDsl.ScreenKind)2 Screen (org.applause.lang.applauseDsl.Screen)1 EObject (org.eclipse.emf.ecore.EObject)1 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 Procedure1 (org.eclipse.xtext.xbase.lib.Procedures.Procedure1)1