Java Code Examples for org.eclipse.emf.ecore.util.BasicInternalEList

The following are top voted examples for showing how to use org.eclipse.emf.ecore.util.BasicInternalEList. These examples are extracted from open source projects. You can vote up the examples you like and your votes will be used in our system to generate more good examples.
Example 1
Project: turnus   File: NetworkImpl.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated NOT
 */
public List<SharedVariable> getSharedVariables(String tag) {
	List<SharedVariable> sharedVars = new BasicInternalEList<SharedVariable>(
			SharedVariable.class);
	for (SharedVariable variable : getSharedVariables()) {
		if (tag.equals(variable.getTag()))
			sharedVars.add(variable);
	}
	return sharedVars;
}
 
Example 2
Project: statecharts   File: StateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated NOT
 */
public EList<Reaction> getReactions() {
	EList<Reaction> result = new BasicInternalEList<Reaction>(
			Reaction.class);
	result.addAll(getOutgoingTransitions());
	result.addAll(getLocalReactions());
	return result;
}
 
Example 3
Project: statecharts   File: StateImpl.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated NOT
 */
public EList<Reaction> getLocalReactions() {
	EList<Reaction> result = new BasicInternalEList<Reaction>(
			Reaction.class);
	EList<Scope> scopes = getScopes();
	for (Scope scope : scopes) {
		result.addAll(scope.getReactions());
	}
	return result;
}
 
Example 4
Project: statecharts   File: StatechartImpl.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated NOT
 */
public EList<Reaction> getReactions() {
	EList<Reaction> result = new BasicInternalEList<Reaction>(
			Reaction.class);
	result.addAll(getLocalReactions());
	return result;
}
 
Example 5
Project: statecharts   File: StatechartImpl.java   Source Code and License 5 votes vote down vote up
/**
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * 
 * @generated NOT
 */
public EList<Reaction> getLocalReactions() {
	EList<Reaction> result = new BasicInternalEList<Reaction>(
			Reaction.class);
	EList<Scope> scopes = getScopes();
	for (Scope scope : scopes) {
			result.addAll(scope.getReactions());
	}
	return result;
}
 
Example 6
Project: DarwinSPL   File: HyexpressionCopiedEObjectInternalEList.java   Source Code and License 4 votes vote down vote up
public HyexpressionCopiedEObjectInternalEList(InternalEList<EObject> original) {
	super(original);
	this.original = original;
	this.copy = new BasicInternalEList<EObject>(EObject.class);
	this.copy.addAll(this.original);
}
 
Example 7
Project: DarwinSPL   File: HymanifestCopiedEObjectInternalEList.java   Source Code and License 4 votes vote down vote up
public HymanifestCopiedEObjectInternalEList(InternalEList<EObject> original) {
	super(original);
	this.original = original;
	this.copy = new BasicInternalEList<EObject>(EObject.class);
	this.copy.addAll(this.original);
}
 
Example 8
Project: DarwinSPL   File: HymappingCopiedEObjectInternalEList.java   Source Code and License 4 votes vote down vote up
public HymappingCopiedEObjectInternalEList(InternalEList<EObject> original) {
	super(original);
	this.original = original;
	this.copy = new BasicInternalEList<EObject>(EObject.class);
	this.copy.addAll(this.original);
}
 
Example 9
Project: DarwinSPL   File: HyconstraintsCopiedEObjectInternalEList.java   Source Code and License 4 votes vote down vote up
public HyconstraintsCopiedEObjectInternalEList(InternalEList<EObject> original) {
	super(original);
	this.original = original;
	this.copy = new BasicInternalEList<EObject>(EObject.class);
	this.copy.addAll(this.original);
}
 
Example 10
Project: DarwinSPL   File: HyvalidityformulaCopiedEObjectInternalEList.java   Source Code and License 4 votes vote down vote up
public HyvalidityformulaCopiedEObjectInternalEList(InternalEList<EObject> original) {
	super(original);
	this.original = original;
	this.copy = new BasicInternalEList<EObject>(EObject.class);
	this.copy.addAll(this.original);
}
 
Example 11
Project: DarwinSPL   File: HydatavalueCopiedEObjectInternalEList.java   Source Code and License 4 votes vote down vote up
public HydatavalueCopiedEObjectInternalEList(InternalEList<EObject> original) {
	super(original);
	this.original = original;
	this.copy = new BasicInternalEList<EObject>(EObject.class);
	this.copy.addAll(this.original);
}
 
Example 12
Project: DarwinSPL   File: DwprofileCopiedEObjectInternalEList.java   Source Code and License 4 votes vote down vote up
public DwprofileCopiedEObjectInternalEList(InternalEList<EObject> original) {
	super(original);
	this.original = original;
	this.copy = new BasicInternalEList<EObject>(EObject.class);
	this.copy.addAll(this.original);
}
 
Example 13
Project: fixflow   File: Bpmn2OppositeReferenceAdapter.java   Source Code and License 4 votes vote down vote up
/**
 * Returns a list that holds the opposite elements of the given reference for the given owner.
 * The opposite elements are those of type E that have the reference to owner.
 * 
 * The collection corresponding to opposite in the following picture is returned,
 * for given owner and reference.
 * <pre>
 *    <b>opposite</b>            reference
 *  E ----------------------------- owner
 *  </pre>
 *  
 *  reference has to be a key of the map observedRefToOpposite.
 * @param <E>
 * @param <E> The type of the elements in the collection.
 * @param dataClass The class of the elements in the collection.
 * @param owner The object whose list is retrieved.
 * @param reference The reference whose opposite reference is retrieved.
 * @return The opposite of reference for owner.
 */
public <E> List<E> getOppositeList(Class<E> dataClass, InternalEObject owner,
        EReference reference) {
    EReference opposite = observedRefToOpposite.get(reference);
    if (opposite == null)
        throw new IllegalArgumentException("This reference is not observed by this adapter: "
                + reference.toString());

    List<E> result = new BasicInternalEList<E>(dataClass);

    for (Setting cur : getNonNavigableInverseReferences(owner, false)) {
        if (cur.getEStructuralFeature().equals(reference))
            result.add(dataClass.cast(cur.getEObject()));
    }

    return result;
}