Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Read-only mode on the diagram (too many red locks)
Read-only mode on the diagram (too many red locks) [message #1768588] Thu, 20 July 2017 10:49 Go to next message
Martin Jedlicka is currently offline Martin JedlickaFriend
Messages: 122
Registered: January 2016
Senior Member
Hi,

I have a question about read-only mode.

If I set the digram to read-only mode (see the code below), the diagram contains (see picture):


  • One red lock (in the red circle) in the upper left corner of the diagram
  • Red lock on each element of the diagram (node, edge, etc.)


Is it possible (some implementation) to have only one red lock on the diagram (in the upper left corner) and the other locks (on the elements) were not there?
If I have a complicated diagram, it's full of red locks, and it's pretty confused.

IPermissionAuthority permissionAuthority = IPermissionAuthorityRegistry.getPermissionAuthority(session.getTransactionalEditingDomain().getResourceSet());
if (permissionAuthority instanceof ReadOnlyPermissionAuthority) {
   ((ReadOnlyPermissionAuthority) permissionAuthority).activate();
}


Thanks.

Martin
  • Attachment: read_only.png
    (Size: 13.14KB, Downloaded 119 times)
Re: Read-only mode on the diagram (too many red locks) [message #1768603 is a reply to message #1768588] Thu, 20 July 2017 12:44 Go to previous message
Pierre Guilet is currently offline Pierre GuiletFriend
Messages: 250
Registered: June 2017
Senior Member
Hi,

You can do that in Sirius 5.0 by removing the org.eclipse.sirius.diagram.ui.tools.internal.decoration.EditModeDecorationDescriptorProvider from registry org.eclipse.sirius.diagram.ui.tools.api.decoration.SiriusDecorationProviderRegistry accessible by SiriusDecorationProviderRegistry.INSTANCE with the methods provided.

Regards,

Pierre


Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Navigate from diagram to tree representation
Next Topic:Custom widget control description identifier is always null in Sirius 5.0
Goto Forum:
  


Current Time: Wed Apr 24 19:21:06 GMT 2024

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

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

Back to the top