Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Continuing saga of the standalone app
Continuing saga of the standalone app [message #626808] Thu, 17 July 2008 20:14
Eclipse UserFriend
Originally posted by:

It is possible to find on this list a working code snippet showing how to
get an org.eclipse.uml2.uml.Package from a .uml file, in a standalone app.

My problem occurs when that Package has an imported package that has a
"pathmap" URL.

I think what I should do is map the pathmap URL to the actual URL, like
Map<URI, URI> uriMap = RESOURCE_SET.getURIConverter().getURIMap();

URI pathmap =

URI types = URI.createFileURI(new File(typesFilename).getAbsolutePath());

uriMap.put(pathmap, types);

But when I try to get the imported stuff, like this:
EList<Package> importList = model.getImportedPackages();

I get an exception:
org.eclipse.emf.ecore.xml.type.impl.AnyTypeImpl cannot be cast to
org.eclipse.uml2.uml.internal.impl.PackageImportImpl.getImpo rtedPackage(

org.eclipse.uml2.uml.internal.operations.NamespaceOperations .getImportedPackages(

org.eclipse.uml2.uml.internal.impl.NamespaceImpl.getImported Packages(

(Similarly if I try to use EcoreUtil.resolveAll(resource); ). It looks like
it doesn't know that the imported package is UML.

Any help on this? Thanks.
Previous Topic:Code assist for uml2 packages doesn't work
Next Topic:Code generator problem with redefinitions
Goto Forum:

Current Time: Wed Nov 29 14:37:23 GMT 2023

Powered by FUDForum. Page generated in 0.02171 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top