Skip to content

Instantly share code, notes, and snippets.

@edipofederle
Created February 6, 2013 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save edipofederle/4725346 to your computer and use it in GitHub Desktop.
Save edipofederle/4725346 to your computer and use it in GitHub Desktop.
public org.eclipse.uml2.uml.Package load(URI uri, String pathAbsolute) {
org.eclipse.uml2.uml.Package package_ = null;
if (!"".equals(pathAbsolute))
getResources().getResource(URI.createFileURI(pathAbsolute), true);
try {
Resource resource = getResources().getResource(uri, true);
package_ = (org.eclipse.uml2.uml.Package) EcoreUtil
.getObjectByType(resource.getContents(),
UMLPackage.Literals.PACKAGE);
} catch (WrappedException we) {
err(we.getMessage());
}
return package_;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment