Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsIllegal Argument setting a stereotype property
https://www.eclipse.org/forums/index.php/mv/msg/196471/626229/#msg_626229
Originally posted by: flavio.p.duarte.gmail.com
Hi,
it has been a long time since the last time a posted a message here, but
I'm still struggling with profiles and stereotypes.
My newest problem is related to set a value for a stereotype property,
more specificaly, the PAdemand property of the PAstep stereotype
conetained in the UML SPT profile. I used the PAschdPolicy property of
PAhost stereotype without problem, but the PAdemand is triggering an
IllegalArgumentException whenever I try to use setValue method. My code is
basicaly:
// st is PAstep
void setProperties( NamedElement elem, Stereotype st ) {
elem.applyStereotype( st );
String key = "PAdemand";
String value = "('assm','mean',(0.8,'s'))"
elem.setValue( st, key, value );
}
I took a look at the profile.uml file and the PAdemand is defined as a
string, so the contents of the variable value should not matter (I think).
Does anyone have any idea on how to discover what's going on ?