|
Re: Forbid users from creating and deleting EClasses [message #1860668 is a reply to message #1860659] |
Thu, 24 August 2023 14:19 |
Ed Merks Messages: 33210 Registered: July 2009 |
Senior Member |
|
|
When you talk about create/delete an EClass I assume you mean create/delete an instance of some EClass, not something you're trying to restrict in the Ecore editor itself.
Yes, generally you're going to have to specialize something. Creation is generally supported anywhere there is a containment reference that supports the given EClass as an instance so you could specialize the container's item provider, in their collectNewChildDescriptors(Collection<Object>, Object) method. Also, in the container item providers, you could specialize ItemProviderAdapter.createRemoveCommand(EditingDomain, EObject, EStructuralFeature, Collection<?>)to refuse to remove certain types of object. In general, you can track down such places using the debugger how the actions are created and what they do when invoked...
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04092 seconds