Search in sources :

Example 1 with DomainElement

use of org.yakindu.base.base.DomainElement in project statecharts by Yakindu.

the class StatechartDiagramEditor method getDomainStatus.

protected DomainStatus getDomainStatus() {
    EObject element = getDiagram().getElement();
    DomainElement domainElement = EcoreUtil2.getContainerOfType(element, DomainElement.class);
    if (domainElement != null) {
        DomainStatus domainStatus = DomainRegistry.getDomainStatus(domainElement.getDomainID());
        return domainStatus;
    }
    return null;
}
Also used : EObject(org.eclipse.emf.ecore.EObject) DomainElement(org.yakindu.base.base.DomainElement) DomainStatus(org.yakindu.sct.domain.extension.DomainStatus)

Example 2 with DomainElement

use of org.yakindu.base.base.DomainElement in project statecharts by Yakindu.

the class DomainRegistry method getDomain.

public static IDomain getDomain(EObject object) {
    DomainElement domainElement = EcoreUtil2.getContainerOfType(object, DomainElement.class);
    String domainID = domainElement != null ? domainElement.getDomainID() : BasePackage.Literals.DOMAIN_ELEMENT__DOMAIN_ID.getDefaultValueLiteral();
    return getDomain(domainID);
}
Also used : DomainElement(org.yakindu.base.base.DomainElement)

Aggregations

DomainElement (org.yakindu.base.base.DomainElement)2 EObject (org.eclipse.emf.ecore.EObject)1 DomainStatus (org.yakindu.sct.domain.extension.DomainStatus)1