Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » help creating generalization
help creating generalization [message #97406] Wed, 24 December 2008 21:24
Victor Hugo is currently offline Victor HugoFriend
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!
Previous Topic:General XML injection to XML metamodel with XMI encoding
Next Topic:[ATL] Problem with stereotype’s property with several values
Goto Forum:
  


Current Time: Thu Apr 25 12:12:49 GMT 2024

Powered by FUDForum. Page generated in 0.02999 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top