Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Applying UML Profile Programmatically(Profile defined with UML2Tools and registered with org.eclipse.uml2.uml.generated_package extension point)
Applying UML Profile Programmatically [message #541252] Fri, 18 June 2010 22:51 Go to next message
Raphael  is currently offline Raphael Friend
Messages: 8
Registered: June 2010
Junior Member
hi everybody.

i'm developing an eclipse plugin and i'm trying to apply an alread defined profile to a use case model, but i don't know how to work.

According to duction_to_UML2_Profiles/article.html I could load the package with something like the code below:

org.eclipse.uml2.uml.Package package_ = null;
try {
Resource resource = RESOURCE_SET.getResource(uri, true);

package_ = (org.eclipse.uml2.uml.Package) EcoreUtil

resource.getContents(), UMLPackage.Literals.PACKAGE);

But, i am not understanding how to get Resource from ResourceSet. In the tutorial an instance of ResourceSet is created. I have created the profile with uml2tools and registered it in org.eclipse.uml2.uml.generated_package extension. So, how can I load an already defined Resource? I need to register it to ResourceSet object or is there another option?

thans in advance.
Re: Applying UML Profile Programmatically [message #541407 is a reply to message #541252] Mon, 21 June 2010 02:07 Go to previous message
Rafael Chaves is currently offline Rafael ChavesFriend
Messages: 161
Registered: July 2009
Senior Member

This article has a section on loading/saving EMF-based models (such as UML2 models): e.emf.doc/references/overview/EMF.html


Previous Topic:slot defining feature
Next Topic:Applying UML Profile Programmatically
Goto Forum:

Current Time: Mon May 21 09:03:07 GMT 2018

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

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

Back to the top