Bug 516173: [Interoperability][Rpy][Doc] Developer documentation cannot be opnened https://bugs.eclipse.org/bugs/show_bug.cgi?id=516173 Modify the mediawiki. Some 'code' balises are not correctly managed by wikiText. Change-Id: I26ed60da536815bff7a1876cff0f651b31b28dad Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@cea.fr>
diff --git a/rpy/plugins/org.eclipse.papyrus.interoperability.rpy.doc/src/site/mediawiki/rpyMigrationDev.mediawiki b/rpy/plugins/org.eclipse.papyrus.interoperability.rpy.doc/src/site/mediawiki/rpyMigrationDev.mediawiki index 33c2c42..8e594dc 100644 --- a/rpy/plugins/org.eclipse.papyrus.interoperability.rpy.doc/src/site/mediawiki/rpyMigrationDev.mediawiki +++ b/rpy/plugins/org.eclipse.papyrus.interoperability.rpy.doc/src/site/mediawiki/rpyMigrationDev.mediawiki
@@ -118,23 +118,21 @@ ***create a common mapping from a given type in the source metamodel to the most generic type of the target metamodel. This mapping will call the good submapping using ''disjunct'' and ''when'' QVTo keyword. Use resolved/invresolved to find the good object. ***after a mapping call a dummy method used as map (key,value) to store the result of the mapping: - -<code> mapping EObject::StoreSourceAndResult(res : EObject) : EObject { init { result := res } } -</code> *When do I apply stereotype ? It could seem a good idea to apply them when required in the mapping method, but it is not possible, because -###the result of the mapping is not yet in stored in the resource, so we get a NPE (main reason), -###in some case stereotype properties reference UML object not yet mapped (or stereotype application of others objects), -###more complex to override when we want extends a transformation to manage others profiles. +#the result of the mapping is not yet in stored in the resource, so we get a NPE (main reason), +#in some case stereotype properties reference UML object not yet mapped (or stereotype application of others objects), +#more complex to override when we want extends a transformation to manage others profiles. That's why we make a second run to apply profiles and stereotypes on the objects *How to get Stereotype Application to edit its feature ? **the resource edited during the transformation is in an other resourceset than the object given as parameter of the transformation, so this code deosn't work: + <code> Stereotype firstStereotype=...//(coming from a parameter of the transformation) element.applyStereotype(firstStereotype); @@ -145,13 +143,9 @@ <code> Stereotype firstStereotype=...//(coming from a parameter of the transformation) - element.applyStereotype(firstStereotype); - Stereotype secondStereotype=element.getAppliedStereotype(firstStereotype.getQualifiedName()) - element.setValue(secondStereotype,"propName", newValue);//works, first and secondStereotype are equals; their resource have the same URI, but 2 instance of the same resource is loaded - </code> Of course, in case of static profile, we can create the EClass represented the UML Stereotype in a mapping method too.