Unable to resolve applicable stereotype [message #471641] |
Wed, 14 March 2007 11:19  |
Eclipse User |
|
|
|
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 #471647 is a reply to message #471644] |
Thu, 15 March 2007 04:52  |
Eclipse User |
|
|
|
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 12:27  |
Eclipse User |
|
|
|
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 14:56  |
Eclipse User |
|
|
|
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 15:29  |
Eclipse User |
|
|
|
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 #599508 is a reply to message #471643] |
Thu, 15 March 2007 04:51  |
Eclipse User |
|
|
|
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 04:52  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.48068 seconds