Is it possible to convert a String to a type, which is definied by org.eclipse.uml2.uml.Type? We need this information to generate a uml file with emf and ecore, but we only get the type information as a String.
Thank you!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As you wrote in your comments, your problems is NOT getting a UML type for a qualified method name-you apparently want to create the UML which corresponds to your KDM!
Either you turn you KDM into a UML model manually, drawing the class diagram in a suitable editor, or you do it programmatically. There, you’d start with a (empty) UML model, and add (create) all the (UML) classes to it that you need (e.g. through
Package.createOwnedClass(name, isAbstract) : Class.From looking at the class hierarchy, you can see that a
Classis also aType. You know the root of your model (a package), you know where you put the classes (maybe in a subpackage), so you know where to look by name for a particular class usingPackage.getOwnedType(name) : Type.