Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Disabling further edits for a diagram
Disabling further edits for a diagram [message #1839015] Thu, 11 March 2021 11:15 Go to next message
Giray Ozel is currently offline Giray OzelFriend
Messages: 18
Registered: February 2018
Junior Member
I want to prevent the user from making further edits to elements in a diagram when an "accepted" boolean has been set to true. So, I am thinking of adding that boolean flag to the metamodel and checking it in a lot of preconditions in the tools, node elements, etc.

However, I realized that it will probably not work for default functionality such as deleting a container. I would have to override a lot of default functionality for each element by creating a corresponding tool and checking this "accepted" status. Is there a more straightforward way of disabling any edits in a diagram or perhaps ecore object?
Re: Disabling further edits for a diagram [message #1839095 is a reply to message #1839015] Sat, 13 March 2021 14:48 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

In the old days EcoreTools had a *.ecoreDiagram that was self-standing complement to a *.ecore, so that each model in the same folder has its own diagrams. Sadly that functionality has got lost so that the *.aird file aggregates all models at significant cost to load/save/memory costs and risk of significant confusion as independent test models are co-loaded. I have seem occasional hints that this new policy is not mandatory and so it should be possible to organize your diagrams on a per-model basis with the *.aird, if really required, providing little more than an index. If you are able to achieve this I would be very interested in knowing how since this is high on my too-long list of to-dos.

Regards

Ed Willink
Re: Disabling further edits for a diagram [message #1839131 is a reply to message #1839095] Mon, 15 March 2021 13:33 Go to previous message
Giray Ozel is currently offline Giray OzelFriend
Messages: 18
Registered: February 2018
Junior Member
What I ended up doing was providing my own PermissionAuthority by using the org.eclipse.sirius.ecore.extender.PermissionProvider extension point.

I checked my custom condition in multiple places of the implemented IPermissionAuthority methods, which locked the related features/elements.
Previous Topic:Creating a blank diagram
Next Topic:Error in last commit in Sirius Web Master
Goto Forum:
  


Current Time: Fri Apr 26 00:26:48 GMT 2024

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

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

Back to the top