Skip to main content



      Home
Home » Modeling » UML2 » definecustomoperations in UMLEnvironment
definecustomoperations in UMLEnvironment [message #625726] Thu, 13 December 2007 03:33
Eclipse UserFriend
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
Previous Topic:[Announce] Joint Eclipse/OMG Symposia
Next Topic:definecustomoperations in UMLEnvironment
Goto Forum:
  


Current Time: Mon Jul 07 23:27:15 EDT 2025

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

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

Back to the top