Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Un Set Command
Un Set Command [message #539182] Wed, 09 June 2010 21:26 Go to next message
bachra04  is currently offline bachra04 Friend
Messages: 148
Registered: April 2010
Senior Member
Hi Guys,

I know that we use SetCommand to set a particular feature top some value;
But if we want to unset the feature (set it to null), I tried setCommand with null but it did not work.
Re: Un Set Command [message #539185 is a reply to message #539182] Wed, 09 June 2010 21:31 Go to previous messageGo to next message
Aurélien Pupier is currently offline Aurélien PupierFriend
Messages: 637
Registered: July 2009
Location: Grenoble, FRANCE
Senior Member

Hi,

try a deletecommand

Regards,


Aurélien Pupier - Red Hat
Senior Software Engineer in Fuse Tooling team
Re: Un Set Command [message #539189 is a reply to message #539182] Wed, 09 June 2010 21:40 Go to previous messageGo to next message
bachra04  is currently offline bachra04 Friend
Messages: 148
Registered: April 2010
Senior Member
I had a look at it but my problem is that I need to delete a particular feature of an object while deleCommand accepts only collections:

public DeleteCommand(EditingDomain domain, Collection<?> collection)

Is there any sample code on how to use ?

Thanks
Re: Un Set Command [message #539523 is a reply to message #539189] Fri, 11 June 2010 07:46 Go to previous message
Thomas Beyer is currently offline Thomas BeyerFriend
Messages: 93
Registered: July 2009
Member
Hi bachra,

it seams weired that setting null within the SetCommand does not have
any effect, since it should (and does for all my use cases).
You could also implement your own AbstractTransactionCommand and use the
EMF-API eUnset to the specific feature, you want to reset.

If this also doesn't help, please provide some code, that you are using
to find out where to start.

Regards
Thomas


On 09.06.2010 23:40, bachra04 wrote:
> I had a look at it but my problem is that I need to delete a particular
> feature of an object while deleCommand accepts only collections:
>
> public DeleteCommand(EditingDomain domain, Collection<?> collection)
>
> Is there any sample code on how to use ?
>
> Thanks
Previous Topic:Issue with Enum data type in GMF
Next Topic:retrieve the emf resource from the diagram currently edited
Goto Forum:
  


Current Time: Sat May 18 07:33:17 GMT 2024

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

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

Back to the top