Skip to main content



      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 10:49 Go to next message
Eclipse UserFriend
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 10:59 Go to previous message
Eclipse UserFriend
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
Previous Topic:a problem to select a Viewpoint
Next Topic:Hook to run arbitrary code on diagram load
Goto Forum:
  


Current Time: Sat May 17 18:44:43 EDT 2025

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

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

Back to the top