Java Code Examples for org.eclipse.emf.ecore.EPackage.setName()

The following are Jave code examples for showing how to use setName() of the org.eclipse.emf.ecore.EPackage class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: n4js   File: EcoreUtilN4Test.java   Source Code and License Vote up 5 votes
private EPackage epack(String n, EObject... contents) {
	EPackage p = EcoreFactory.eINSTANCE.createEPackage();
	p.setName(n);

	for (EObject eobj : contents) {
		if (eobj instanceof EPackage) {
			p.getESubpackages().add((EPackage) eobj);
		} else {
			p.getEClassifiers().add((EClassifier) eobj);
		}
	}

	return p;
}