Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Stereotype list
Stereotype list [message #471743] Wed, 21 March 2007 05:37 Go to next message
Eclipse User
Originally posted by: ase_80.yahoo.com

I have defined UML profile as "Introduction to UML2 Profiles" article
describes. Now I want read this profile in another place, especially I try
to get defined stereotypes. How this should be done?

I have defined profile package like this:
org.eclipse.uml2.uml.Package profilePackage = null;

And then I have loaded profile into it by using load method defined in
"Getting started with UML2" article:
profilePackage = load(URI.createURI("file:/" + folder + "\\" + name ));

I have tried methods profilePackage.getAppliedStereotypes(),
profilePackage.allOwnedElements() and profilePackage.visibleMembers(). The
first mentioned doesn't return anything and the second return all
elements. Is it possible to get only defined stereotypes and their content?

Antti
Re: Stereotype list [message #471745 is a reply to message #471743] Wed, 21 March 2007 09:53 Go to previous message
james bruck is currently offline james bruck
Messages: 1724
Registered: July 2009
Senior Member
Hi Antti,

You can read in your profile but instead of using type "Package" for your
profilePackage variable use type "Profile". A profile is a package.
Then call Profile#getDefinition() to inspect the EPackage contents or call
Profile#getOwnedStereotypes().

Regards,

- James.

"Antti" <ase_80@yahoo.com> wrote in message
news:120e006e0d3170e06e92b70faaf300be$1@www.eclipse.org...
>
> I have defined UML profile as "Introduction to UML2 Profiles" article
> describes. Now I want read this profile in another place, especially I try
> to get defined stereotypes. How this should be done?
>
> I have defined profile package like this:
> org.eclipse.uml2.uml.Package profilePackage = null;
>
> And then I have loaded profile into it by using load method defined in
> "Getting started with UML2" article:
> profilePackage = load(URI.createURI("file:/" + folder + "\\" + name ));
>
> I have tried methods profilePackage.getAppliedStereotypes(),
> profilePackage.allOwnedElements() and profilePackage.visibleMembers(). The
> first mentioned doesn't return anything and the second return all
> elements. Is it possible to get only defined stereotypes and their
content?
>
> Antti
>
Re: Stereotype list [message #603072 is a reply to message #471743] Wed, 21 March 2007 09:53 Go to previous message
james bruck is currently offline james bruck
Messages: 1724
Registered: July 2009
Senior Member
Hi Antti,

You can read in your profile but instead of using type "Package" for your
profilePackage variable use type "Profile". A profile is a package.
Then call Profile#getDefinition() to inspect the EPackage contents or call
Profile#getOwnedStereotypes().

Regards,

- James.

"Antti" <ase_80@yahoo.com> wrote in message
news:120e006e0d3170e06e92b70faaf300be$1@www.eclipse.org...
>
> I have defined UML profile as "Introduction to UML2 Profiles" article
> describes. Now I want read this profile in another place, especially I try
> to get defined stereotypes. How this should be done?
>
> I have defined profile package like this:
> org.eclipse.uml2.uml.Package profilePackage = null;
>
> And then I have loaded profile into it by using load method defined in
> "Getting started with UML2" article:
> profilePackage = load(URI.createURI("file:/" + folder + "\\" + name ));
>
> I have tried methods profilePackage.getAppliedStereotypes(),
> profilePackage.allOwnedElements() and profilePackage.visibleMembers(). The
> first mentioned doesn't return anything and the second return all
> elements. Is it possible to get only defined stereotypes and their
content?
>
> Antti
>
Previous Topic:Questions in UML Extension mechanisms
Next Topic:Examples of the UML customization presentation
Goto Forum:
  


Current Time: Wed Jul 30 17:30:52 EDT 2014

Powered by FUDForum. Page generated in 0.01491 seconds