Skip to main content



      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 06:49 Go to next message
Eclipse UserFriend
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 141 times)
Re: Read-only mode on the diagram (too many red locks) [message #1768603 is a reply to message #1768588] Thu, 20 July 2017 08:44 Go to previous message
Eclipse UserFriend
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
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: Sun Jul 06 09:48:18 EDT 2025

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

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

Back to the top