Re: Removing EObject from EMF Resource with RemoveCommand [message #763259] |
Fri, 09 December 2011 12:48 |
Thomas Schindl Messages: 6651 Registered: July 2009 |
Senior Member |
|
|
Please ask emf questions in the future on the EMF-Newsgroup. Instead of
using the static helpers on RemoveCommand you can construct an instance
of RemoveCommand your own.
On the other hand if you'd created an IEMFEditObservableList as input
you can use it's remove method because internally those changes get
replaceted as commands on the original EMF-List.
Tom
Am 09.12.11 13:14, schrieb Ricky de Klerck:
> Hi,
>
> We're building an example application which is build with
> EMF/Teneo/Hibernate. We only have one object in our EMF model named
> "Person". We load our objects by making an EMF Resource. I know we can
> observe this Resource and use it as input for our TableViewer like this:
> tableViewer.setInput();
>
> This works great, but we when we want to delete a Person from this
> Resource we're facing a problem. We want to do this through an
> editingdomain so we should use a Command. Before we always created a
> RemoveCommand, but now we don't have any StructuralFeature because we
> only have one Object.
>
> How can we achieve that a Person is removed from a Resource with a
> Command/EditingDomain. Or is it necessary to have a top element which
> holds (containment) all the persons? This way we obviously can call a
> StructuralFeature.. But we don't want this if it isn't necessary.
>
> Thanks in advance.
>
> Regards,
> Ricky de Klerck
|
|
|
Powered by
FUDForum. Page generated in 0.67140 seconds