Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » UML2 » definecustomoperations in UMLEnvironment
definecustomoperations in UMLEnvironment [message #625726] Thu, 13 December 2007 08:33
charfi asma is currently offline charfi asmaFriend
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
Previous Topic:[Announce] Joint Eclipse/OMG Symposia
Next Topic:definecustomoperations in UMLEnvironment
Goto Forum:
  


Current Time: Fri Apr 26 09:10:38 GMT 2024

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

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

Back to the top