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

The following are Jave code examples for showing how to use setNsURI() 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.
+ Save this method
Example 1
Project: JavaGraph   File: EcoreToType.java   View Source Code Vote up 5 votes
private void visitPackage(EPackage ePackage) {
    //required for namespace lookups when importing instance model
    String nsURI = ePackage.getNsURI();
    if (nsURI == null) {
        nsURI = ePackage.getName();
        ePackage.setNsURI(nsURI);
    }

    // register all packages we find in the ResourceSet
    this.rs.getPackageRegistry()
        .put(ePackage.getNsURI(), ePackage);
}