emf creation command ? [message #380002] |
Wed, 11 March 2009 12:00  |
Eclipse User |
|
|
|
Hello,
I have a problem finding an emf command for creating/instancing an object.
For example setting a property of an object I do it by using the
SetCommand like this:
1.org.eclipse.uml2.uml.Class myClass = UMLFactory.eINSTANCE.createClass();
2.SetCommand.create(domain, myClass,
UMLPackage.eINSTANCE.getNamedElement_Name(), "TheName");
Are there such thing as a "CreateCommand" ?
My scope is to make a command that creates a Class within a Package,the
command to be undoable, and composed of basic emf commands.
Thanks in advance,
Sorin.
|
|
|
|
|
Re: emf creation command ? [message #597495 is a reply to message #380002] |
Wed, 11 March 2009 13:12  |
Eclipse User |
|
|
|
Sorin,
Doesn't the basic UML2 editor do exactly that? It uses a
CreateChildCommand for that.
Sorin Fagateanu wrote:
> Hello,
>
> I have a problem finding an emf command for creating/instancing an
> object.
>
> For example setting a property of an object I do it by using the
> SetCommand like this:
>
> 1.org.eclipse.uml2.uml.Class myClass =
> UMLFactory.eINSTANCE.createClass();
>
> 2.SetCommand.create(domain, myClass,
> UMLPackage.eINSTANCE.getNamedElement_Name(), "TheName");
>
> Are there such thing as a "CreateCommand" ?
> My scope is to make a command that creates a Class within a
> Package,the command to be undoable, and composed of basic emf commands.
>
>
> Thanks in advance,
> Sorin.
>
>
|
|
|
|
Powered by
FUDForum. Page generated in 0.07855 seconds