Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » Unable to resolve applicable stereotype
Unable to resolve applicable stereotype [message #471641] Wed, 14 March 2007 15:19 Go to next message
Paul Gribben is currently offline Paul GribbenFriend
Messages: 28
Registered: July 2009
Junior Member
Hello,

I have deefined a UML profile and have successfully applied it to a model,
applying stereotypes without problems, using the eclipse UML editor.
However I am as yet unable to achieve this in my code.

I've checked that I'm calling model.applyProfile(profile), I create an
owned class for a package (called target) and then do:
Stereotype s = target.getApplicableStereotype(stereotypeName)

This always returns null. I also find that
target.getApplicableStereotypes() returns an empty list.

The code continues to build the model file but without applying
stereotypes. I can then manually apply the stereotypes using the UML
editor later, proving (perhaps) that the stereotypes are valid for the
classes being genereated.

I notice that the UMLArticles example does not use getApplicableStereotype
as it constructs the profile and then uses the stereotype references
directly when applying them to the model later on.

Any help would be greatly appreciated.
Thanks
Re: Unable to resolve applicable stereotype [message #471642 is a reply to message #471641] Wed, 14 March 2007 16:27 Go to previous messageGo to next message
Paul Gribben is currently offline Paul GribbenFriend
Messages: 28
Registered: July 2009
Junior Member
Some additional information:
It seems that getExtension() in
org.eclipse.uml2.uml.internal.operations.ElementOperations is failing to
determine a type for the metaclass extension attribute (the stereotype's
property starting with "base_"), i.e. attribute.getType() returns null.
I'm using UML 2.0.2.

Cheers
Re: Unable to resolve applicable stereotype [message #471643 is a reply to message #471642] Wed, 14 March 2007 18:56 Go to previous messageGo to next message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Paul,

Can you post your profile so that I can have a look?
This sounds really bizarre because the UML editor doesn't do anything
special when applying stereotypes.
If it works with the editor, it should work with your program.

Regards,

- James.


"Paul Gribben" <paul.gribben@gmail.com> wrote in message
news:a428fc3f553759070d30895594a158d5$1@www.eclipse.org...
> Some additional information:
> It seems that getExtension() in
> org.eclipse.uml2.uml.internal.operations.ElementOperations is failing to
> determine a type for the metaclass extension attribute (the stereotype's
> property starting with "base_"), i.e. attribute.getType() returns null.
> I'm using UML 2.0.2.
>
> Cheers
>
>
Re: Unable to resolve applicable stereotype [message #471644 is a reply to message #471642] Wed, 14 March 2007 19:29 Go to previous messageGo to next message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Paul,

Have you registered the required pathmaps as outlined in the FAQ (and shown
in the source for the "Introduction to UML2 Profiles" article)?

Kenn

"Paul Gribben" <paul.gribben@gmail.com> wrote in message
news:a428fc3f553759070d30895594a158d5$1@www.eclipse.org...
> Some additional information:
> It seems that getExtension() in
> org.eclipse.uml2.uml.internal.operations.ElementOperations is failing to
> determine a type for the metaclass extension attribute (the stereotype's
> property starting with "base_"), i.e. attribute.getType() returns null.
> I'm using UML 2.0.2.
>
> Cheers
>
>
Re: Unable to resolve applicable stereotype [message #471645 is a reply to message #471644] Wed, 14 March 2007 21:06 Go to previous messageGo to next message
Paul Gribben is currently offline Paul GribbenFriend
Messages: 28
Registered: July 2009
Junior Member
Yes I've set up the pathmaps. One alteration from the FAQ is that the
2.0.2 API doesn't have URI.create(..) so I've used URI.createURI(..)
passing my jar resource as a string argument.
Re: Unable to resolve applicable stereotype [message #471646 is a reply to message #471643] Thu, 15 March 2007 08:51 Go to previous messageGo to next message
Paul Gribben is currently offline Paul GribbenFriend
Messages: 28
Registered: July 2009
Junior Member
I've found the problem. It seems that one of my esteemed colleagues
changed (incorrectly) the URI reference to the
org.eclipse.uml2.uml.resources-2.0.2.v200610251409.jar resource file,
causing the UML2 libraries to silently fail to resolve resource references.

It's quite difficult to debug this stuff when it goes wrong, as there's no
feedback from the uml2 library code.
Re: Unable to resolve applicable stereotype [message #471647 is a reply to message #471644] Thu, 15 March 2007 08:52 Go to previous message
Paul Gribben is currently offline Paul GribbenFriend
Messages: 28
Registered: July 2009
Junior Member
Thanks for that clue Kenn.

I've found the problem. It seems that one of my esteemed colleagues
changed (incorrectly) the URI reference to the
org.eclipse.uml2.uml.resources-2.0.2.v200610251409.jar resource file,
causing the UML2 libraries to silently fail to resolve resource references.

It's quite difficult to debug this stuff when it goes wrong, as there's no
feedback from the uml2 library code.

Thanks again
Re: Unable to resolve applicable stereotype [message #598491 is a reply to message #471641] Wed, 14 March 2007 16:27 Go to previous message
Paul Gribben is currently offline Paul GribbenFriend
Messages: 28
Registered: July 2009
Junior Member
Some additional information:
It seems that getExtension() in
org.eclipse.uml2.uml.internal.operations.ElementOperations is failing to
determine a type for the metaclass extension attribute (the stereotype's
property starting with "base_"), i.e. attribute.getType() returns null.
I'm using UML 2.0.2.

Cheers
Re: Unable to resolve applicable stereotype [message #598496 is a reply to message #471642] Wed, 14 March 2007 18:56 Go to previous message
james bruck is currently offline james bruckFriend
Messages: 1724
Registered: July 2009
Senior Member
Hi Paul,

Can you post your profile so that I can have a look?
This sounds really bizarre because the UML editor doesn't do anything
special when applying stereotypes.
If it works with the editor, it should work with your program.

Regards,

- James.


"Paul Gribben" <paul.gribben@gmail.com> wrote in message
news:a428fc3f553759070d30895594a158d5$1@www.eclipse.org...
> Some additional information:
> It seems that getExtension() in
> org.eclipse.uml2.uml.internal.operations.ElementOperations is failing to
> determine a type for the metaclass extension attribute (the stereotype's
> property starting with "base_"), i.e. attribute.getType() returns null.
> I'm using UML 2.0.2.
>
> Cheers
>
>
Re: Unable to resolve applicable stereotype [message #599487 is a reply to message #471642] Wed, 14 March 2007 19:29 Go to previous message
Kenn Hussey is currently offline Kenn HusseyFriend
Messages: 1620
Registered: July 2009
Senior Member
Paul,

Have you registered the required pathmaps as outlined in the FAQ (and shown
in the source for the "Introduction to UML2 Profiles" article)?

Kenn

"Paul Gribben" <paul.gribben@gmail.com> wrote in message
news:a428fc3f553759070d30895594a158d5$1@www.eclipse.org...
> Some additional information:
> It seems that getExtension() in
> org.eclipse.uml2.uml.internal.operations.ElementOperations is failing to
> determine a type for the metaclass extension attribute (the stereotype's
> property starting with "base_"), i.e. attribute.getType() returns null.
> I'm using UML 2.0.2.
>
> Cheers
>
>
Re: Unable to resolve applicable stereotype [message #599498 is a reply to message #471644] Wed, 14 March 2007 21:06 Go to previous message
Paul Gribben is currently offline Paul GribbenFriend
Messages: 28
Registered: July 2009
Junior Member
Yes I've set up the pathmaps. One alteration from the FAQ is that the
2.0.2 API doesn't have URI.create(..) so I've used URI.createURI(..)
passing my jar resource as a string argument.
Re: Unable to resolve applicable stereotype [message #599508 is a reply to message #471643] Thu, 15 March 2007 08:51 Go to previous message
Paul Gribben is currently offline Paul GribbenFriend
Messages: 28
Registered: July 2009
Junior Member
I've found the problem. It seems that one of my esteemed colleagues
changed (incorrectly) the URI reference to the
org.eclipse.uml2.uml.resources-2.0.2.v200610251409.jar resource file,
causing the UML2 libraries to silently fail to resolve resource references.

It's quite difficult to debug this stuff when it goes wrong, as there's no
feedback from the uml2 library code.
Re: Unable to resolve applicable stereotype [message #599523 is a reply to message #471644] Thu, 15 March 2007 08:52 Go to previous message
Paul Gribben is currently offline Paul GribbenFriend
Messages: 28
Registered: July 2009
Junior Member
Thanks for that clue Kenn.

I've found the problem. It seems that one of my esteemed colleagues
changed (incorrectly) the URI reference to the
org.eclipse.uml2.uml.resources-2.0.2.v200610251409.jar resource file,
causing the UML2 libraries to silently fail to resolve resource references.

It's quite difficult to debug this stuff when it goes wrong, as there's no
feedback from the uml2 library code.

Thanks again
Previous Topic:Unable to resolve applicable stereotype
Next Topic:how to make a "middleweight" extension on L0 or LM.
Goto Forum:
  


Current Time: Sat Apr 20 04:02:03 GMT 2024

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

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

Back to the top