definecustomoperations in UMLEnvironment [message #625726] |
Thu, 13 December 2007 08:33 |
charfi asma Messages: 78 Registered: July 2009 |
Member |
|
|
Hi,
I have this code to define neuw EOperation (the class extend
EcoreEnvironment) and I want to do the same but to define a new Operation
(org.eclipse.uml2.uml.Operation), so my class extend UMLEnvironment instead
the code referred to the class that extend EcoreEnvironment
private void defineCustomOperations() {
EOperation nbligne;
nbligne = EcoreFactory.eINSTANCE.createEOperation();
nbligne.setName("nbligne");
nbligne.setEType(getOCLStandardLibrary().getString());
EAnnotation annotation = EcoreFactory.eINSTANCE.createEAnnotation();
annotation.setSource("MyEnvironment");
nbligne.getEAnnotations().add(annotation);
addOperation(getOCLStandardLibrary().getString(), nbligne);
when I try to define a new UML operation I write this:(I chaged to UML but I
can not find UMLFactory.eINSTANCE.createAnnotation())
private void defineCustomOperations() {
Operation nbligne;
nbligne= UMLFactory.eINSTANCE.createOperation();
nbligne.setName("nbligne");
nbligne.setType(getOCLStandardLibrary().getString());
nbligne.setIsQuery(true);
addOperation(getOCLStandardLibrary().getString(), regexMatch); }
The question is, what is the equivalent of EAnnotation in UML, how to
annotate operation using UML?
thank you very much.
asma
|
|
|
Powered by
FUDForum. Page generated in 0.03395 seconds