[ATL] Problem with UML2 profiles & ATL2.0.0 [message #71708] |
Fri, 11 January 2008 14:41 |
Eclipse User |
|
|
|
Originally posted by: adilanwar10.yahoo.fr
Hi,
i need to apply some stereotypes to a UML2 model.
i used :
Eclipse : 3.3.0
EMF : 2.3.0
ATL : 2.0.0
UML2 : 2.1.0
module CorrespUML2VUML; -- Module Template
create OUT : UML2 from IN1 : UML2, IN2 : UML2, PRO : UML2, MC : MMC;
helper def : base : UML2!Stereotype = OclUndefined;
rule CreateVUML2Model{
from cp : MMC!CorrespondencePackage
to p : UML2!Model (
name <- 'ComposedModel'
)
do { p.applyProfile(UML2!Profile.allInstancesFrom('PRO')->select(p | p.name
= 'prof')->first());
thisModule.base <- UML2!Profile.allInstancesFrom('PRO')->select(p |
p.name='prof')
->first().ownedStereotype->select(s | s.name='base')->first();
}}
rule Similarity2Base{
from r : MMC!SimilarityRelationship
to b : UML2!Class(
name <- thisModule.getRefElement(r).name,
visibility <- thisModule.getRefElement(r).getElement.visibility,
isAbstract <- thisModule.getRefElement(r).getElement.isAbstract,
package <- r.cPackage
)
do{
b.applyStereotype(thisModule.base);
}}
when i launch the transformation i have the above execption
can anyone tell me what is the problem? how can i use stereotypes in my
transformation ??
Best regards,
Adil
GRAVE: ****** BEGIN Stack Trace
GRAVE: message: ERROR: exception during invocation of operation applyProfile
on UML2!Model (java method: public org.eclipse.emf.common.util.EList
org.eclipse.uml2.uml.internal.impl.PackageImpl.applyProfile( org.eclipse.uml2.uml.Profile))
GRAVE: exception:
GRAVE: org.eclipse.uml2.uml.internal.impl.ProfileImpl@e43c6f (name: prof,
visibility: <unset>) (visibility: public)
java.lang.IllegalArgumentException:
org.eclipse.uml2.uml.internal.impl.ProfileImpl@e43c6f (name: prof,
visibility: <unset>) (visibility: public)
at
org.eclipse.uml2.uml.internal.operations.PackageOperations.a pplyProfile(PackageOperations.java:524)
at
org.eclipse.uml2.uml.internal.impl.PackageImpl.applyProfile( PackageImpl.java:1051)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
|
|
|
|
|
Re: [ATL] Problem with UML2 profiles & ATL2.0.0 [message #71804 is a reply to message #71766] |
Sat, 12 January 2008 21:09 |
Eclipse User |
|
|
|
Originally posted by: adilanwar10.yahoo.fr
Hi all,
I have to apply a stereotype to a Dependency relationship
the classes members of this dependency are correctly stereotyped using the
applyStereotype operation, but when i do the same with the dependency
element i have an exception.
vext : UML2!Dependency(
client <-v,
supplier <-b
)
do{
v.applyStereotype(thisModule.view);
b.applyStereotype(thisModule.base);
vext.applyStereotype(thisModule.viewExtension);
}
how can i do this??
Best regards,
Adil
GRAVE: message: ERROR: exception during invocation of operation
applyStereotype on UML2!Dependency (java method: public
org.eclipse.emf.ecore.EObject
org.eclipse.uml2.uml.internal.impl.ElementImpl.applyStereoty pe(org.eclipse.uml2.uml.Stereotype))
GRAVE: exception:
GRAVE: org.eclipse.uml2.uml.internal.impl.StereotypeImpl@6a67ab (name:
viewExtension, visibility: <unset>) (isLeaf: false, visibility: public,
isAbstract: false) (isActive: false, isAbstract: false)
java.lang.IllegalArgumentException:
org.eclipse.uml2.uml.internal.impl.StereotypeImpl@6a67ab (name:
viewExtension, visibility: <unset>) (isLeaf: false, visibility: public,
isAbstract: false) (isActive: false, isAbstract: false)
at
org.eclipse.uml2.uml.internal.operations.ElementOperations.a pplyStereotype(ElementOperations.java:1410)
at
org.eclipse.uml2.uml.internal.impl.ElementImpl.applyStereoty pe(ElementImpl.java:501)
"Adil Anwar" <adilanwar10@yahoo.fr> a
|
|
|
Powered by
FUDForum. Page generated in 0.03137 seconds