Search in sources :

Example 1 with Behaviour

use of org.obeonetwork.dsl.environment.Behaviour in project InformationSystem by ObeoNetwork.

the class InteractionParentSelectionContentProvider method getChildren.

@Override
public Object[] getChildren(Object object) {
    List<Object> result = new ArrayList<Object>();
    Object[] children = super.getChildren(object);
    for (Object child : children) {
        if (child instanceof ObeoDSMObject && !(child instanceof Behaviour)) {
            result.add(child);
        }
    }
    return result.toArray();
}
Also used : Behaviour(org.obeonetwork.dsl.environment.Behaviour) ObeoDSMObject(org.obeonetwork.dsl.environment.ObeoDSMObject) ArrayList(java.util.ArrayList) ObeoDSMObject(org.obeonetwork.dsl.environment.ObeoDSMObject)

Example 2 with Behaviour

use of org.obeonetwork.dsl.environment.Behaviour in project InformationSystem by ObeoNetwork.

the class InteractionParentSelectionContentProvider method getElements.

@Override
public Object[] getElements(Object object) {
    if (object instanceof Object[]) {
        List<Object> elements = new ArrayList<Object>();
        for (Object input : (Object[]) object) {
            elements.addAll(Arrays.asList(getElements(input)));
        }
        return elements.toArray();
    } else {
        List<Object> result = new ArrayList<Object>();
        Object[] elements = super.getElements(object);
        for (Object element : elements) {
            if (element instanceof ObeoDSMObject && !(element instanceof Behaviour)) {
                result.add(element);
            }
        }
        return result.toArray();
    }
}
Also used : Behaviour(org.obeonetwork.dsl.environment.Behaviour) ObeoDSMObject(org.obeonetwork.dsl.environment.ObeoDSMObject) ArrayList(java.util.ArrayList) ObeoDSMObject(org.obeonetwork.dsl.environment.ObeoDSMObject)

Example 3 with Behaviour

use of org.obeonetwork.dsl.environment.Behaviour in project InformationSystem by ObeoNetwork.

the class StateMachineParentSelectionContentProvider method getElements.

@Override
public Object[] getElements(Object object) {
    if (object instanceof Object[]) {
        List<Object> elements = new ArrayList<Object>();
        for (Object input : (Object[]) object) {
            elements.addAll(Arrays.asList(getElements(input)));
        }
        return elements.toArray();
    } else {
        List<Object> result = new ArrayList<Object>();
        Object[] elements = super.getElements(object);
        for (Object element : elements) {
            if (element instanceof ObeoDSMObject && !(element instanceof Behaviour)) {
                result.add(element);
            }
        }
        return result.toArray();
    }
}
Also used : Behaviour(org.obeonetwork.dsl.environment.Behaviour) ObeoDSMObject(org.obeonetwork.dsl.environment.ObeoDSMObject) ArrayList(java.util.ArrayList) ObeoDSMObject(org.obeonetwork.dsl.environment.ObeoDSMObject)

Example 4 with Behaviour

use of org.obeonetwork.dsl.environment.Behaviour in project InformationSystem by ObeoNetwork.

the class StateMachineParentSelectionContentProvider method getChildren.

@Override
public Object[] getChildren(Object object) {
    List<Object> result = new ArrayList<Object>();
    Object[] children = super.getChildren(object);
    for (Object child : children) {
        if (child instanceof ObeoDSMObject && !(child instanceof Behaviour)) {
            result.add(child);
        }
    }
    return result.toArray();
}
Also used : Behaviour(org.obeonetwork.dsl.environment.Behaviour) ObeoDSMObject(org.obeonetwork.dsl.environment.ObeoDSMObject) ArrayList(java.util.ArrayList) ObeoDSMObject(org.obeonetwork.dsl.environment.ObeoDSMObject)

Aggregations

ArrayList (java.util.ArrayList)4 Behaviour (org.obeonetwork.dsl.environment.Behaviour)4 ObeoDSMObject (org.obeonetwork.dsl.environment.ObeoDSMObject)4