Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Re: Removing EObject from EMF Resource with RemoveCommand
Re: Removing EObject from EMF Resource with RemoveCommand [message #763259] Fri, 09 December 2011 12:48
Thomas Schindl is currently offline Thomas SchindlFriend
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
Previous Topic:[CDO] running stand alone?
Next Topic:Associate an Association Class
Goto Forum:
  


Current Time: Sat Apr 27 00:33:11 GMT 2024

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

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

Back to the top