当前位置: 首页>>代码示例>>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;未经允许,请勿转载。