Prevent user to create new elements in a list

I have a list where all the elements are derived from other elements in the model.  I would like the list to behave as follows:
  • user cannot remove an element from the list
  • user cannot add an element to the list
  • user can edit properties / references / children within the elements of the list.
In short, the list should not be editable, but the elements in the list should be editable.

I know there are issues http://youtrack.jetbrains.com/issue/MPS-18245 and http://youtrack.jetbrains.com/issue/MPS-16865 for stopping users from deleting elements in a list, so this is not possible yet.
However, is it possible to prevent a user to add elements to a list?  In my editors the RETURN will always create a new element.
1 comment

For me, the read-only style attribute is not working since I want to allow to replace/substitute an element, but also prevent the user to explicitly delete an element. Any ideas?

0

Please sign in to leave a comment.