use of org.obeonetwork.graal.util.GraalUsageCrossReferencer in project InformationSystem by ObeoNetwork.
the class TaskImpl method getUsedBy.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public EList<Task> getUsedBy() {
Collection<Setting> usingTasksSettings = new GraalUsageCrossReferencer() {
@Override
protected boolean crossReference(EObject eObject, EReference eReference, EObject crossReferencedEObject) {
return eReference == GraalPackage.Literals.TASK__USES;
}
@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);
}
}.findUsage(this);
List<Task> foundTasks = new ArrayList<Task>();
for (Setting setting : usingTasksSettings) {
foundTasks.add((Task) setting.getEObject());
}
return ECollections.unmodifiableEList(new BasicEList<Task>(foundTasks));
}
use of org.obeonetwork.graal.util.GraalUsageCrossReferencer in project InformationSystem by ObeoNetwork.
the class AbstractTaskImpl method getUseCase.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public UseCase getUseCase() {
Collection<Setting> useCaseReferences = new GraalUsageCrossReferencer() {
@Override
protected boolean crossReference(EObject eObject, EReference eReference, EObject crossReferencedEObject) {
return eReference == GraalPackage.Literals.USE_CASE__TASKS;
}
@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 UseCase);
}
}.findUsage(this);
UseCase useCase = null;
for (Setting setting : useCaseReferences) {
useCase = (UseCase) setting.getEObject();
break;
}
return useCase;
}
use of org.obeonetwork.graal.util.GraalUsageCrossReferencer 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));
}
use of org.obeonetwork.graal.util.GraalUsageCrossReferencer in project InformationSystem by ObeoNetwork.
the class TaskImpl method getUseCase.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public UseCase getUseCase() {
Collection<Setting> useCaseReferences = new GraalUsageCrossReferencer() {
@Override
protected boolean crossReference(EObject eObject, EReference eReference, EObject crossReferencedEObject) {
return eReference == GraalPackage.Literals.USE_CASE__TASKS;
}
@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 UseCase);
}
}.findUsage(this);
UseCase useCase = null;
for (Setting setting : useCaseReferences) {
useCase = (UseCase) setting.getEObject();
break;
}
return useCase;
}
Aggregations