|
Re: Change UMl model [message #1747928 is a reply to message #1747924] |
Wed, 16 November 2016 21:02 |
|
Hi Taghreed,
The reference you're looking for seems to be "nestedClassifiers" i.e. the following should work:
var d : new Device;
var a : new Artifact;
d.nestedClassifiers.add(a);
The UML tree editor is very useful for finding valid ways in which UML elements can connect to each other.
Cheers,
Dimitris
|
|
|
|
|
|
Re: Change UMl model [message #1748302 is a reply to message #1748299] |
Mon, 21 November 2016 23:10 |
taghreed altamimi Messages: 184 Registered: October 2014 |
Senior Member |
|
|
Hi Dimitris,
operation Model addDevice(E :UML!Model){
var d : new Device;
var deviceName :String;
E.packagedElement.add(d);
d.name= System.user.prompt("Give Name to the Device " +deviceName );
var St:Collection =Stereotype.all;
var deviceStereotype: Any;
deviceStereotype= System.user.prompt("choose stereotype for the new device " +St );
"deviceStereotype".print()+deviceStereotype.println();
d.applyStereotype(deviceStereotype);
}
I got the following error:
Method 'applyStereotype' not found for: Device [name=vv, qualifiedName=model::vv, visibility=public, isLeaf=false, isAbstract=false, isFinalSpecialization=false, isActive=false, ]
and also I wasn't able to see the collection in the user message ,it says too large collection has more than 100 elements.(see photo attached)
Can you please help me to view Stereotype.all collection and also tell me what is wrong in applyStereotype method.
Thanks,
Taghreed
[Updated on: Mon, 21 November 2016 23:25] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02775 seconds