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:
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.
- 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.
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.
Please sign in to leave a 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?