Change UMl model [message #1747924] |
Wed, 16 November 2016 15:30  |
Eclipse User |
|
|
|
Hi,
for (m in UML!Model) {
for (v in UML!Device.all){
var d = v.selectOne(a|a.name = "Device1");
var A : new UML!Artifact;
A.name="New-Artifact";
A.filename="New-Artifact.file";
d.deployment.deployedArtifact.add(A);
I am trying to add artifact to device but i couldnt find the name of the relationship that connect them together .The UML standard is so complex and confusing.Can you please help me.
Thanks,
Taghreed
|
|
|
|
|
|
|
Re: Change UMl model [message #1748302 is a reply to message #1748299] |
Mon, 21 November 2016 18:10   |
Eclipse User |
|
|
|
 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 18:25] by Moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08914 seconds