Search in sources :

Example 6 with WSMenuE

use of org.talend.mdm.repository.model.mdmserverobject.WSMenuE in project tmdm-studio-se by Talend.

the class WSMenuItemImpl method getWsMenu.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public WSMenuE getWsMenu() {
    if (wsMenu != null && wsMenu.eIsProxy()) {
        InternalEObject oldWsMenu = (InternalEObject) wsMenu;
        wsMenu = (WSMenuE) eResolveProxy(oldWsMenu);
        if (wsMenu.eResource() == null && eResource() != null) {
            URI uri = EcoreUtil.getURI(wsMenu);
            if (uri.hasFragment()) {
                uri = uri.trimFragment();
            }
            Resource resource = eResource().getResourceSet().getResource(uri, true);
            for (EObject object : resource.getContents()) {
                if (object instanceof WSMenuE) {
                    wsMenu = (WSMenuE) object;
                    break;
                }
            }
        }
        if (wsMenu != oldWsMenu) {
            if (eNotificationRequired()) {
                eNotify(new ENotificationImpl(this, Notification.RESOLVE, MdmpropertiesPackage.WS_MENU_ITEM__WS_MENU, oldWsMenu, wsMenu));
            }
        }
    }
    return wsMenu;
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) EObject(org.eclipse.emf.ecore.EObject) InternalEObject(org.eclipse.emf.ecore.InternalEObject) WSMenuE(org.talend.mdm.repository.model.mdmserverobject.WSMenuE) Resource(org.eclipse.emf.ecore.resource.Resource) URI(org.eclipse.emf.common.util.URI) InternalEObject(org.eclipse.emf.ecore.InternalEObject)

Aggregations

WSMenuE (org.talend.mdm.repository.model.mdmserverobject.WSMenuE)6 WSMenuEntryE (org.talend.mdm.repository.model.mdmserverobject.WSMenuEntryE)3 WSMenu (com.amalto.workbench.webservices.WSMenu)2 WSMenuEntry (com.amalto.workbench.webservices.WSMenuEntry)2 EObject (org.eclipse.emf.ecore.EObject)2 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)2 Test (org.junit.Test)2 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)2 URI (org.eclipse.emf.common.util.URI)1 InternalEObject (org.eclipse.emf.ecore.InternalEObject)1 Resource (org.eclipse.emf.ecore.resource.Resource)1 ItemState (org.talend.core.model.properties.ItemState)1 WSMenuItem (org.talend.mdm.repository.model.mdmproperties.WSMenuItem)1 WSMenuMenuEntriesDescriptionsE (org.talend.mdm.repository.model.mdmserverobject.WSMenuMenuEntriesDescriptionsE)1