當前位置: 首頁>>代碼示例>>Java>>正文


Java EObject.eContents方法代碼示例

本文整理匯總了Java中org.eclipse.emf.ecore.EObject.eContents方法的典型用法代碼示例。如果您正苦於以下問題:Java EObject.eContents方法的具體用法?Java EObject.eContents怎麽用?Java EObject.eContents使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.emf.ecore.EObject的用法示例。


在下文中一共展示了EObject.eContents方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: merge

import org.eclipse.emf.ecore.EObject; //導入方法依賴的package包/類
private void merge(final EObject extension, final EObject extendsEObject, final Map<String, EObject> idToEObject) {
    mergeAttributes(extension, extendsEObject);
    mergeCrossReferences(extension, extendsEObject, idToEObject);
    for (final EObject extensionChild : extension.eContents()) {
        final String uriFragment = uriFragmentBuilder.getURIFragment(extensionChild);
        if (idToEObject.containsKey(uriFragment)) {
            final EObject extendsChild = idToEObject.get(uriFragment);
            merge(extensionChild, extendsChild, idToEObject);
        } else {
            final EObject copy = copy(extensionChild);
            final EReference containmentFeature = extensionChild.eContainmentFeature();
            if (containmentFeature.isMany()) {
                final List<EObject> containment = (List<EObject>) extendsEObject.eGet(containmentFeature);
                containment.add(copy);
            } else {
                extendsEObject.eSet(containmentFeature, copy);
            }
        }
    }
}
 
開發者ID:vrapio,項目名稱:rest-modeling-framework,代碼行數:21,代碼來源:RamlModelBuilder.java

示例2: proxifyASTReferences

import org.eclipse.emf.ecore.EObject; //導入方法依賴的package包/類
private void proxifyASTReferences(EObject object) {
	if (object instanceof SyntaxRelatedTElement) {
		SyntaxRelatedTElement element = (SyntaxRelatedTElement) object;
		EObject astElement = element.getAstElement();
		if (astElement != null && !astElement.eIsProxy()) {
			InternalEObject proxy = (InternalEObject) EcoreUtil.create(astElement.eClass());
			proxy.eSetProxyURI(EcoreUtil.getURI(astElement));
			element.setAstElement(proxy);
		}
	}

	for (EObject child : object.eContents()) {
		proxifyASTReferences(child);
	}
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:16,代碼來源:N4JSResource.java

示例3: recursiveGetEClasses

import org.eclipse.emf.ecore.EObject; //導入方法依賴的package包/類
private static void recursiveGetEClasses(final EObject object, final List<EClass> classes) {
  for (final EObject eObject : object.eContents()) {
    if (eObject instanceof EClass) {
      classes.add((EClass) eObject);
    } else if (eObject instanceof EPackage) {
      EcoreUtilities.recursiveGetEClasses(eObject, classes);
    }
  }
}
 
開發者ID:ModelWriter,項目名稱:Tarski,代碼行數:10,代碼來源:EcoreUtilities.java

示例4: defaultCase

import org.eclipse.emf.ecore.EObject; //導入方法依賴的package包/類
@Override
public List<EObject> defaultCase(EObject feature) {
	return feature.eContents();
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:5,代碼來源:OrderedEContentProvider.java

示例5: findAllEObjects

import org.eclipse.emf.ecore.EObject; //導入方法依賴的package包/類
private void findAllEObjects(List<EObject> allEObjects, EObject root) {
  allEObjects.add(root);
  for (EObject object : root.eContents()) {
    findAllEObjects(allEObjects, object);
  }
}
 
開發者ID:ModelWriter,項目名稱:Tarski,代碼行數:7,代碼來源:AutomatedTraceCreator.java


注:本文中的org.eclipse.emf.ecore.EObject.eContents方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。