help creating generalization [message #97406] |
Wed, 24 December 2008 21:24 |
Victor Hugo Messages: 20 Registered: July 2009 |
Junior Member |
|
|
Hi People!
First, Marry Christmas everybody!
hmmm
I need a function thats received two classes and create one Generalization
between then!
In uml 1.4 i can need as showed in (1). But in uml2 parent e child
properties doenst exists!
So i tryied to do as showed in (2) but the atl compiler could not compile
this funcion and i dont understand what this happens. The editor doesnt
show any errors, but the compiler show this message: "message: ERROR:
could not find operation actualDeclaration on Void having supertypes:
[OclAny]"
(1) lazy rule newGeneralization {
from parent : UML2!"uml::Class", child : UML2!"uml::Class"
to t : UML2!"uml::Generalization" (
parent <- parent,
child <- child,
namespace <- child.namespace
)
do {
thisModule.getClassOperations( thisModule.getClassFromModel(parent.name,
'ASPECTS', 'aspect') )->
select( m | (m.isAbstract and not
thisModule.operationExists(child.name, m.name, '')))->
collect(e | thisModule.MethodToMethod(e, child, false ));
}
}
(2) lazy rule newGeneralization {
from generalClassifier : UML2!"uml::Class", specificClassifier :
UML2!"uml::Class"
do {
thisModule.umlGeneralization <-
specificClassifier.debug('SPECIFICCLASSIFIER -
').eGeneralization(generalClassifier);
}
}
Anyone can help me? I need to merge two uml2 models into one! And i have
to add some elements in the merged model, anyone know what could i find
some example of merge transformation?
I found this links but this transformations are written in UML2 v 1.x and
I'm working with UML2 v2.1, so this transformations is not compatible...
http://ssel.vub.ac.be/viewvc/UML1CaseStudies/uml1cs-transfor mations/MergeModel.atl?view=markup
http://ssel.vub.ac.be/viewvc/UML1CaseStudies/uml1cs-transfor mations/ModelMerge.atl?view=markup
Best regards!
|
|
|
Powered by
FUDForum. Page generated in 0.02999 seconds