Loading a Profile [message #626050] |
Mon, 18 February 2008 20:02 |
Eclipse User |
|
|
|
Originally posted by: flavio.p.duarte.gmail.com
Hi,
I am trying to load a standard profile into my model, but although I am
being able to get the resource (resourceSet.getResource) I can not get the
profile out of it (EcoreUtil.getObjectByType); it returns null.
Since the profile I am reading was created using UML 2.0, I believe the
migration rules don't apply, am I right ? Assuming the previous assertion
is true, the code to read the profile should be similiar to the one in the
document "Introduction to UML2 Profiles", which is my case. My code is:
URI uri =
URI.createURI(" file:/C:\\UML_Profile_for_Schedulabilty,_Performance_and_Tim e_Specification.profile.uml ");
Resource res = RESOURCE_SET.getResource(uri, true);
prof=(org.eclipse.uml2.uml.Profile) EcoreUtil.getObjectByType(
res.getContents(), UMLPackage.Literals.PACKAGE);
The profile that I am trying to read is Standard Profile for
Schedulability, Performance and Time Specification and it was created by
OMG.
Any ideas ?
-Flávio
|
|
|
Powered by
FUDForum. Page generated in 0.03259 seconds