Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Limit the number of nodes in container
Limit the number of nodes in container [message #1696787] Thu, 28 May 2015 14:49 Go to next message
Tuan Hoang Anh is currently offline Tuan Hoang AnhFriend
Messages: 42
Registered: May 2015
Member
Hi all,

I have a List container, and I can add many Nodes into it. But now, I want to limt the number of Nodes in the List Container. For example, if user added 3 Nodes in the Container before, when he tries to add a new Node, the adding operation doesn't work, and the plus icon which appears when adding Node in the Container changes to Cancel icon.

Best Regards,
Tuan
Re: Limit the number of nodes in container [message #1696793 is a reply to message #1696787] Thu, 28 May 2015 14:59 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 516
Registered: July 2009
Location: Nantes, France
Senior Member
Hi,

I think you could use the containerView variable in your precondition
expression of your NodeCreationDescription (the completion does not
expose it, but it will be present at evaluation time).

containerView will correspond to the Sirius internal model element, in
your case a DNodeList. You could check the number of ownedElement which
is the feature storing the list elements.

Could you also create a bugzilla to track the hidden variable ?

Regards,

Le 28/05/2015 16:49, Tuan Hoang Anh a écrit :
> Hi all,
>
> I have a List container, and I can add many Nodes into it. But now, I
> want to limt the number of Nodes in the List Container. For example, if
> user added 3 Nodes in the Container before, when he tries to add a new
> Node, the adding operation doesn't work, and the plus icon which appears
> when adding Node in the Container changes to Cancel icon.
>
> Best Regards,
> Tuan


--
Maxime - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:a problem to select a Viewpoint
Next Topic:Hook to run arbitrary code on diagram load
Goto Forum:
  


Current Time: Thu Apr 25 09:55:35 GMT 2024

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

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

Back to the top