Search in sources :

Example 11 with TasksGroup

use of org.obeonetwork.graal.TasksGroup in project InformationSystem by ObeoNetwork.

the class TaskImpl method getReferencedBy.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated NOT
 */
public EList<TaskReference> getReferencedBy() {
    Collection<Setting> referencingTasksReferences = new GraalUsageCrossReferencer() {

        @Override
        protected boolean crossReference(EObject eObject, EReference eReference, EObject crossReferencedEObject) {
            return eReference == GraalPackage.Literals.TASK_REFERENCE__TASK;
        }

        @Override
        protected boolean containment(EObject eObject) {
            // (We use Resource instead of CDOResource to avoid dependency on CDO)
            return (eObject instanceof Resource) || (eObject instanceof System) || (eObject instanceof TasksGroup) || (eObject instanceof Task) || (eObject instanceof Loop) || (eObject instanceof TaskReference);
        }
    }.findUsage(this);
    List<TaskReference> foundTasksReferences = new ArrayList<TaskReference>();
    for (Setting setting : referencingTasksReferences) {
        foundTasksReferences.add((TaskReference) setting.getEObject());
    }
    return ECollections.unmodifiableEList(new BasicEList<TaskReference>(foundTasksReferences));
}
Also used : Loop(org.obeonetwork.graal.Loop) AbstractTask(org.obeonetwork.graal.AbstractTask) Task(org.obeonetwork.graal.Task) Setting(org.eclipse.emf.ecore.EStructuralFeature.Setting) GraalUsageCrossReferencer(org.obeonetwork.graal.util.GraalUsageCrossReferencer) Resource(org.eclipse.emf.ecore.resource.Resource) ArrayList(java.util.ArrayList) System(org.obeonetwork.graal.System) TaskReference(org.obeonetwork.graal.TaskReference) TasksGroup(org.obeonetwork.graal.TasksGroup) EObject(org.eclipse.emf.ecore.EObject) EReference(org.eclipse.emf.ecore.EReference)

Aggregations

TasksGroup (org.obeonetwork.graal.TasksGroup)11 AbstractTask (org.obeonetwork.graal.AbstractTask)9 Task (org.obeonetwork.graal.Task)7 ArrayList (java.util.ArrayList)5 System (org.obeonetwork.graal.System)3 EObject (org.eclipse.emf.ecore.EObject)2 EReference (org.eclipse.emf.ecore.EReference)2 Setting (org.eclipse.emf.ecore.EStructuralFeature.Setting)2 Resource (org.eclipse.emf.ecore.resource.Resource)2 TasksContainer (org.obeonetwork.graal.TasksContainer)2 GraalUsageCrossReferencer (org.obeonetwork.graal.util.GraalUsageCrossReferencer)2 Date (java.util.Date)1 LinkedHashSet (java.util.LinkedHashSet)1 Set (java.util.Set)1 InputDialog (org.eclipse.jface.dialogs.InputDialog)1 Session (org.eclipse.sirius.business.api.session.Session)1 ModelAccessor (org.eclipse.sirius.ecore.extender.business.api.accessor.ModelAccessor)1 Test (org.junit.Test)1 Actor (org.obeonetwork.graal.Actor)1 Loop (org.obeonetwork.graal.Loop)1