Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » IllegalArgumetnException when applying a stereotyp
IllegalArgumetnException when applying a stereotyp [message #626070] Fri, 22 February 2008 14:10
Michael is currently offline MichaelFriend
Messages: 43
Registered: July 2009
Member
Hi everybody!

I have a problem when I want to apply a stereotype to a class. I get an
IllegalArgumentException from the metode applyStereotype in the class
ElementOperation. Here is my java code:

...

(before that, register Resource-Factories and Pathmaps)

Stereotype factoryStereotype =
factoryProfile.createOwnedStereotype("factory", true);

org.eclipse.uml2.uml.Class propertyMetaclass = referenceMetaclass(
factoryProfile, UMLPackage.Literals.CLASS.getName());

Extension extension =
factoryStereotype.createExtension(propertyMetaclass, false);

factoryProfile.define();

...

(loading a uml model)

umlModel.applyProfile(factoryProfile);

creator.applyStereotype(factoryStereotype); //creator = class in the
umlModel

--> here I get the exception! is maybe the refernce of the metaclass wrong?

I hope somebody can help me!

Thanx
Michael
Previous Topic:Importing XMI
Next Topic:Stereotype attribute with unsettable value
Goto Forum:
  


Current Time: Thu Mar 28 10:28:02 GMT 2024

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

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

Back to the top